Playing a few frames of a movie in reverse but stopping at set points

I'm very new to flash and even though i'm capable of using the search function and finding posts which look relevant i don't really understand them, most notably i am only familiar with controlling a movie clip with buttons within the movie clip symbol and i get confused by actionscript that seems to do otherwise.
Within a frame on my main stage i have a movie clip symbol of around 125 frames. To control this movie clip symbol i have 4 button symbols within the movie clip symbol. The actionscript code that runs throughout this movie looks like this:
forward_btn.addEventListener(MouseEvent.CLICK,nudgeforward)
function nudgeforward(event:MouseEvent):void
    nextFrame();
backward_btn.addEventListener(MouseEvent.CLICK,nudgebackward)
function nudgebackward(event:MouseEvent):void
    prevFrame();
fastforward_btn.addEventListener(MouseEvent.CLICK,fastforward)
function fastforward(event:MouseEvent):void
    nextFrame();
    play();
On another layer i have stop(); commands on a few select frames. (25,50,75 etc)
This leads to free frame by frame navigation using the buttons forward_btn and backward_btn and if you'd like to move to set points in the animation you can use the fastforward_btn which plays the movie clip forwards until it hits a stop command on one of my chosen frames.
What i'd like to do is have a button that plays the frames backwards until it hits these frames. Is there a combination of while loops and prevFrame() i can use or anything straight forward?

The only thing that comes to mind is to use some modulus math to determine when you are in a frame that should be a stopping point. This would work as long as you have spacing such as you explained...25, 50, 75....  If the currentFrame%25 == 0, then that is a frame to stop in.  As far as the act of keeping things moving, you want to employ an ENTER_FRAME event listener so that it continually processes the prevFrame() call.  As soon as you hit a stopping frame you want to remove that listener.
If the modulus approach wouldn't cut it for all cases, then you could also try to work out some form variable implementation that is assigned the last stopping frame number as you move forward beyond it, using that variable to check against the currentFrame value in the ENTER_FRAME event handler function.

