Play animation in reverse

Hey. Im a total noob at actionscript and flash so please explain to me like I´m a seven year old!
I made a flash banner that includes a videofile and some vector animations. I would like this banner to play from fram 1 to the last fram and then reverse play back to frame 1 ad infinitum (the whole movie should do this that is). I cant just reverse the frames though, because of the videofile (at least I think so?) - so Im guessing I must write some kind of script that tells the movie how to play. Any ideas on how to accomplish this?
Thanks

first frame:
import flash.events.Event;
var boolVal=true;
addEventListener(Event.ENTER_FRAME,fEnter);
function fEnter(evt:Event)
if(boolVal)
    nextFrame();
else
  prevFrame();
and to the last frame:
var boolVal=false;

Similar Messages

  • Playing animations in reverse

    Hi there,
    I have a script that i use to run animations in my models, but i would also like to be able to play them in reverse as well.
    For example, i have a series of buttons that i use to trigger parts of my animation. Button 1 runs 0-2 sec, Button 2 runs 2-4 sec and button 3 runs 4-6 seconds. Now if i decide to press my buttons in reverse order, i'd like to see my animation running in reverse, such that button 2 will now play 6-4 sec and button 1 will play 4-2 seconds.
    I hope this all makes sense.
    Has anyone come across this before?
    Does anyone have any scripts that they're willing to share?
    I can provide the script that i'm currently using if this will help anyone with this problem.
    Cheers,
    George

    George,
    Here's a script that will play your animation in reverse. To play in reverse successfully, you should set the default "Animation Style" to 'none' in the 3D properties dialog. Otherwise, the C++ animation routine will collide with the Javascript engine. (You can imagine how that might happen!).
    Here's the script for reverse:
    //=======================================
    //get the first animation in the scene and create control vars
    firstAnimation = scene.animations.getByIndex(0);
    firstAnimation.speed = 3;
    firstAnimation.oneFrame = 1 / firstAnimation.framesPerSecond;
    scene.activateAnimation(firstAnimation);
    //run the animation using a TimeEventHandler()=================
    myTimer = new TimeEventHandler();
    myTimer.onEvent = function(event)
    firstAnimation.currentTime -= firstAnimation.oneFrame * (firstAnimation.speed * 0.1);
    if (firstAnimation.currentTime <= firstAnimation.startTime)
    firstAnimation.currentTime = firstAnimation.endTime;
    scene.update();
    runtime.refresh();
    runtime.addEventHandler(myTimer);
    //=======================================

  • 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 no longer target that symbol?

    Hi
    I have a button the does two functions at the same time. it plays a symbol's animation in reverse (in order to hide it) and it slides an element. the symbols animation is triggered by another button (which is not relevant) . So my problem is that if the animation has been triggered first than when the button is pushed the animation plays in reverse, the symbol hides and everything is fine, but if a push the button before that the animation will flash in reverse. SO how can I tell it to only play in reverse when the symbol's animation has run. I know it's an if / else statement but i have no idea how to do it.
    thx

    Here is a case close to your issue:
    if ( sym.getSymbol("Symbol1").$("Text").is(":visible") ) { sym.getSymbol("Symbol1").playReverse(); }
    else { sym.getSymbol("Symbol1").play(); }
    Demo files ==> isVisible.zip - Box

  • How do I make my Timeline play forward or reverse depending on its current location?

      I'm attempting to make a side scrolling site. I have a wide div set up in the main timeline that animates 1000px at a time on the x-coordinate between the labels I have set for each "page".
    I would like to click a button and go to the associated label and stop. I am faced with 2 problems:
    1. Sometimes this would require the playhead to move in reverse rather than forward.
    2. I originally had stop triggers on the timeline under the labels but if I am able to get my first problem fixed these triggers would stop the animatin before reaching the label.
    I'm just learning java so I'm guessing I need an if statement and a function.
    Example of what I'm trying to figure out:
    I want to press work button and play to label "work".
    If I'm at label "home" I need to play(); and stop at label "work". If I were at label "blog" I would need to playReverse(); to label "work".
    Please help! I've been going looney trying to figure it out!

    Thank you for your reply!
    My post may have been a little misleading...
    I have a navigation bar with 5 items.  Home, work, blog, about, contact.  My main timeline has a symbol that is 6000px wide. Inside that symbol are individual symbols that make each of these "pages" which are 1000px each. My timeline has animations that last 1.5 secs each and animate the main symbol 1000px on the x dimension to stop on the main stage which is 1000px.  Essentially it creates a 5 "page" side scrolling layout. I have the five labels on the timeline starting at 0s with "home", 1.5s labeled "work", 3s labeled "blog"... etc.
    I wish to be able to click blog and travel forward or reverse on the timeline and then stop on "blog".  Then If you click home you should reverse along the timeline and stop on "home".  If I have any stop(); triggers on the timeline it would stop in transition to my target label without reaching it.  In addition a generic play(); or playReverse(); doesnt target a specific label which is whats required for my navigation bar.
    I need to play forward or reverse from the current location on the timeline and stop when it reaches a specific label. Visually you would be sliding back and forth across the pages as you use the navigation.
    Is there a way to do this with variables?
    I'm going to try triggers on the timeline like this sym.setVariable("pageValue", "home"); when on the "home" label.    sym.setVariable("pageValue", "work"); when on the "work" label.
    but then how would I tie that to my buttons?
    If I click work and I'm on home I need it to check:  var myVariable = sym.getVariable("pageValue"); and then an if or else statement I think?  I'm such a noob. I'm trying really hard to grasp it
    something like:   if pageValue = "home" { sym.play();} else if pageValue = "blog","about","contact" {sym.playReverse} if pageValue = "work" {sym.stop();};
    I know there is probably all kinds of syntax errors there but can someone understand what I'm getting at?
    to make this even more tricky I am interacting with the stage with an html and css navigation bar that lays over the stage so I need this to be in function style (see code)
    function goHome()
    javascript:var targetComp = AdobeEdge.getComposition('EDGE-57204389');
       targetComp.getStage().playReverse();
    and then call it like this in html
    <li><a href="javascript:goHome();" class="three-d">
                                  Dynamic
                                  <span class="three-d-box"><span class="front">Dynamic</span><span class="back">Artisans</span></span>
                        </a></li>
    This works to play the stage in reverse but its not the functionality I need.  Any help would be greatly appreciated and a great learning point for me and hopefully others in my situation!

  • Can the iPod (30 GB Video version) play animated .GIF files/pictures?

    When I go into the pictures folder, it only shows the first frame. Can it play animations?

    "Importing" .gif files is a very old QT Pro "trick" and was made available in the first "Pro" version of QT (3).
    I still use the feature to add logos or other, older animations to some of my newer QT "movies".
    Some of the older QT tricks can still be used today:
    http://homepage.mac.com/kkirkster/QT_Fun2/
    I've been focusing my skill (very little) on the QuickTime discussions pages but visit these "iPod" discussions pages every now and then.
    Since the new iPod can also "do" the .mov format I thought I'd observe and comment for the newer users.
    Happy New Year!
    Oh, btw, QuickTime can also do some magic with your Photoshop files.

  • Pause & Play Animation When i'm using movie clips- filters

    Pause & Play Animation When i am using movie clips-
    filters
    Graphic and movieclips are using for my animation
    When i Press the pause the movieclip animation not stopped.
    Any way to apply the filters on graphic
    I want to apply the filters for particular graphics or movie
    clips. with navigational button working.
    Please help me.
    Thanks
    S.Satheesh Kumar

    Audio on the timeline, especially stream, tends to play very reliably. Is this project under any NDA or can you provide a FLA to examine? Let me know if you want to private message it and I'll shoot you a message.
    What version of Flash Player are you targeting and is this AS2 or AS3?

  • Click to play animation

    Hi,
    I'm a novice in Director 3D and in Lingo in general. I'm not
    trying to
    do anything too complicated. Am here to ask for help doing
    the
    following:
    I have created a 3D model in Max with various things that
    animate. The
    user can click on one model and it will animate, then
    another, and it
    will animate. This is easily done with the Play Animation 3D
    Action
    behavior. What I want is once you've clicked all of the
    models, another
    animation plays. So, how do I go about this?
    My animation is just keyframed made in Max.
    Thanks.
    Stu.

    stu wrote:
    > I've managed to put a global variable into the Play
    Animation behavior to
    > count the animations played. But, I'm really just
    counting the animations
    > activated. I need a way to test if an animation has
    finished playing. How
    > do I do that?
    Hi Stu,
    When an animation starts playing the 'currentTime' property
    ticks over and
    then goes back to 0 when the motion is complete. If you have
    recorded when
    the animation starts, you just need to check when it's
    finished. You could
    have something like the following (in a script after you know
    the animation
    has been started):
    if
    member("3DcastName").model("modelName").keyframePlayer.currentTime
    = 0
    then go to "animComplete"
    regards
    Dean
    Director Lecturer / Consultant / Director Enthusiast
    http://www.deansdirectortutorials.com/
    http://www.multimediacreative.com.au
    email: [email protected]

  • Does the iPhone play animated GIFs?

    Hi,
    Does the iPhone play animated GIFs? Sorry for asking such a basic question but I can't seem to find the answer on the web or within this forum.
    Also how do you implement it into your code? Do you need to use a UIWebView or can you just declare it like a regular png or jpg (e.g. UIImage *image = [[UIImage imageNamed:@"photo.gif"])
    Thanks for any help.

    you can play gif in webView ,just the same way you load a jpeg or png..
    NSString *path = [[NSBundle mainBundle] pathForResource:@"santa" ofType:@"gif"];
    NSURL *url = [NSURL fileURLWithPath:path isDirectory:NO];
    /* Load the request. */
    [myWebView loadRequest:[NSURLRequest requestWithURL:url]];
    the gif that is locally saved will be loaded.

  • How to Play animation on Mouseover and Reverse on Mouseout?

    0down votefavorite
    I am trying to create a simple animated navigation bar. I want to mouseover an image and have an animation play, then when you mouseout the animation will play in reverse.
    I can get the animation to play on mouseover, but as soon as I put in the mouseout code it doesn't work. I'm completely new to Edge, so if someone can give me a simple explanation on how to play/reverse an animation on mouseover/out, I would really appreciate it.
    Right now I have an image, converted to a symbol, with another image (nav_on_1) nested inside. The image nested inside is animated with the label "nav_on_1_play".
    My code for mouseover is below:
    sym.$("nav_on_1").show();
    sym.play("nav_on_1_play");

    first I recommend that you use mouseenter and mouseleave instead.
    second: if you have a symbol that has let's say one animation you can do
    on mouse enter
    sym.getSymbol('symbolname').play();
    on mouseleave:
    sym.getSymbol('symbolname').playReverse();
    you may have to add
    sym.getComposition().getStage().getSymbol('symbolname').play();
    sym.getComposition().getStage().getSymbol('symbolname').playReverse();
    or you can put the event in stage/compositionreday
    sym.getSymbol('symbolname').mouseenter(function(){
    sym.getSymbol('symbolname').play();
    sym.getSymbol('symbolname').mouseleave(function(){
    sym.getSymbol('symbolname').play();

  • Play timeline in reverse

    Hi guys, this is just an idea I have for a website, i haven't
    done the animations yet, but my thought is something like this:
    i will have an animation done in 3DsMax and imported into the
    timeline of my SFA, say maybe 160 frames. The animation would be of
    a CUBE spinning, and showing all 6 sides throughout the animaton.
    Each side, i was thinking to make into a page for the
    website, and i would need it to play the animation foreward or
    reverse until it reaches the side of the corresponding button
    pressed.
    Or, if i can't play the timeline in reverse... I would like
    it to play ( and loop if necessary ) then stop at the corresponding
    page.
    eg.. if you are on page 5 and click on page 2, i want it to
    play to the end, then start from frame 1 and play to page 2 frame.
    Thanx in advance for any help and suggestions.

    ok nevermind, i got it to work.. i simply forgot to name my
    button =P
    anyway... it works great, except that im calling the function
    from 3 buttons for testing, all with different params... and
    although it works great, it ALWAYS starts from the begining, then
    moves to n
    i've tried changing:
    this.gotoAndStop(this.m);
    to:
    this.gotoAndStop(this._currentframe);
    and this works, but because the animation has a stop(); at
    the begining, this only works the first time through.
    any suggestions?
    also, when im calling the function im using:
    mc.playF(_currentframe, 20, 24);

  • How do I stop playing animated GIF's within web pages?

    Various websites display numerous images available for download. Some of those images are animated GIF files. These files take time to load and chew up a lot of my limited upload/download usage. IE Explorer let me see a single image for the GIF but doesn't load or play the GIF. How do I get that same setting in Mozilla Fire Fox?

    hello vyoumans,
    i found a couple different ways this can be done.
    1. this firefox addon, [https://addons.mozilla.org/en-US/firefox/addon/toggle-animated-gifs/ Toggle animated GIFs], seems to work pretty good. ctrl+m toggles the animations on and off.
    2. if you don't want to install an addon, you can go to your browser configuration file. type ''about:config'' in the address bar and find the entry ''image.animation_mode''. double click it and set its value to ''none''. this should disable all GIF animations

  • IMovie HD doesn't play animated .gif's

    why doesn't it play them? all I get is a still of the first frame, no animation. Can anybody clue me in? If you want the files to play with, they're here:
    http://perfectionconstruction.com/test/naruto.html

    Hi
    To move projects to external hard disks can be near to fatal.
    Eternal hard disk
    • *SHOULD BE* a FireWire one - USB/USB2 performs badly
    • *HAS TO BE* - Mac OS Exstended formatted
    (Usually not but UNIX/DOS/FAT32/Mac OS Exchange which doesn't work)
    (Even so if it's bought at Apple Store - a bad thing)
    If so You need
    • Other Space to move Your project to
    • Lennart Thelander repair kit
    If You re-format Your hard disk - IT WILL BE ERASED - Totally
    Yours Bengt W

  • Play animation that is happening inside symbol_2 by clicking on symbol_1 which is situated in stage

    So basically i want exactly what the title says.I have the stage and two symbols...each symbols contain their own elements.Symbol_1 has some static elements which will act as buttons and Symbol_2 has some images that are animated...at the beginning of each animation of every element i've put a label(such as image1_start,image2_start etc).And I want that when i click on one of the buttons whic are sittuated in Symbol_1 to start an animation from a specific label that is happening inside Symbol_2.How do i do that?...If they are all in the same timeline it's simple by using the sym.play("image1_start") command but that's not really what i am looking for.I hope I was specific enough.THANK YOU IN ADVANCE!
    P.S.Mostly it's about how can I make two different timelines to communicate properly.

    // insert code to be run when the composition is fully loaded here
    sym.getSymbol('symbol_1').$('btn1').click(function(){
              sym.getSymbol('symbol_2').play('image1_start');
    sym.getSymbol('symbol_1').$('btn2').click(function(){
              sym.getSymbol('symbol_2').play('image2_start');
    sym.getSymbol('symbol_1').$('btn3').click(function(){
              sym.getSymbol('symbol_2').play('image3_start');
    here is the sample:
    https://www.box.com/s/dcpe4xvdu6h9391gy5yd

  • How to play Animation with site loading in background to reveal website?

    So I know there are pre loaders and you can make that with edge... But they are so small and just a little circle moving around or something... I more mean a full page pre-loader then I guess...
    I have created an animation of a M with marquee lights going around and slowly zooming in... Then I have the M fade out and I have a black solid layer move up and another black solid layer move down to reveal the blank stage below...
    What I want to happen is maybe with some java script but to have the solids move out of the way to reveal my site bellow... Anyone know how to accomplish this?
    Thanks so much! I think being able to do things like this in native html and css and java will be huge for giving websites a "Font Door" or Opening Title like we have in movies... Thanks so much!

    first I recommend that you use mouseenter and mouseleave instead.
    second: if you have a symbol that has let's say one animation you can do
    on mouse enter
    sym.getSymbol('symbolname').play();
    on mouseleave:
    sym.getSymbol('symbolname').playReverse();
    you may have to add
    sym.getComposition().getStage().getSymbol('symbolname').play();
    sym.getComposition().getStage().getSymbol('symbolname').playReverse();
    or you can put the event in stage/compositionreday
    sym.getSymbol('symbolname').mouseenter(function(){
    sym.getSymbol('symbolname').play();
    sym.getSymbol('symbolname').mouseleave(function(){
    sym.getSymbol('symbolname').play();

  • Quicktime having trouble playing animated movies

    I have a few movies I downloaded from DC++ that I want to play, but quicktime says it's unable to play them because it's missing software. I have the newest update of QT, and the movies I have trouble playing are only animated ones, such as corpse bride, team america, and final fantasy. Whats up?

    If QuickTime can open the files then go to the Window menu and select Show Movie Info to see the Format: for information on what animation codec may have been used, then try to find a suitable QuickTime component for playback... the link below may help with that.
    http://discussions.apple.com/thread.jspa?messageID=1558248

Maybe you are looking for

  • How to update data in af:table

    Part Database: 1. I create 2 table in database - tb_closed_order - id - closed_date - lot - tb_order - id - order_number - title - detail - lot - status_closed_order 2. At tb_closed_order, I create trigger type after insert When I insert new record,

  • Price Determination Analysis Not Saved

    Price determination analysis is not saved when a document is saved in CRM. Price details are displayed, but the "Accesses" button yields the "No pricing analysis available" message unless the price update button is pressed. This is not possible when

  • Migrate SOA Suite 10.3.3.1 to 11g

    Hello Does anyone know if there's documentation available about migrating my current SOA environment to the new 11g environment? regards Michel

  • Restricting on a cursor result

    Task: 1. I would like to make reports for a system. 2. I want to make the reports with an out sys_refcursor 3. I want to pass in some cursor with ids, to restrict report. So here's the code I got so far: procedure customer_status_distribution(c_unive

  • Dynamic ColumnSet rendering as 'overlaid' instead of 'stacked'

    Hi all... I'm struggling to get a stacked column set working within a cartesian chart. The chart object and horizontal axis are defined statically within mxml code, and the column set, column series, vertical axis, and other vertical axes, axis rende