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

Tags: Edge Animate

Similar Questions

  • What is the relationship between the main timeline and timelines of symbol in Adobe Flash Professional CC?

    I am new to Adobe flash and tried to create an E-card for a class. My teacher said that it is better just to have a keyframe for each layer in the main timeline and do all the clips of animation and film on the deadlines of each symbol. I'm having a hard time to understand how it works. To illustrate my confusion, let's start with an example.  I have a kite I want to start flying to frame 20. The kite is a symbol, so I create movement to 20 image interpolation in chronology of the wing. 20 on the symbol Timeline frame occurs at the same time as frame 20 of the MAIN scenario, or are they completely separate instances of time?

    Part of my mission, is should I use code snippets to add an element of interactivity to the Ecard. My confusion about the timeline affects my ability to do so. My teacher said that you need a stop on the first keyframe code to make sure that things will not start before you click the play button. Can I put the stop action on the main timeline or in the timeline of each symbol, or both?  Let's say I want to create a button that makes the kite flies when I click it. Where to play action 'go to and play', in the Assembly of the wing?

    I would greatly appreciate any help from the community. I'm the kind of person who needs to understand how things work. I searched for days, watch videos and read articles, but I still need to find a resource that effectively dissolved my confusion on this subject. So if anyone knows of any tutorials that explain how the main timeline and symbol timelines coincide, please share them with me. Thank you very much for your time.

    (P.S. are CC Animate Adobe and Adobe Flash Professional CC the same?)

    Thank you both for responding. Yes, your answers were useful, but a bit Advanced. I hope that you don't mind me asking a few follow-up questions.

    For Pete47-

    So I put my stop() in the main timeline. How the actionscript in the main timeline code works on the chronology of the wing if the two are separate?  Why not put the ActionScript on chronology of the wing? Clearly, there must be an interaction between the main timeline and symbols, right?  When you say "you can drag the symbol on the main timeline and it will run when you start", what do you mean by that? Like GETTING started, in the main timeline or in the scenario of the symbol? As you can see I am very confused by there!

    For Colin.

    I thought that Pete said you want to only have a keyframe in the main timeline. Then, when you said... "you can do it with an interpolation of the main timeline... from the beginning to the final position," why would you animate the motion on the main timeline? Why not in the chronology of the wing, can create another symbol of the tail in this period?

    And if the schedules of chronology and main symbol are separated, how SYNCHRONIZE you together different symbols to their movement to work together? And why should it be like that anyway?

    I am new to the community here, the last thing I want to say because you two sounds very knowledgeable on the Flash. How did you get your start? Did you start by watching the tutorials, read the manual, or something else?

    Once more, you have my abundant thanks for taking the time to help.

  • Control the main timeline and chronology of built-in movie clip

    Good afternoon folks,

    I am trying to solve this problem.  I have a main scenario with an animation. (animation is not a clip).  I also have a clip film embedded in the main timeline. I want to control the actions of the main timeline AND the embedded animation at the same time.

    For example, when a user clicks on a button "pause", I want to stop the animation of the main timeline as well as the integrated clip. I figured out how to stop the main timeline using the stop(); command.  I also understood how to stop the film incorporated using the command _root.embeddedclipinstancename.stop ();  Problem is that I don't know the commands to stop the two things at the same time.

    I tried to find that an instance name for the main timeline, but there is no (I think). I know I could do the animation in the timeline in a clip, but I don't want to go that route.  Any ideas on how to control two things?
    Also, if possible, I would prefer not to use the _root command since I know that this can cause a conflict in Captivate.

    Thank you.

    Include the two commands that worked in your pause button code.  If your [ause button is on the main timeline, you don't need to use a reference of _root.  It is only really useful if you target some of child level object distance back to the main timeline.  You can _parent (and string them if necessary) instead of using _root.  As you will get in trouble unless you're on the _root timeline when using it.

  • I want to manage my payment details as the credit card in detail, but there is no button 'Edit payment details' in the tab 'Plans and products", can I do?

    I want to manage my payment details as the credit card in detail, but there is no button 'Edit payment details' in the tab 'Plans and products", can I do?

    A few changes/Verify account https://forums.adobe.com/thread/1465499 links that can help

    -Credit card https://helpx.adobe.com/x-productkb/policy-pricing/membership-subscription-troubleshooting-cr creative - cloud.html

  • I'm trying to update my ipad (first edition) to the new version and after about an hour, I get a message that says unable to finish because the network has expired.

    I'm trying to update my ipad (first edition) to the new version and after about an hour, I get a message that says unable to finish because the network has expired.  How can I fix it?

    Original title: network programs network networking Internet Web site Site Web Web Site URL

    Hello

    You need to support iPad not Microsoft.

    iPad - media choices
    http://www.Apple.com/support/

    iPad - Support
    http://www.Apple.com/support/iPad/

    iPad - communities (Forums)
    https://discussions.Apple.com/index.jspa

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • I try to use the clean disk and after it starts I get a message that it has stopped working

    I try to use the clean disk and after it strats up, I get a message that it has stopped working

    Original title: clean work investor disc

    Please use this tutorial and try to do the cleaning disc again.

    http://www.Vistax64.com/tutorials/76073-disk-cleanup.html

  • In Lightroom, developing the original window and after photos are different even before treatment

    I'm a newcomer to Adobe Photoshop Lightroom CC 2015.4 but found after importing photo in the window to develop and duplication of the view forward and after that, the photo is different from the original before even I did any changes. Surely, they should be the same. Is it normal or I do something wrong?

    Well, it's a shot in the water, but I think it was affecting a case recently where a defective monitor due to profile either the front or after the image do not display at all, so I thought the sRGB monitor profile could be worth trying.

  • HI, I want to be adopted, the Prime Minister and after effect... what I please

    HI, I want to be adopted, the Prime Minister and after effect...

    I have a window of 10. I am a beginner

    What should I do please?

    Hi Khaled,

    I checked with your Adobe ID / Email ID on the forums and did not find any subscription registered ago bought.

    So, if you are trying to install the evaluation version of 2015 CC of these please refer to the below given link:

    Download and install Adobe Creative Cloud apps

    Let us know if that helps.

    Kind regards

    Sandrine Bani

  • HI everyone, I paid almost 10 days ago, my supcripcion to plan for all the app elements, and after u date of my latest plan, any program is runing, always appear, your time taking, is late, please by the app with my adobe ID works correctly?

    HI everyone, I paid almost 10 days ago, my supcripcion to plan for all the app elements, and after u date of my latest plan, any program is runing, always appear, your time taking, is late, please by the app with my adobe ID works correctly?

    Photoshop Elements and Premiere Elements are NOT part of the cloud... you buy a serial number, not a subscription, and you enter the serial number during installation

    If you don't want to say things, read below

    Your subscription to cloud shows correctly on your account page?

    If you have more than one email, you will be sure that you use the right Adobe ID?

    https://www.adobe.com/account.html for subscriptions on your page from Adobe

    .

    If Yes

    Some general information for a subscription of cloud

    Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work

    Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud

    -Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp

    -http://helpx.adobe.com/creative-cloud/kb/license-this-software.html

    .

    If no

    This is an open forum, Adobe support... you need Adobe personnel to help

    Adobe contact information - http://helpx.adobe.com/contact.html

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    -Select your product and what you need help with

    -Click on the blue box "still need help? Contact us. "

  • Button inside a clip controlling the main timeline

    Hello-

    I have a clip on the main stage - inside that movie clip is a button - I want that button to contol a function on the main timeline.

    example: the Script button

    closeAll_btn.addEventListener (MouseEvent.MOUSE_DOWN, goCloseAll);

    function goCloseAll(e:MouseEvent):void {}


    * do not know what to put here to activate "closeAllOpenMovieClips" on the main stage *


    }

    example: main stadium Timeline Script

    function closeAllOpenMovieClips (): void {}
    trek_mc.gotoAndStop (1);
    lost_arts_mc.gotoAndStop (1);
    rain_mc.gotoAndStop (1);
    vintage_mc.gotoAndStop (1);
    }


    do not know if I need a script more on chronology of main stadium that comes "from function."

    Thank you - Ben L

    If the button is in part 2, then the event listener so that it must be well on frame 2... or you could make the button visible/invisible betrween frames 1 and 2).

    But if you want to head back to your original approach...

    closeAll_btn.addEventListener (MouseEvent.MOUSE_DOWN, goCloseAll);

    function goCloseAll(e:MouseEvent):void {}

    MovieClip (root) .closeAllOpenMovieClips ();

    }

  • Use the MC button to perform function on the main timeline

    I was wondering how (or if it is possible) to use a button that I have in a clip to perform a function on the main timeline. Specifically, I want the button in the clip to stop on an image of the main timeline. Any suggestions?

    Hello
    _root is the main scenario.
    So if you have your button (say button1) the code would be

    Button1.onRelease = function() {}
    _root.gotoAndStop (20);
    }

    This would prevent the main timeline to frame 20.
    This is for actionscript 2 (flash 8).

    for cs3 (actionscript 3) this would be it

    Button1.addEventListener (MouseEvent.Click, clickHandler);
    function clickHandler(event:MouseEvent):void {}
    _root.gotoAndStop (20);
    }

    Hope this helps
    Alan

  • [Help] Button that closes or unloads the SWF itself and charge another.

    Hello! Could someone help me please?

    Maybe my question seems little obvious to you, I ask patience ^ ^

    I'll summarize as briefly as possible .. Imagine a presentation, interactive animation and full, with many ways or different possibilities...

    The method I use is to divide it into many different rulers, otherwise it would be ridiculously heavy...

    But that's the problem: when I want to load another SWF, he eventually overwrite the original and will become more slow and overloaded, because it consumes too much memory and frame rate decreases each new SWF loading...

    I wonder if there is a way to unload the SWF itself by button and move on to the next...

    Open
    LER foneticamente

    If you have a single swf file main who must simply acts as a container that loads of the FSV of presentation, you can use the Loader class to load the presentation files, and it includes methods to unload the files loaded as well.  Find the class Loader in the help documentation if you need more information.

  • Error launching PS CC 2015 after the last update and after update Windows 10 last night. What is going on?

    (Since the two updates at the same time, I'm not one that caused a problem within the PS but here's what I saw.)

    Microsoft sent an update to my Windows 10 software last night then when I logged on Windows with success, my CC Adobe said I had an update waiting. I went to CC and started the update of PS CC 2015. No errors were found. When I tried to launch PS later in the morning, it failed with the following information in the pop-up box:

    [Window title]

    C:\Program Files\Adobe\Adobe Photoshop 2015\Photoshop.exe CC

    [Content]

    C:\Program Files\Adobe\Adobe Photoshop 2015\Photoshop.exe CC

    The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe for more details.

    [OK]

    Adobe: do you know what is happening and how can I do? Re - install PS?

    Looks like I found a solution. I went to the CC Office and next to the PS application, click on the update button and it has apparently installed the latest ACR 9.3.1.520

    Deliver not more today!

  • I accidentally turned on the incognito briefly and after it I disconnected from all of my online accounts and some don't inin back Journal

    I accidentally activated the incognito briefly and he turned his back. Everything worked well for this session. I left my computer in mode 'sleep'. The next time that I used it, I had been disconnected each web account that I have. Most of the accounts I want to log in, but on one of them I get a message that says "Cookies must be enabled to login.

    I went to tools/options/life private and made sure that both tabs 'accept cookies' was clicked (they were)

    I tried implementing history of custom to "firefox will remember the story", but that did not help either.

    As far as I know, cookies are enabled, but I still get the message to turn them on.

    In private browsing mode, you can use cookies as in normal mode.

    PB mode means that nothing is saved to disk, you cannot create cookies that last longer than the current session.

    No access is possible for cookies that have been created in normal mode mode PB and created in mode PB cookies are deleted if Firefox is closed or PB mode is completed.

    PB mode all the cookies are session cookies and expire when Firefox is closed, but you can always block or allow specific cookies based on the default setting.

  • Inline images/links/equations - need to script the space or/and/after...

    He

    work on some textbooks of mathematics. text is written in the word with many mathtype equations and imported in indd.

    some inline equations have space around, some don't.

    need a script to clean it. hold 1 space around each equation (before and after).

    Thank you

    Then, test the ExtendScript (JavaScript):

    // InsertSpaceBEFORE-AFTER-Anchored-GraphicFrame-v4.jsx
    // Uwe Laubender
    
    // NOTE: Text in tables or text in footnotes will ALSO be handled.
    
    /**
    * @@@BUILDINFO@@@ InsertSpaceBEFORE-AFTER-Anchored-GraphicFrame-v4.jsx !Version! Sun Jan 10 2016 15:56:14 GMT+0100
    */
    
    app.findGrepPreferences.findWhat = app.changeGrepPreferences.changeTo = "";
    
    // Here we could also look after "" with a text search!
    // A GREP search for "\\x{FFFC}" will ALSO work.
    app.findGrepPreferences.findWhat = "~a";
    
    var whatToAddBefore = " "; // A single space
    var whatToAddAfter = " "; // A single space
    
    // The focus is on our active document:
    var doc = app.documents[0];
    
    // Let's find every anchored object in the document in reverse order:
    var foundResults = doc.findGrep(true);
    
    // We are not interested in anchored text frames, anchored buttons etc.pp.
    // Just in anchored graphic frames, that contain graphics.
    // We could refine that even more, if we like.
    
    // So we loop the found special characters:
    
    for(var n=0;n
    

    Who should do it for you.

    You can remove the double and triple spaces thereafter.

    Uwe

Maybe you are looking for

  • Ball rotation range

    I have a 2011 21 "iMac with 8 GB of Ram. I use OS X of El Capitan. When I get the rotation beach ball I have to restart. Also, when I get the beach ball all four carrots are 100%. The apps I have running is the finder, mail, iMessage, Safari & Parall

  • Firefox won't charge of some url / Web sites that work in other browsers

    Whenever I try to load a beginning of following Web site with stk.co (e.g. stks.co/q1CqL ) Firefox gives the error message: The 'Accept' HTTP header field with a value of hc/url"; ' * / * ' could not be parsed. The same URL loads easily into Internet

  • iTunes crash at startup only when connected to the internet

    Recently updated iTunes to 12.33 12.3 on a Dell Windows 7 machine.  Now it hangs at startup, but works well if I disconnect ethernet. But it's not very useful, since I want to respond to my music and videos to an AppleTV is connected to the system vi

  • Internet Explore (Vista edition) could not start

    Hi all Internet Explorer stops working (and closing the program) when you start the computer. This is why I can't use my laptop.Any ideas on how to solve the problem? Thank youLuis

  • Cannot print using HP Deskjet 640 c printer until then restart.

    Original title: Please help me fix my computer buddy, complaints with printer become regular Hello dude,. I use Windows vista on my computer. Recently, I installed a printer of HP Deskjet 640 c. I am faced with various complaints on it. I try to prin