Skip to main content
Participant
February 19, 2009
Question

frame number controlled by location

  • February 19, 2009
  • 1 reply
  • 258 views
I have a movie that I want to play the frame number based on the y location of an object gotoAndStop(slider._y);
the y direction can move the same number as there are frames of the movie. it is a movie on a frame that I am trying to control, so I was thinking it would have to look like:
_root.movies.gotoAndPlay(slider._y);
I want it to move the frame number when the object moves, so not on(release)

any help would be great
This topic has been closed for replies.

1 reply

Known Participant
February 19, 2009
When you say you have a movie, I take it you mean movie clip.

In the movie clip:
Make a layer for actionscript that extends throughout the whole movie clip.
in actionscript type stop();

on the stage:
you want to put an instance of the movie clip you created onto the stage & give it an instance name
create a movie clip for your slider object.
//you get to figure out the listener objects & how to do that
when the slider object is moved, call [ your movie ].gotoAndStop(frame:Object)
Known Participant
February 19, 2009
Well, i got bored quick so i did a ghetto version of it. here is the code in my main stage.
My screen height is 400px & my movie clip was 80 frames, so I did some easy math to make it work out.