FORUMS: list search recent posts

Flash Floating Seed Effect - Need help with this effect... looks right, but no go...

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
HalifaxMediaManiac2334
Flash Floating Seed Effect - Need help with this effect... looks right, but no go...
on Jun 5, 2006 at 8:37:18 pm

Hello,

I'm trying to create a nice effect for a website I am creating for a client. I'm looking for some actionscript that wil duplicate a movie clip of a Dandelion Seed and float it accross the stage as if blown by the wind. Right now I am trying to get the actionscript working for the wind effect and have come up with this so far:

function deg2rad (degrees){
return deg2rad * Math.PI/180;
}
seed.startx = 10;
seed.endx = 350;
seed.starty = 800;
seed._x = startx;
seed._y = starty;
seed.xinc = 16;
seed.yadj = 8;
seed.xadj = 8;

seed.onEnterFrame = function(){
if (seed._x < seed.endx){
seed._x += seed.xinc + (xadj * Math.sin(deg2rad(_x)))
seed._y += seed.yadj * Math.sin (deg2rad(seed._x));
}
}

Now... all the code seems right but I'm not getting any movement from left to right on the screen. I'll worry about the duplication later after I get the motion working...

If anyone can help... I've got a deadline to make... lol

Thanks,



Return to posts index

Matt Klundt
Re: Flash Floating Seed Effect - Need help with this effect... looks right, but no go...
on Jun 6, 2006 at 1:57:12 pm

seed._x += seed.xinc + (xadj * Math.sin(deg2rad(_x)))

This line is missing some pathing. Try:

seed._x += seed.xinc + (seed.xadj * Math.sin(deg2rad(seed._x)))

Matt
--------------------
http://www.mcquillendesign.com
http://www.mattfoxgames.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]