Similar Messages

  • External SWF only plays first few frames then loops

    Help!  I've been working on this for the past few weeks.  Have read everything I can read.  Have tried everything I that has been posted.  And still I can seem to get a simple external swf to load and play using AS3.  I have tried numerous ways with the same results everytime.  Here are a few of the scripts I have tried.  What I would like to have happen is to have one main timeline where I load sequentially external SWF files - there is no interaction required - it is a presentation that includes video and other Flash SWF files that I have created.  Now I just want them all in one flash file.  I had no problems with AS2 doing this, but I'm sure having fits with AS3!  please HELP - my deadline is this week and I'm not even close to being ready.  THANKS!
    var myLoader:Loader = new Loader();                   
    var url:URLRequest = new URLRequest("script1_3.swf");                                  
    addChild(myLoader);
    //var begin:MovieClip;
    //var beginLoader:Loader = new Loader();
    //beginLoader.contentLoaderInfo.addEventListener(Event.INIT, beginLoading);
    //beginLoader.load( new URLRequest("start1_3.swf") );
    //function beginLoading(evt:Event):void {
    //thisMovieClip = MovieClip(beginLoader.content);
    //stage.addChild(thisMovieClip);
    //thisMovieClip.play();
    //import flash.display.*;
    //import flash.net.URLRequest;
    //import flash.events.Event;
    //var _swfLoader1:Loader;
    //var _swfContent1:MovieClip;
    //loadSWF1("script1_3.swf");
    //play();
    //function loadSWF1(path:String):void {
    //   var _req1:URLRequest = new URLRequest();
    //   _req1.url = path;
    //  _swfLoader1 = new Loader();
    // setupListeners1(_swfLoader1.contentLoaderInfo);
    //  _swfLoader1.load(_req1);
    //function setupListeners1(dispatcher1:IEventDispatcher):void {
    //  dispatcher1.addEventListener(Event.COMPLETE, addSWF1);
      // dispatcher1.addEventListener(ProgressEvent.PROGRESS, preloadSWF1);
    //function preloadSWF1(event:ProgressEvent):void {
    //   var _perc:int = (event.bytesLoaded / event.bytesTotal) * 100;
    //swfPreloader1.percentTF.text = _perc + "%";
    //function addSWF1(event:Event):void {
    /// event.target.removeEventListener(Event.COMPLETE, addSWF1);
    //  event.target.removeEventListener(ProgressEvent.PROGRESS, preloadSWF1);
    //  _swfContent1 = event.target.content;
    // _swfContent1.addEventListener("close", unloadSWF1);
    // addChild(_swfContent1);
    //function unloadSWF1(event:Event):void {
    //  _swfLoader1.unloadAndStop();
    //removeChild(_swfContent1);
    //  _swfContent1 = null;
    Best Wishes
    Deborah

    Believe me, I'm feeling the pressure!!!  I sent a screen shot and it got kicked back!!!! 
    here is the code I'm using in the main time line:
    var myLoader:Loader = new Loader();                    
    var url:URLRequest = new URLRequest("script1_3.swf");  // THIS can be any SWF file - same results
    myLoader.load(url);                                    
    addChild(myLoader);  
    The only thing that is in the main time line before this is a page roll over effect component - and if I remove that I have the same problem!  I'm sorry, I don't know what else to provide you without giving you my fla files which I tried to send and they were kicked back!!!
    HELP!

  • FMLE 3.2 capturing fewer frames after 8 hours of recording but no 'dropped frames' reported

    A client of ours is capturing 20x live streams via FMLECMD directly to F4V files (15min chunks) for ~21 hours a day. They're finding that after approx 8 hours of recording, FMLE gradually reduces the number of frames it's recording & the resulting files have very choppy playback (no dropped frames are reported). It eventually crashes on most of the machines before completing a day's work. Some machines also display a C++ error message on crash whereas others just freeze up.
    One PC was set to capture a blank input & doesn’t exhibit this behaviour ie captures at the initial/specified framerate even 20hrs in. Please see the profile xml below.
    The spec of the capture workstations is:
    HP Z200 i3 i3-540/3.06GHz/2GB/160GB Hard Drive/DVD-Writer/ Intel Graphics Media Accelerator HD/Windows 7 Professional
    Blackmagic Design Intensity Pro in each, running Adobe Flash Media Live Encoder 3.2 (scripted to launch via CLI with no preview). These PCs are fresh out-of-the-box & have never been online.
    As an immediate/short-term workaround, we've set a restart interval for FMLE of 5 hours but this compromises the recordings as the stop/start process obviously results in a loss of recording time & requires manual file renaming. Please note, none of the machines are streaming - just capturing locally to F4V.
    --- Profile XML ---
    <?xml version="1.0" encoding="UTF-16"?>
    <flashmedialiveencoder_profile>
    <preset>
    <name>Custom</name>
    <description></description>
    </preset>
    <capture>
    <video>
    <device>Decklink Video Capture</device>
    <crossbar_input>2</crossbar_input>
    <frame_rate>25.00</frame_rate>
    <size>
    <width>720</width>
    <height>576</height>
    </size>
    </video>
    <audio>
    <device>Decklink Audio Capture</device>
    <crossbar_input>0</crossbar_input>
    <sample_rate>22050</sample_rate>
    <channels>1</channels>
    <input_volume>75</input_volume>
    </audio>
    <timecode>
    <frame_rate>5</frame_rate>
    <systemtimecode>true</systemtimecode>
    <devicetimecode>
    <enable>false</enable>
    <vertical_line_no>16</vertical_line_no>
    <burn>false</burn>
    <row>Bottom</row>
    <column>Left</column>
    </devicetimecode>
    </timecode>
    </capture>
    <process>
    <video>
    <preserve_aspect></preserve_aspect>
    </video>
    </process>
    <encode>
    <video>
    <format>H.264</format>
    <datarate>200;</datarate>
    <outputsize>720x576;</outputsize>
    <advanced>
    <profile>Main</profile>
    <level>3.0</level>
    <keyframe_frequency>5 Seconds</keyframe_frequency>
    </advanced>
    <autoadjust>
    <enable>false</enable>
    <maxbuffersize>1</maxbuffersize>
    <dropframes>
    <enable>false</enable>
    </dropframes>
    <degradequality>
    <enable>false</enable>
    <minvideobitrate></minvideobitrate>
    <preservepfq>false</preservepfq>
    </degradequality>
    </autoadjust>
    </video>
    <audio>
    <format>MP3</format>
    <datarate>48</datarate>
    </audio>
    </encode>
    <restartinterval>
    <days>1</days>
    <hours>5</hours>
    <minutes>00</minutes>
    </restartinterval>
    <reconnectinterval>
    <attempts></attempts>
    <interval></interval>
    </reconnectinterval>
    <output>
    <file>
    <limitbysize>
    <enable>false</enable>
    <size>10</size>
    </limitbysize>
    <limitbyduration>
    <enable>true</enable>
    <hours>0</hours>
    <minutes>15</minutes>
    </limitbyduration>
    <path>C:\VideoServer\XXX\XXXXX.f4v</path>
    </file>
    </output>
    <metadata>
    <entry>
    <key>author</key>
    <value></value>
    </entry>
    <entry>
    <key>copyright</key>
    <value></value>
    </entry>
    <entry>
    <key>description</key>
    <value></value>
    </entry>
    <entry>
    <key>keywords</key>
    <value></value>
    </entry>
    <entry>
    <key>rating</key>
    <value></value>
    </entry>
    <entry>
    <key>title</key>
    <value></value>
    </entry>
    </metadata>
    <log>
    <level>100</level>
    <directory>C:\logs</directory>
    </log>
    </flashmedialiveencoder_profile>

    The video framerate is 25fps. Timecode is embedded every 5 frames.
    Capture starts at 25fps & continues capturing at that rate until around 8
    hours. After which it gradually reduces the captured framerate till it
    crashes or completes. This behaviour is exhibited on all 20 Pcs. The CLI
    reports no dropped frames at all.

  • My shuffle only plays a few songs and then stops. ihave to hit shuffle again to to get it to shuffe afew more song. any ideas how to fix would be appreciated

    myipod touch will only play a few songs at a time on shuufle then stop. i have to restart the shuffle to get some more songs to play then it will stop again.any help woulp be appreciated. songs that i have purchased from itunes seem not to be affected just the ones i added from my cds. yhank you

    clawnscratch wrote:
    Shows the following information:
    Kind: AAC audio file
    Size: 3.3 MB ............ (varies per song)
    Bit Rate: 128kbps
    Sample Rate: 44.100 kHz
    Does any of this mean mean anything regarding the problem?
    All it shows is that the tracks SHOULD be OK.
    Next thing to try is to restore her shuffle in iTunes and reload.

  • Go to frame, play a few then load movie?

    I am working on a continously playing banner that has 5
    different movies. there is a navigation bar below with 5 buttons,
    one for each movie. There is also a puase/play button so you can
    stop the animation and resume it. What I cant figure out is how to
    actionscript the buttons. I need them to jump to a particular frame
    in the current movie, play a specific set of frames (the outro
    animation sequence), then load the appropriate movie.
    on (release) {
    gotoAndPlay(series of frames???);
    loadMovie("movie2.swf", 1);
    Any suggestions? Thanks!

    I'm still having trouble grokking it...... Ok so I am
    watching the animation, Movie #1 ends and loads Movie #2 and I am
    on Movie #1 but I decide I want to jump to movie #4 (there are 5
    movies altogether), I click on the button for Movie 4, it then
    jumps to the frames I labelled to play the outro, then loads Movie
    4.
    So in one scenario I can watch all 5 movies in sequence. At
    the end of each movie is the frame:
    var holder_mcl:MovieClipLoader = new MovieClipLoader();
    holder_mc.clear();
    holder_mcl.loadClip("your_file.swf", holder_mc);
    where "your_file.swf" is the next movie in the sequence e.g.
    movie2.swf at the end of movie1's timeline.
    In the scenario I descfribed above where I want to skip Movie
    #3 and jump to movie #4, I use the button code:
    on(release){
    holder_mc.clear();
    gotoAndPlay("movie2outro");
    to play my outro, but if I am currently in movie #2, where
    loading movie3 is called to load at its end of that timeline, how
    can I load movie #4 in a frame in the same timeline?
    You can see something similar on the home page for Micron
    http://www.micron.com. The big
    difference is that my "slide show" plays continuosly (will
    autonmatically go to the next "slide") whereas you have to choose a
    link on the bottom on the the micron.com one to go to another
    slide.
    Thanks so much for your help!

  • Exported movies only have first few frames of audio

    Hello everyone,
    I've encountered a strange new problem with Premiere Pro CC on the PC.
    For some reason, every time I export a movie now, no matter the format, it only contains the first few frames of audio then drops out everything else immediately afterward. The video tends to play fine, but the audio is just completely missing after a few frames.
    I feel as though it's some sort of muxing issue, but I do not understand why it is happening
    1. I have not had any major software updates, and my hardware has been the same.
    2. I have tried exporting with and without GPU acceleration.
    3. Just three days ago, on April 4, everything was working fine.
    4. When I open the project on my MacBook Pro, everything exports just fine.
    5. The audio always plays just fine when playing it inside the project, both on my PC and my MacBook Pro.
    6. A seemingly related issue is that some videos have been randomly failing exports in Media Encoder (this has never happened when exporting directly from PrPro, though). The error message I get is:
    - Encoding Time: 00:04:18
    04/07/2014 03:21:12 AM : Encoding Failed
    A low-level exception occurred in: H.264 (Exporter)
    Export Error
    Error compiling movie.
    Unknown error.
    Does this have something to do with a recent PC Premiere Pro update that I was not aware of?
    Here are my specs:
    Windows 7 Ultimate
    Intel Core2 Quad CPUQ 9550 2.83 ghz
    8 gigs of ram
    NVIDIA Geforce GTX 650
    Audio is going through the motherboard, though I also have NVIDIA High Definition Audio and NVIDIA Virtual Audio Device (Wave Extensible) (WDM) installed.
    I am also currently working off of external G-DRIVEs.
    Anyone have any idea why this could be happening? This has been a very annoying problem.
    I am going to try reinstalling PrPro to see if that will fix things.

    I have viewed these files in Windows Media Player, VLC, Quicktime, and Media Player Classic. All have the exact same issue. They also have the exact same issue when played on a different computer (a MacBook Pro) with the same players. I have tried exporting in H.264 (.mp4 container) and MPEG2, same issue. They also have the same issue when I import the file I exported back into PrPro to play it back in there.
    When I export on my MacBook Pro with Premiere Pro, everything works fine. This leads me to believe that it's either something wrong with the installation on my PC's version of PrPro or some hardware/software is interacting with my version of PrPro strangely, the latter of which I think is somewhat unlikely since it was working fine just three days before this issue came up.
    When I re-installed PrPro, it gave me an error saying some optional components could not be installed. I looked into it, and it said that it could not install Visual Basic C++ 2008. which is fine since I already have it installed (both 2008 and 2010, and x86 and x64 versions of both).
    I will try exporting one more time to see if the latest update today has somehow resolved the issue.

  • When watching my Apple TV (3rd gen) the picture jumps a few frame every few seconds, this happens when I rent a film or play back from my new Mac Pro, my Wifi is the Airport Express.

    When watching my Apple TV (3rd gen) the picture jumps a few frames every few seconds, this happens when I rent a film or play back from my new Mac Pro, my Wifi is the Airport Express.

    These may be different issues, but lets look at rentals first.
    Poor motion can result from mismatched output. If your source is 24 or 30 fps you should set the output of the Apple TV to 60 Hz, for 25 fps content use 50 Hz.
    Additionally motion software on the TV itself can cause the picture to jump, check your TV settings and turn off any motion settings in use,

  • I copied several MOV files to a CD. When I play them from the CD the video is fine but the audio works fine for the first few seconds then stops (using Qicktime Player 7.7.1.  Everything works fine if I use VLC Media Player. Does anyone have any idea why?

    I copied several MOV files to a CD. When I play them from the CD the video is fine but the audio works fine for the first few seconds then stops (using Qicktime Player 7.7.1.  Everything works fine if I use VLC Media Player. Does anyone have any idea why?

    My purpose for copying to a CD or DVD is so that I can make copies and send to friends and relatives. What is the best way to get these files on a CD/DVD with the right codecs?
    The easiest thing to do is to simply tell your friends and relatives to copy the files to their local hard drive before playing them. Your basic problem is that data discs have a limited real time transfer rate. Since you say VLC plays the files fine, I might suspect its player is likely buffering the data while the QT 7 Player is not.
    Data discs made for playback directly from the CD or DVD are normally encoded using MPEG-4/AVC (H.264) video with AAC audio. This is a modern codec which has specific settings to re-package the data (i.e., must be encoded using the multipass option and then select the "optimize for CD/DVD" option).

  • I have several purchased movies on my itunes and several of them stop playing a few chapters in

    I have several pirchased movies on my itunes and several of them stop playing a few chapters in. Cant figure out whats wrong, i

    Yes.  It looked like the added songs were from the “cloud” although I’ve never used that and only manage my music from iTunes on my iMac.  After I turned Show All Music off, the songs seemed to go away, except the first two, they are still on my phone and I can’t get rid of them.  I did the same with my wifes phone and all the “cloud” songs went away.  Ther were about 400 of them!
    So, how do I get rid of the two songs, and why would these songs be pushed to my phone??  I installed OS7 yesterday.
    And if i can bother you for one more thing.....i can't seem to remove one of the cities i had originally added to the weather app.  It looks easy to add, but no idea how to delete.
    Thanks for the help,
    Rick,

  • How do you move a clip just a few frames relative to another clip?

    I am having a lot of trouble trying to move video and audio clips in the timeline. One key seems to be to use the Option key to select both video and audio. If you don't use Option, you only get the video or the audio.
    At present I have a clip on V1 and A1, A2, and another clip on V2, A3,A4. The videos and audio of the 2 clips overlap and I am trying to move the clip on V1,A1,A2 relative to the other clip so that the audio waveforms line up and I can get a contijuous sequence. I can get the overlap fairly close but not close enough. Is there a way to move a clip just one or two frames? Everytime I move the V1 clip, the playhead jumps to the end of the clip.
    What am I doing wrong?

    I had a lot of trouble trying to move audio and video tracks together. The clip tended to be copied so often and the playhead would jump so I didn't know where I was or what had happened. When just the audio is moved, this doesn't seem to happen. For large moves, I just drag the audio to within a few frames or so of sync. Then I use + - for the last few frames and to check that sync is not off by a whole frame. Usually there's a little bit of out-of-sync audio but it either disappears on playback or it's not noticable.
    I also adjusted the mouse characteristics with respect to speed of double-clicking and this seems to have helped.

  • Help converting a frame of a movie to a jpeg

    Please excuse me for being quite limited in my tech and computer knowledge.  I am wishing to take a frame from a video
    that was mistakenly took instead of a photo with my iPhone. I am wondering if it is possible to convert a few frames of different videos to jpeg photos?
    I would like to use them on a Christmas Photo Card.  I have played with the computer for 5 hours and haven't gotten task accomplished. 
    The devices and applications I am using are:  MacBook Pro OSX Version 10.9.5; iPhone 5; Quick Time Player 10.3; iMovie 10.0.3; and iPhoto 9.5.1.
    If you respond, please do so knowing that I am quite limited in my knowledge of the various applications so watered down explanations are desired!
    Thank you.

    Aside from the method, you need to know that the result would most likely not be what you would expect quality wise; as a movie is a totally different file format, it would have to convert the format from a video to a .jpg and the quality will suffer. Not sure it would be good enough to produce a Christmas card.
    I'd consider opening it in either iMovie or QT Player, playing it to the spot you want, stop it, and then take a screenshot - if your screen/movie display window is large enough, the resulting screenshot should be and the quality should be exactly as you see it. As screenshots are usually saved as a .png, you can simply open it in Preview and then save it as a .jpg.

  • CTI in P-Pro jumps backwards while playing every few seconds

    Premier Pro CC 2014
    Asus G760JM
    Win 8.1
    i7-4700HQ 2.4ghz, 64 bit
    8gb RAM
    During playback in the preview window as well as in the timeline, the CTI jumps back a few frames, and continues to play from there. It is H.264 in a .mov container, and I've played this footage before. I played it in VLC to make sure the footage was ok, and no prob. Help!

    Trash your Preferences and plugin cache (reboot while holding down shift + alt)
    You may also want to trash the Media cache database.

  • How do I delete a few frames of my image from the beginning?

    There are a few frames of my image in front of the first title. I don't know how to delete these frames. I want my title to start without anything in front of it.
    I'm using PrE 11.
    Thanks to everyone who told me about viewing a video without the Adobe Flash Player.  

    Tommy,
    To remove a single Frame, I would zoom the Timeline to the max. Then, in that Clip, find the Frame that you wish to remove. With the CTI (Current Time Indicator at the last good Frame, hover the Cursor over that spot, until the Scissors Tool pops up (PrE 11 & 12), then click to Cut that Clip. Then, use the right arrow key, to move 1 Frame to the right, and perform the same operation, as above with the Scissors Tool. That will Cut your Clip on either side of that Frame. Rt-click on that Frame, choosing Delete & Close Gap. What version of PrE are you using? ATR, in Reply #2 covered the Scissors Tool, so there should be no difference here - other than placing the CTI on either side of that Frame.
    Note: there are considerations to using that method. I assume that you also want to Delete the Video & Audio for that Frame. If they are linked, then the Scissors Tool should Cut both. If they are not linked, you will probably need to do that for both the Video & Audio. Then, if you have Video, or Audio above/below that Frame, you will not be able to automatically Close Gap. Just something to plan for.
    Good luck, and hope that helps,
    Hunt

  • MAKE EMBEDDED QUICKTIME WITH PLAY BUTTON IN FRAME

    Hello does anyone know how to make an embed quicktime with a play button in the video frame so it has a poster frame and a button on it and wont play until it is clicked on

    It's known as a poster movie. The first file acts as either a placeholder (or a button) that is linked to the second file.
    You can use any image format to create your click to play "button" and add it to a single frame from your movie or to another image. Size this 16 pixels higher than your movie source file if you plan on showing the movie controller and save it as poster.mov.
    Your html code will have this poster movie load and nothing further will happen until your visitor clicks on it. Once clicked the second .mov file will begin downloading and then playing. You can also use this poster movie technique to load a second movie directly in the QuickTime Player app.
    http://homepage.mac.com/kkirkster/C/
    One of mine. Take a look at the page source to understand the "href" and "target" tags.

  • Selecting a frame in a movie clip

    Hi,
    A little help is required.
    I have a movie clip, that i need to display on all frames on
    the main timeline. I have animated the movie clip on its own
    timeline. However I don't want the movie clip to play intially when
    i load the movie. I only want it to play when a button is selected.
    Can anyone please help me to get the movie clip to only play once a
    button is clicked.
    Thanks

    I have all my movies etc working so that each button plays a
    separate movie clip.
    Within each movie I have start and stops mid way through the
    movie.
    What i want to happen is, when a button is clicked once, i
    want it to play frame 2-10 then when it is clicked again I want it
    to play 11-20. How do I make it recognise its a second click. I was
    thinking of using the boolean feature, but i'm not sure how this
    would be used.
    Can anyone help point me in the right direction?

Maybe you are looking for

  • How to Colorize your layers

    Here is a simple example in how to Colorize your layers in two different ways. First, duplicate the layer you would like to adjust. To duplicate the layer, select the layer in the Layer palette. Then choose Layer > Duplicate Layer. You can click the

  • Components download

    Hi all, Where do you download components in zip format. Thanks, Ragaven

  • Screen Share - Change what to display & video quality

    Hi LCSS Team, I have been playing around with screen share and have it working in collaborative (both ends can share/control their screens). Upon initial selection of deskop/app/window, is there a way to allow users to change what to display without

  • Swap project and event

    This is greyed out in the windo menu and will no longer toglgle Please advise I have tried everything even reinstalled Imovies Ruger12

  • [ N97 mini ] screen dead

    Hello. I hope I'm in the right section.  Here is the problem.  When I turn on the phone, the lights from the buttons on top, and QWERTY light up, the screen doesn't. I know for sure that: Top buttons may work... They do the sound when I press them, s