begin process at 2010 03 18 10:57:38
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Effets

 > ANIMATION DE TEXTE

ANIMATION DE TEXTE


 Information sur la source

Note :
Aucune note
Catégorie :Effets Niveau :Expert Date de création :29/01/2003 Date de mise à jour :29/01/2003 02:56:35 Vu :10 000

Auteur : kortal

Ecrire un message privé
Site perso
Commentaire sur cette source (4)
Ajouter un commentaire et/ou une note

 Description

ce code n'est pas de moi, mais il est sympa alors je l'ai posté. il faut savoir partager les bonnes choses ds la vie... ;)

Source

  • Code à placer dans la partie HEAD :
  • <SCRIPT LANGUAGE="JavaScript">n = (document.layers) ? 1:0; ie = (document.all) ? 1:0
  • function kdebut() { grey = new dynLayer("greyDiv"); grey.circle(80,2,0,null,1,4,90) }
  • function dynLayer(id) { if (n) { this.css = document.layers[id]
  • this.ref = document.layers[id].document; this.x = this.css.left; this.y = this.css.top }
  • else if (ie) {this.css = document.all[id].style;this.ref = document;this.x = this.css.pixelLeft
  • this.y = this.css.pixelTop } ;this.obj = id + "Object"; eval(this.obj + "=this")
  • this.moveBy = dynLayerMoveBy; this.moveTo = dynLayerMoveTo; this.circle = dynLayerCircle
  • this.circleSlide = dynLayerCircleSlide }
  • function dynLayerMoveBy(x,y) { this.x += x; this.css.left = this.x; this.y += y; this.css.top = this.y }
  • function dynLayerMoveTo(x,y) { this.x = x; this.css.left = this.x; this.y = y; this.css.top = this.y }
  • function dynLayerCircle(radius,angleinc,angle,endangle,vertical,horizontal,speed,fn) {
  • if (!this.circleActive) { var centerX = this.x - horizontal*radius*Math.cos(angle*Math.PI/180)
  • var centerY = this.y + vertical*radius*Math.sin(angle*Math.PI/180); if (endangle!=null) {
  • angleinc = Math.abs(angleinc); if (endangle<angle) angleinc*=-1 }; this.circleActive = 1
  • this.circleSlide(radius,angleinc,angle,endangle,vertical,horizontal,centerX,centerY,speed,fn)}}
  • function dynLayerCircleSlide(radius,angleinc,angle,endangle,vertical,horizontal,centerX,centerY,speed,fn) {
  • if (!fn) fn = null; if (this.circleActive && (endangle==null || endangle!=null && Math.abs(angleinc)<Math.abs(endangle-angle) )) {
  • angle += angleinc; var x = centerX + horizontal*radius*Math.cos(angle*Math.PI/180);
  • var y = centerY - vertical*radius*Math.sin(angle*Math.PI/180); this.moveTo(x,y)
  • setTimeout(this.obj+".circleSlide("+radius+","+angleinc+","+angle+","+endangle+","+vertical+","+horizontal+","+centerX+","+centerY+","+speed+",\""+fn+"\")",speed)}
  • else { this.circleActive = 0 ;if (endangle!=null) {
  • var x = Math.round(centerX + horizontal*radius*Math.cos(endangle*Math.PI/180));var y = Math.round(centerY - vertical*radius*Math.sin(endangle*Math.PI/180))
  • this.moveTo(x,y)} ; eval(fn)}}
  • --></SCRIPT><DIV ID="greyDiv" STYLE="position:absolute; left:640; top:2980; WIDTH:250; HEIGHT:50; VISIBILITY:visible;">
  • <FONT COLOR="#00FF00" SIZE=+2 FACE="Verdana">KS JAVASCRIPT</FONT></DIV>
  • Code à placer dans la partie BODY :
  • <FORM><INPUT TYPE="button" VALUE="Cliquez ici puis observez..." onClick="kdebut()">
Code à placer dans la partie HEAD :

