Accueil du forum » Flash » Comment créer un mouvement en spirale?
________________
krefft
<SCRIPT LANGUAGE="JavaScript">
<!-- abdelaziz_info@yahoo.fr
var mes_roses='f1.gif" width="42" height="53" height="35';//Put your image name here!!
var amount=7;
var cnter=70;
var step;
var currStep = 0;
var Xpos = 0;
var Ypos = 0;
if (document.all)
{
document.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px">')
document.write('<div id="c" style="position:relative">');
for (n=0; n < amount; n++)
document.write('<img src=" '+mes_roses+'" style="position:absolute;top:0px;left:0px">')
document.write('</div>')
document.write('</div>')
function abdelaziz_info(){
Xpos = document.body.scrollLeft+event.x-5;
Ypos = document.body.scrollTop+event.y-5;
}
document.onmousemove = abdelaziz_info;
}
else if (document.layers)
{
window.captureEvents(Event.MOUSEMOVE);
for (ns=0; ns < amount; ns++)
document.write("<LAYER NAME='n"+ns+"' LEFT=0 TOP=0><IMG SRC='"+mes_roses+"'></LAYER>");
function Ainfo(evnt){
Xpos = evnt.pageX-5;
Ypos = evnt.pageY-5;
}
window.onMouseMove = Ainfo;
}
function roses(){
if (currStep<0.0550)
step=0.001;
if (document.all)
{
for (i=0;i<ieDiv.all.c.all.length;i++)
{
ieDiv.all.c.all<i>.style.top = Ypos+cnter*Math.cos((currStep+i*4.5)/5)*Math.sin((currStep)*150);
ieDiv.all.c.all[i].style.left = Xpos+cnter*Math.sin((currStep+i*4.5)/5)*Math.sin((currStep)*150);
}
}
else if (document.layers)
{
for ( i = 0 ; i < ns ; i++ )
{
var temp="n"+i
document.layers[temp].top = Ypos+cnter*Math.cos((currStep+i*4.5)/5)*Math.sin((currStep)*150);
document.layers[temp].left =Xpos+cnter*Math.sin((currStep+i*4.5)/5)*Math.sin((currStep)*150);
}
}
currStep += step;
setTimeout("roses()", 30);
if (currStep>0.0540)
{
step+=0.002;
if (document.layers)
{
for ( i = 0 ; i < ns ; i++ )
{
var temp="n"+i
document.layers[temp].top =Ypos+cnter*Math.cos((currStep+i*4.5)/5)
document.layers[temp].left=Xpos+cnter*Math.sin((currStep+i*4.5)/5)
}
}
else if (document.all)
{
for (i=0;i<ieDiv.all.c.all.length;i++)
{
ieDiv.all.c.all[i].style.top=Ypos+cnter*Math.cos((currStep+i*4.5)/5)
ieDiv.all.c.all[i].style.left=Xpos+cnter*Math.sin((currStep+i*4.5)/5)
}
}
}
if (step > 0.5)
{
step=0.5;
cnter-=8;
}
if (document.layers)
_y=-window.innerWidth;
else if (document.all)
_y=-document.body.clientWidth;
if (cnter <= _y)
{
currStep=0;
step=0.001;
cnter=70;
}
}
roses();
// -->
</SCRIPT>
________________
dollar
<SCRIPT LANGUAGE="JavaScript">
<!--abdelziz_info@yahoo.fr
////votre image
var mon_image='f1.gif" width="42" height="53" height="35';var amount=8;
var cnter=70;
var step;
var currStep = 0;
var Xpos = 0;
var Ypos = 0;
if (document.all)
{
document.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px">')
document.write('<div id="c" style="position:relative">');
for (n=0; n < amount; n++)
document.write('<img src=" '+mon_image+'" style="position:absolute;top:0px;left:0px">')
document.write('</div>')
document.write('</div>')
function iabdelaziz_nfo(){
Xpos = document.body.scrollLeft+event.x-15;
Ypos = document.body.scrollTop+event.y-15;
}
document.onmousemove = iabdelaziz_nfo;
}
else if (document.layers)
{
window.captureEvents(Event.MOUSEMOVE);
for (ns=0; ns < amount; ns++)
document.write("<LAYER NAME='n"+ns+"' LEFT=0 TOP=0><IMG SRC='"+mon_image+"'></LAYER>");
function ntsfleurs(evnt){
Xpos = evnt.pageX-5;
Ypos = evnt.pageY-5;
}
window.onMouseMove = ntsfleurs;
}
function Zinfo(){
if (currStep<0.0550)
step=0.001;
if (document.all)
{
for (i=0;i<ieDiv.all.c.all.length;i++)
{
ieDiv.all.c.all[i].style.top = Ypos+cnter*Math.cos((currStep+i*2.5)/8)*Math.sin((currStep)*150);
ieDiv.all.c.all[i].style.left = Xpos+cnter*Math.sin((currStep+i*2.5)/8)*Math.sin((currStep)*150);
}
}
else if (document.layers)
{
for ( i = 0 ; i < ns ; i++ )
{
var temp="n"+i
document.layers[temp].top = Ypos+cnter*Math.cos((currStep+i*2.5)/8)*Math.sin((currStep)*150);
document.layers[temp].left =Xpos+cnter*Math.sin((currStep+i*2.5)/8)*Math.sin((currStep)*150);
}
}
currStep += step;
setTimeout("Zinfo()", 30);
if (currStep>0.0540)
{
step+=0.002;
if (document.layers)
{
for ( i = 0 ; i < ns ; i++ )
{
var temp="n"+i
document.layers[temp].top =Ypos+cnter*Math.cos((currStep+i*2.5)/8)
document.layers[temp].left=Xpos+cnter*Math.sin((currStep+i*2.5)/8)
}
}
else if (document.all)
{
for (i=0;i<ieDiv.all.c.all.length;i++)
{
ieDiv.all.c.all[i].style.top=Ypos+cnter*Math.cos((currStep+i*2.5)/8)
ieDiv.all.c.all[i].style.left=Xpos+cnter*Math.sin((currStep+i*2.5)/8)
}
}
}
if (step > 1.5)
{
step=1.5;
cnter-=8;
}
if (document.layers)
_y=-window.innerWidth;
else if (document.all)
_y=-document.body.clientWidth;
if (cnter <= _y)
{
currStep=0;
step=0.001;
cnter=70;
}
}
Zinfo();
// -->
</SCRIPT>
________________
dollar
- Les conditions générales d'utilisation du site
| Sujet | Forum |
|---|---|
Sujet posté par gurney1138 le 02/09/2008 à 21h28'25 |
![]() |
Sujet posté par omegatv le 02/09/2008 à 10h34'49 |
![]() |
Réponse postée par jimmy le 31/08/2008 à 20h57'16 |
![]() |
Réponse postée par rer le 28/08/2008 à 11h53'39 |
![]() |
Réponse postée par texass le 28/08/2008 à 08h01'44 |
![]() |
Réponse postée par texass le 28/08/2008 à 08h00'27 |
![]() |
Sujet posté par touret le 25/08/2008 à 10h42'40 |
![]() |
Sujet posté par fulgoni le 23/08/2008 à 17h56'00 |
![]() |
Sujet posté par 1cyril le 19/08/2008 à 20h35'35 |
![]() |
Sujet posté par rer le 19/08/2008 à 17h10'50 |
![]() |