2 Replies Latest reply on Feb 19, 2009 2:59 PM by ricekingusa

    frame number controlled by location

    Nevets321
      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
        • 1. Re: frame number controlled by location
          ricekingusa Level 1
          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)
          • 2. Re: frame number controlled by location
            ricekingusa Level 1
            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.