Link to home
Start Free TrialLog in
Avatar of Jason210
Jason210Flag for Sweden

asked on

ActionScript 2.0: Using a variable to stop a movie clip.

I'm not very good with scripts.

I have a movie clip that has certain key frames, where it can be stopped. You can think of them as indices.

There is a button, which when pressed, shall stop the movie clip at the next index.

I thought to have a variable, somehow associate it with the button, and set it to zero (not pressed) and if pressed, it toggles to 1.

Then, at each index, to check what value the variable has. Something like:

if(_global.knapp = 1)
      stop();

      else
            nextFrame();

Can anyone help me with this?
ASKER CERTIFIED SOLUTION
Avatar of section25
section25

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