Skip navigation
Adrock218
Currently Being Moderated

Moving forwards and backwards through keyframes

Aug 14, 2012 3:44 AM

Tags: #actionscript #flash_cs5.5

Hi I was wanting to be able to use a slider on a webpage to be able to move forwards and backwards through the keyframes. I have 10 images, each on different keyframes and I want to be able to move from the first image to the last image using an on-screen, mouse controlled slider, similar to the way you move along the timeline in the program itself. I have found a number of tutorials on the "component slider" however they only refer to changing values such as the size of an object or volume, and not moving through the keyframes which is what I am after. This is for a University assignment and any help would be greatly appreciated.
Cheers!

 
Replies
  • kglad
    62,161 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 14, 2012 3:55 AM   in reply to Adrock218

    there's not much to do if you've followed any of the slider tutorials.  just associate your slider's values with your keyframes.

     

    for example, you could use an array of keyframes and use a slider with values from 0 to 9:

     

    var keyframeA:Array=["yourfirstframelabel","secondlabel",...];

     

    // in your slider listener:

     

    gotoAndStop(keyframeA[yourslider.value]);

     
    |
    Mark as:
  • kglad
    62,161 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 14, 2012 8:20 AM   in reply to Adrock218

    you're welcome.

     

    p.s.  please mark helpful/correct responses.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points