Link to home
Start Free TrialLog in
Avatar of alexnexus
alexnexus

asked on

I have a movieClip that changes position using code. How can control its speed also?

This is the code that goes on the movieClip:

onClipEvent (enterFrame) {
 _x = random(551);
 _alpha = random(101);
 }

I just need to control its "position changing" speed, by changing a single value/variable.
I need the extra code!


Thanks
alex nexus
ASKER CERTIFIED SOLUTION
Avatar of FLAASHER
FLAASHER
Flag of Saudi Arabia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alexnexus
alexnexus

ASKER

Hi FLAASHER!

It worked!
I tweak it a bit to make it work on a movieClip event.

The code ended up looking like this:

onClipEvent (load) {
      function flaasher() {
            _x = random(551);
            _alpha = random(101);
      }
      setInterval(this, "flaasher", 100);
}

Thanks!
alex nexus
U welcome



Thanks for the points











FLAASHER