Skip navigation
Currently Being Moderated

Noob question - is there next keyframe shortcut?

Jan 27, 2010 7:03 AM

I'm new to Flash and can't find if there is a way to get to the next/previous keyframe on a layer by using something faster than dragging the playhead.

 
Replies
  • Currently Being Moderated
    Jan 27, 2010 7:14 AM   in reply to emil emil

    Simply click on that frame. Or if the frame is "down" the timeline out of view, scroll at bottom of timeline window to frame and click on it. You can reach any frame on any layer anywhere along the timeline, without scrubbing the playhead, unless you want to.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 27, 2010 8:31 AM   in reply to emil emil

    If your tring to move the frame/playhead up and down the timeline with only a keyboard, then select a frame in the timeline and use the  ' . ' ('period' key) to move the play head forward, or the ' , ' ('comma' key) to move the playhead backwards.

     
    |
    Mark as:
  • Currently Being Moderated
    May 26, 2011 1:17 PM   in reply to emil emil

    No. There aren't keyboard shortcuts to automatically skip ahead to the next keyframe or back to the previous keyframe, but I want them too and I think I'll create them using JSFL. With JSFL you can write new functions for the IDE (integrated development environment). They show up on the Commands menu, and you can assign shortcut keys to them. It looks like the following properties and methods can be used to create these functions:

     

    • timeline.layers [an array of the layers on the timeline]
    • timeline.setSelectedLayers()
    • timeline.setSelectedFrames()
    • timeline.getFrameProperty(startFrame) [the previous keyframe]
    • timeline.getFrameProperty(duration)  [the distance between keyframes]

     

    To jump to the previous keyframe, my function would loop through each layer, on the current frame, and look for the greatest startFrame. To jump to the next keyframe, my function would loop through each layer, on the current frame, and look for the smallest startFrame+duration.

     

    I'm not sure when I'll have time to do this but when I do I'll post about it here. Maybe someone will beat me to it.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 18, 2011 1:03 PM   in reply to ToddSlaughter

    Sounds like its needed .. I was just looking for a way to navagate between saved keyframes in the Layer's "Transform" properties.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 31, 2012 10:50 AM   in reply to emil emil

    I finally wrote four simple Commands, which can be linked to keyboard shortcuts:

     

    • Select Next Keyframe on This Layer
    • Select Previous Keyframe on This Layer

     

    • Select Next Keyframe on Any Layer
    • Select Previous Keyframe on Any Layer

     

    Later this week I'll zip them, post them, write instructions, and provide a link.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 31, 2012 12:55 PM   in reply to ToddSlaughter

    Excellent! Thanks ... I was just keyframing and would like to script my Contour Shuttle Xpress buttons to these commands you mention.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 12, 2012 5:00 PM   in reply to emil emil

    Okay, here they are. Four commands.

     

    • Select Next Keyframe on This Layer
    • Select Previous Keyframe on This Layer

     

    • Select Next Keyframe on Any Layer
    • Select Previous Keyframe on Any Layer

     

    Download this zip file, unzip it, and copy the four JSFL files to your Commands folder. Where is your Commands folder? See the note under Create a Command on this page.

     

    At this point the commands will show up on your Commands menu, but to make them truly useful set up keyboard shortcuts for them. Enjoy!

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 1, 2014 4:03 AM   in reply to ToddSlaughter

    This is awesome! I only have one issue and that is how to actually implement it in the command thing. maybe its slightly different in the cc version? i added the files to the command folder (i found 2 though) but i couldnt then find it on my own command list. am i missing something very simple here?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 1, 2014 11:19 PM   in reply to OleCL

    OleCL, I haven't used Flash CC yet, but check these two things.

     

    1. I know that Flash only looks for new files in the Commands folder on startup, so when you add a new command you must restart Flash. You've probably already tried that.
    2. It looks like the location for Commands has changed. See this page.

     

    I hope one or both of these things fixes the problem. My scripts are untested in CC so please let me know what happens!

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 2, 2014 1:51 AM   in reply to ToddSlaughter

    it worked perfectly. I had to unhide my hidden folders so I could get to the right command folder. it absolutly worked brilliantly. I am doing a test for a feature film that is done in flash, and these commands will be of sooo much help.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 2, 2014 11:25 PM   in reply to OleCL

    Fantastic! I'm glad to hear my code is still helping people.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 12, 2014 12:04 PM   in reply to ToddSlaughter

    Yea worked great for me!  Added an implemented.   Main problem for me is that it only seems to consider the 'next keyframe' when you're using classic tweens.  Not sure about shape tweens.      But i mainly use motion tweens, if I split the motion or have a break in the keyframes then it at least goes to those sections.    But with no break, or motion split it will only take me from the beginning frame of the layer to the end, and vice versa.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2014 4:12 PM   in reply to Southpaw14

    Classic tweens were pretty much all my team used so I never noticed that the other tween types don't work. My scripts don't look for tweens; they look for keyframes. It should work fine with shape tweens because those require keyframes too. Unfortunately motion tweens are a different animal, with the little diamonds instead of keyframes. I have no doubt that the code could probably be modified to look for motion tweens, but I can't dedicate the time to it at the moment. I rarely use Flash at all anymore. My JSFL scripts are plain-text, so you already have the source code. Want to take a stab at it? Maybe the community can help out? You just have to find the property that returns a value for a motion tween. I learned JSFL from the book Extending Flash MX 2004. It's nearly ten years old, so there are newer books out there.

     

    A9781590593042-3d_11.png

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 3, 2014 12:38 PM   in reply to ToddSlaughter

    hey Todd, So what do you use now, HTML 5?? Gotta admit my knowledge of Actionscripting certainly isn't what i'd like it to be! I tried inserting a blank keyframe on a Motion-Tween and then right-clicking and using 'Copy Motion as AS3.0' then opened the xml file to see if I could find a label identifier for the Motion Tween. But not having much luck.

     

    I just don't understand your create script enough to even know what to swap in and out... So guess i'm SOL for the moment, unless someone else in the community figures it out.

    Certainly not giving up but gotta learn more about scripting before i can solve this one. Either way thanks for the initial code!

     

    It's still useful when i run classic tweens.    I'm going to look into that book as well, thanks for all the help!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2014 10:34 AM   in reply to Southpaw14

    If memory serves, the new motion tweens didn't exist when Extending Flash MX 2004 was written, so the book doesn't list any attributes of the new-style motion tweens. I say new-style, because what is now a classic tween used to be called a motion tween.

     

    This Adobe reference may help, but remember that anything that references a motion tween may actually be referencing a classic tween, since the JSFL language has to remain backward-compatible. If I was going to modify the code to handle the new-style tweens, I'd use a simple FLA with one classic tween and one motion tween, so that I can see when the code is referencing the wrong type. Make sure the keyframes on your two tweens don't line up, or you might not be able to tell what's happening.

     

    http://help.adobe.com/en_US/flash/cs/extend/flash_cs5_extending.pdf

     

    -HTH-

     
    |
    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