play the animation in reverse

Hey. Im a noob total to actionscript and flash, so please explain to me as I m is seven years old!

I made a flash banner that includes a videofile and some vector animations. I would like this banner to play PAR 1 last fram and then return play back in order to frame 1 infinite (whole film should do what is). I can not simply reverse the images however, because of the videofile (at least I think?) - so Im guessing I need to write some sort of script that tells the movie how to play. Any ideas on how to achieve this?

Thank you

first image:

import flash.events.Event;

var boolVal = true;

addEventListener (Event.ENTER_FRAME, fEnter);

function fEnter(evt:Event)
{
If (boolVal)
{
nextFrame();
}
on the other
{
prevFrame();
}
}

and the last picture:

var boolVal = false;

Tags: Adobe Animate

Similar Questions

  • How can I play an animation in reverse only if the symbol that contains the animation is visible? If the symbol is not visible have the trigger is no longer target this symbol?

    Hello

    I have a button made two functions at the same time. He plays animation a symbol upside down (to hide) and she slides an element. the animation of symbols is triggered by another button (which is irrelevant). So my problem is that if the animation has been triggered, first that when the button is pressed the animation plays in the sense opposite, the symbol is hidden and everything is fine, but if a helping hand as the button before the animation starts to blink in the opposite direction. SO, how can I learn to play the opposite during the animation of the symbol has run. I know that it is an if / else statement but I have no idea how to do it.

    THX

    This is a close case of your question:

    If () sym.getSymbol("Symbol1").$("Text"). is (': visible ') ( ) { () sym.getSymbol("Symbol1").playReverse;} }

    else { } sym.getSymbol("Symbol1").play (); }

    Demonstration ==> isVisible.zip - Box files

  • How to play the animation speed in photoshop cs6?

    I use photoshop cs6 extended edition to make a scenario animation. The problem is that when I press the play button, the pace on the drops left background and the animation plays slowly. I don't want to export to a video, whenever I have check my work. I can't seem to find an answer to this anywhere. Please help me find a solution.

    Normally, you have to play at least twice so that it can accumulate in the cache.

  • How can I get lively edge to play the Animation on the mouse once and then not play again if the mouse is located in?

    Hello

    I ache to get an animation playing once on a mouse pointer (mouse over / mouse enter) and not play again if the mouse is flown again. If I move the mouse over the animation plays perfectly, however when I move the mouse again it will restart the animation.

    You can try putting a trigger at the end of the animation timeline that mask the animation and shows an image of the poster. Or use an invisible box on top of the animation that controls your mouse over the event. Then have a trigger at the end of your animation that hides this dialog.

  • Play the animation not loop. GIF or avi?

    I did a little not looping clip I want to play on click of a button, but do not know if I have to import it as animated gif or avi. A post I read stated that the playbook does not yet fully support video playback.

    P.S. using Burrito

    If you stay with the GIF option, there is a player AS3 GIF here: http://www.bytearray.org/?p=95

  • Restart the animation in Createjs

    Hello

    I have a movie exported from Flash CC with 8 images. Each image has a chronology and clips that are also animations.

    When I promotion from one image to another, the first time, everything works fine. But if I come back in a framework that has already been played, the animation restarts, as well as internal movieclips.

    They are all in position totalFrames. I can't restart the framework as you normally would in Flash.

    No idea how to do this?

    Thank you.

    Yes, unfortunately, that's how things work. You need to add code to reset each movieclip. When you view a new movieclip, throw in a gotoAndPlay (0);

  • Button next to a symbol, the animation timeline and after 3s playReverse

    Hello

    I have a button within a symbol. When I click on the button I want to start the animation on the timeline.

    It wil start to a second. But if the timeline is at the end of 3 seconds I want to play the animation back (if you click on the same button).

    I tried with the code below, but it starts at 1 second.

    var pos = sym.getPosition ().

    If (pos < = '1000') {}

    sym.getComposition () .getStage () .play (1001);

    }

    ElseIf (pos < = "3000") {}

    sym.getComposition () .getStage () .playReverse (2999).

    }

    Can someone help me with the code?

    Thank you!

    I'll be back after an extended power failure.

    I understand that you want a button that reacts to the position of the timeline.

    mainTimeline var = sym.getComposition () .getStage ();

    If (mainTimeline.getPosition)<= 2000)="">

    If (mainTimeline.getPosition () == 3000) mainTimeline.playReverse ();

    I've updated the demo file: https://app.box.com/s/oaj19a3f34a0c0io9tpk

  • play an animation and before moving on to a scene.

    Hello everyone, I'm new to Flash and I have a simple question:

    I created a game. Let's say I have a screen instructions and a game intro screen. The instructions screen has a back button that has a mouse more/click/out animation. I can get the mouse and more functionality, but so far all work that I could do when clicking the back button is to jump straight back to the intro of the game, without playing the animation click first. How to play the animation, and THEN go to a scene? Thank you. Here is my code in my "back" button symbol:

    import flash.events.MouseEvent;

    backButton.addEventListener (MouseEvent.MOUSE_OVER, handleMouseOver);

    backButton.addEventListener (MouseEvent.CLICK, handleMouseClick);

    backButton.addEventListener (MouseEvent.MOUSE_OUT, handleMouseOut);

    function handleMouseOver(e:MouseEvent) {}

    gotoAndPlay ("over")

    }

    function handleMouseClick(e:MouseEvent) {}

    gotoAndPlay ("click");

    }

    function handleMouseOut(e:MouseEvent) {}

    gotoAndPlay ("out")

    }

    On the Instructions maintimeline scene, here is my code:

    Stop();

    import flash.events.MouseEvent;

    backButton.addEventListener (MouseEvent.CLICK, handleBackClick)

    playButton.addEventListener (MouseEvent.CLICK, handlePlayClick)

    function handleBackClick(e:MouseEvent):void {}

    gotoAndplay (1, "Gameintro");

    }

    function handlePlayClick(e:MouseEvent):void {}

    gotoAndPlay (1, "Gameplay")

    }

    You need the call to the handleBackClick function to be triggered by the end of the animation of gotoAndPlay ("click"), is not clicking on it.

  • How to loop a section of sounds and animation not at the beginning of the animation?

    Hello, I'm a total noob to Flash in the hope of doing something quickly reliatively. I'm using version Flash Professional CS6 track for this purpose. However, I am a little unsure of how to work this loop button. What I'm trying to do is create a small interactive game. I would like to have the opening be an animation of title which plays only once and then comes to a music section and 2 buttons ('play' and 'how to play') that will make a loop until the player decides which to click. When I used the loop tool, it created a section for me to drag around. I dragged to include sound and animation of the section I want to loop. However, when I tried to play the animation at the beginning, she skipped the opening and went straight to the loop part. In addition, there not completely loop. I'm quite inexperienced and still learning, how can I get the Flash to play at first and then search the section loop and have it loop continuously until someone pushes the button? None of the tutorials that I've seen so far has on this topic and if it involves entering code then I am at a loss. Thanks for any help.

    What you seem to be describing could be done using a movieclip for animation in a loop.  Create a movieclip symbol and build this animation loop with the sound on the inside.  Plavece while, in a framework at the end of the animation of a master schedule.  If you place a stop() command in this framework as well then stop the main timeline and animation in a loop (movieclip) is expected to play on its own at all times.

  • How the animation to avoid the scene empty as soon as the 2nd loop from the loop

    Hello

    I've created a banner in Flash CS5. It starts with an empty stage and an image interpolation staging of the right edge. The image remains on the scene for a few seconds and a 2nd image interpolations on stage and completely covers the 1st image. Similarly, 3rd and 4th picture cover the previous images.

    When I play the animation, before the 1st image covers the stage, there is nothing before he does. When the 2nd starts interpolation of the scene, the 1st image is always there. Similarly for the 3rd and 4th images, there is an image covering the scene. But after the 1st loop is completed, the animation goes back to an empty Stadium and the 1st image begins tweeing the staging.

    I like to keep the 4th image on the stage while the 1st image begins tweeing the staging. I recently started using Flash and am not very good with the program or ActionScript so would greatly appreciate if someone can tell me how I can achieve.

    Thank you
    Cast A

    Process the first image as your 5th image as well and make tween above image 4.  When it is in place, use a gotoAndPlay command (?) to go back to the image (?) where the 1st image is in place in the first part of the timeline

  • Flatten the Animation, combining keyframes, something

    Hello world

    Basically I have a graphic symbol that animates along a path (in a MovieClip). Rather than play the animation, I want the entire animation to appear at the same time. The only way I can think to do is to convert a bunch of animation keyframes, copy and paste one on the other (is there a quick way to combine key frames?).

    Thanks in advance and please let me know if that makes sense.

    Right-click of your movieclip in the library, click on the link, export of ticks for actionscript and assign a class, for example MC.  When your want your movieclip flattened to appear, you can use:

    flattenF ("MC");

    function flattenF(classS:String):void {}

    var classRef:Class=Class(getDefinitionByName(classS));

    var mc: * = new classRef();

    MC. Stop();

    addChild (mc);

    for (var i: uint = 2; I have<>

    var mc: * = new classRef();

    mc.gotoAndStop (i);

    addChild (mc);

    }

    }

  • Question of the animation...

    Hi guys.

    I'm doing a simple animation. I want to fade and resize a list inside creationcomplete. My problem is that I still see the flash before the beginning of the animation of the element element. In other Word, the user will see the element appear 1 second-> then fade and resize animation. I was hoping someone here could help me with this. Thank you...

    my code.

    AS:

    protected function compList_creationCompleteHandler(event:FlexEvent):void

    {

    compinfoResult.token = getCompList.compinfo ();

    compinfoResult.addEventListener (ResultEvent.RESULT, completeLoading);

    function completeLoading(event:ResultEvent):void {}

    fadeList.play ();   the animation is triggered when the list gets the result of the server...

    scaleList.play ();

    }

    }

    MXML

    < s:Scale id = "scaleList" scaleXFrom = '0' scaleXTo = '1' scaleYFrom = "0".

    scaleYTo = "1" duration = "500" target = "{compList}" / >

    < s: bland id "fadeList" alphaFrom = alphaTo = "0" = "1" target = "{compList}" / >

    < s:List id = "compList.

    width = "280".

    = "560" height

    x="0"

    y="0"

    alpha = '0 '.

    creationComplete = "compList_creationCompleteHandler (event)" "

    itemRenderer = "itemRenderer.compListItemRenderer"

    Exchange = "compList_changeHandler (event)" / >

    Hello

    You can try something like this, obviously setting the properties that you want to use

    David.

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" creationComplete = minHeight "application1_creationCompleteHandler (event)" > "

    Import mx.collections.XMLListCollection;

    Import mx.events.FlexEvent;

    Import mx.rpc.events.FaultEvent;

    Import mx.rpc.events.ResultEvent;

    [Bindable] private var empArr:XMLListCollection = new XMLListCollection();

    protected function getdata_faultHandler(event:FaultEvent):void

    {

    TODO self-generating method stub

    }

    protected function getdata_resultHandler(event:ResultEvent):void

    {

    EmpXMLCollection.source = event.result.children ();

    fader. Play();

    }

    protected function application1_creationCompleteHandler(event:FlexEvent):void

    {

    getData.send ();

    }

    ]]>

  • Click on the animation to play, click on the animation even play reverses.

    Hello community,

    I scoured the internet to find answers, but after a long search I finally with no conclusion.

    I have a simple animation. By clicking or tapping in the animation becomes a sign more in a sign less .

    Another click is supposed to reverse the animation, turning negative again in a more. I plan on implementing this animation in Muse CC for a menu drop-down.

    I tried different triggers and action, but my efforts were futile and fruitless.

    Would someone be kind enough and point me in the right direction?

    Thank you very much for your time!

    Kind regards

    Mike

    Problem solved:

    I found this thread >

    Re: Control the timeline of a symbol

  • I made a gif from 180 frame of animation in photoshop.  But when I tried to reverse the trend, the rear part of the animation flickers.

    I was using the timeline in photoshop. I have selected all of the 160 frames, pasted after 180, and 181 from selected and used image invert. However even if the animation plays fine when I play forward (after the export of the fig), when it should be the reverse part it sparkles.  What am I doing wrong please?

    Riesa

    Hello

    Greetings!
    What version of Photoshop?

    What is the operating system?

    What are the specifications of the system?

    Can you try another small gif of crating and reverse that, see if that flickers.

    Concerning

    Jitendra

  • Piece of code does not play for the animation CLICK

    myHomeButton.addEventListener (MouseEvent.MOUSE_OVER, MouseOverHome);

    myHomeButton.addEventListener (MouseEvent.MOUSE_OUT, MouseLeavesHome);

    function MouseOverHome (MouseEvent): void {}

    stopPlayReverse();

    homeHOMEanim.play ();

    }

    function MouseLeavesHome (MouseEvent): void {}

    this.addEventListener (Event.ENTER_FRAME, playReverse, false, 0, true);

    }

    function playReverse (Event): void {}

    If (homeHOMEanim.currentFrame == 1) {}

    stopPlayReverse();

    } else {}

    homeHOMEanim.prevFrame ();

    }

    }

    function stopPlayReverse(): void {}

    If (this.hasEventListener (Event.ENTER_FRAME)) {}

    this.removeEventListener (Event.ENTER_FRAME, playReverse);

    }

    }

    myHomeButton.addEventListener (MouseEvent.CLICK, ClickHome);

    function ClickHome(event: MouseEvent): void {}

    If (homeHOMEanim.currentFrame > = 0, homeHOMEanim.currentframe < = 4) {}

    homeHOMEanim.gotoAndPlay (36) ;}

    If (homeHOMEanim.currentFrame > = 4, homeHOMEanim.currentframe < = 8) {}

    homeHOMEanim.gotoAndPlay (39) ;}

    If (homeHOMEanim.currentFrame > = 7, homeHOMEanim.currentframe < = 12) {}

    homeHOMEanim.gotoAndPlay (41) ;}

    If (homeHOMEanim.currentFrame > = 11, homeHOMEanim.currentframe < = 16) {}

    homeHOMEanim.gotoAndPlay (42) ;}

    }

    In this code, the upper part works perfectly (in other words, everything that precedes the method addEventListener (MouseEvent.CLICK, ClickHome);), it is so that when the mouse passes over the home button, the animation starts. When the mouse leaves the button, the animation runs in reverse back to the start.

    However, none of the last part of the code seems to work.

    Thank you

    myHomeButton.addEventListener (MouseEvent.CLICK, ClickHome);

    function ClickHome(event: MouseEvent): void {}

    If (homeHOMEanim.currentFrame == 1 | homeHOMEanim.currentFrame == 2 | homeHOMEanim.currentFrame == 3) {}

    homeHOMEanim.gotoAndPlay (36);

    }

    If (homeHOMEanim.currentFrame == 4 | homeHOMEanim.currentFrame == 5 | homeHOMEanim.currentFrame == 6: homeHOMEanim.currentFrame == 7) {}

    homeHOMEanim.gotoAndPlay (39);

    }

    If (homeHOMEanim.currentFrame == 8 | homeHOMEanim.currentFrame == 9 | homeHOMEanim.currentFrame = 10 | homeHOMEanim.currentFrame == 11) {}

    homeHOMEanim.gotoAndPlay (41);

    }

    If (homeHOMEanim.currentFrame == 12 | homeHOMEanim.currentFrame == 13 | homeHOMEanim.currentFrame = 14 | homeHOMEanim.currentFrame == 15) {}

    homeHOMEanim.gotoAndPlay (42);

    }

    }

    For some reason-it worked, but others with the ' &' don't.

Maybe you are looking for