<SCRIPT LANGUAGE="JavaScript">n = (document.layers) ? 1:0; ie = (document.all) ? 1:0
function kdebut() { grey = new dynLayer("greyDiv"); grey.circle(80,2,0,null,1,4,90) }
function dynLayer(id) { if (n) { this.css = document.layers[id]
this.ref = document.layers[id].document; this.x = this.css.left; this.y = this.css.top }
else if (ie) {this.css = document.all[id].style;this.ref = document;this.x = this.css.pixelLeft
this.y = this.css.pixelTop } ;this.obj = id + "Object"; eval(this.obj + "=this")
this.moveBy = dynLayerMoveBy; this.moveTo = dynLayerMoveTo; this.circle = dynLayerCircle
this.circleSlide = dynLayerCircleSlide }
function dynLayerMoveBy(x,y) { this.x += x; this.css.left = this.x; this.y += y; this.css.top = this.y }
function dynLayerMoveTo(x,y) { this.x = x; this.css.left = this.x; this.y = y; this.css.top = this.y }
function dynLayerCircle(radius,angleinc,angle,endangle,vertical,horizontal,speed,fn) {
if (!this.circleActive) { var centerX = this.x - horizontal*radius*Math.cos(angle*Math.PI/180)
var centerY = this.y + vertical*radius*Math.sin(angle*Math.PI/180); if (endangle!=null) {
angleinc = Math.abs(angleinc); if (endangle<angle) angleinc*=-1 }; this.circleActive = 1
this.circleSlide(radius,angleinc,angle,endangle,vertical,horizontal,centerX,centerY,speed,fn)}}
function dynLayerCircleSlide(radius,angleinc,angle,endangle,vertical,horizontal,centerX,centerY,speed,fn) {
if (!fn) fn = null; if (this.circleActive && (endangle==null || endangle!=null && Math.abs(angleinc)<Math.abs(endangle-angle) )) {
angle += angleinc; var x = centerX + horizontal*radius*Math.cos(angle*Math.PI/180);
var y = centerY - vertical*radius*Math.sin(angle*Math.PI/180); this.moveTo(x,y)
setTimeout(this.obj+".circleSlide("+radius+","+angleinc+","+angle+","+endangle+","+vertical+","+horizontal+","+centerX+","+centerY+","+speed+",\""+fn+"\")",speed)}
else { this.circleActive = 0 ;if (endangle!=null) { 
var x = Math.round(centerX + horizontal*radius*Math.cos(endangle*Math.PI/180));var y = Math.round(centerY - vertical*radius*Math.sin(endangle*Math.PI/180))
this.moveTo(x,y)} ; eval(fn)}} 
--></SCRIPT><DIV ID="greyDiv" STYLE="position:absolute; left:640; top:2980; WIDTH:250; HEIGHT:50; VISIBILITY:visible;">
<FONT COLOR="#00FF00" SIZE=+2 FACE="Verdana">KS JAVASCRIPT</FONT></DIV>


Code à placer dans la partie BODY :

<FORM><INPUT TYPE="button" VALUE="Cliquez ici puis observez..." onClick="kdebut()">



 Conclusion

by Kortal (coder@kortal.cjb.net)
[ http://kortal.cjb.net ]


 Sources du même auteur

AFFICHAGE DE LA DATE
BOUTON D'OUVERTURE DE LIEN DS UNE NVELLE PAGE
PHRASE ALÉATOIRE AU CHARGEMENT D'UNE PAGE
EFFET DE TEXTE (DENTS DE SCIE 2)
EFFET DE TEXTE (DENTS DE SCIE)

 Sources de la même categorie

AFFICHER OU CACHER UN COMPOSANT AVEC JAVASCRIPT V1.0 par xloadx
Source avec Zip MOOLOUPE - EFFET DE LOUPE VIA LE FRAMEWORK MOOTOOLS par Miky76
Source avec Zip MOOTOOLTIP par Miky76
Source avec Zip Source avec une capture PAINTPIX (VERSION TESTE. EXPORTATION IMAGE POUR SITE WEB) par sitajony
FONCTION BLINK ( TESTÉE SOUS FF ) PORTABILITÉ IE OP ET GC EN... par xloadx

Commentaires et avis

Commentaire de PsyCaDi le 22/02/2003 12:32:42

Je ne suis pas une bête en développement mais la première chose que j'ai appris, c'est de rendre un code lisible, qu'il soit simple ou pas. Bon les commentaires ne sont pas toujours nécessaires mais la lisibilité d'un code, c'est important.

PsyCaDi

Commentaire de kortal le 23/02/2003 18:14:09

oui effectivement, tu as raison lol
en fait j'avais mis cette source ds ce format la car je l'utilisais sur mon site, et je voulais gagner un maximum de place, pour gagner en vitesse de chargement. a l'epoque je n'avais qu'un modeste 56k, et qques ko de moins sur une page n'etaient pas négligeable.

Commentaire de sloyvy le 18/05/2003 19:52:11

??? pour moi, rien ne s'affiche dans ma page html...
il est sensé faire quoi ce script ?  ( mon niveau en html 01/20,   je fais que des copiés collé de script déja tout pret)..
D'ailleurs, j en profite pour tirer ma réverence  à tous les acteurs des sites à scripts

Commentaire de astron35 le 27/02/2007 19:39:31

Moi aussi, rien ne s'affiche...
Comment on fait ????

 Ajouter un commentaire




Nos sponsors


Appels d'offres

Sondage...

Comparez les prix

CalendriCode

Mars 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
293031    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,811 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales