Forcing animation to play to end?

Hi all
I have an animation effect that uses TranslateTransient. It plays when a mouseover event occurs and auto reverses from screen left to right and back to left. When the mouseexit event is detected on the triggering object I need to have the animation play to the end such that the image being animated finished back at its start possiton on the left of the screen. I need the animation to complete smoothly so just using pause() or stop() on the translation isn't good enough. I've tried setting the duration to 2 which works fine if the current duration count is 2 or less but no good if the cycle has been running for a while.
Is there any way to get the current cycle count or some other way of doing something like playToEnd(even)? Kind of surprised not to see such a feature.
Edited by: Cenotaph on Jul 16, 2010 4:14 PM

Ah, it was less obvious than I thought. I found out that action() function in a Transition is called at the end of the forward movement, but not at the end of the backward one, when autoReverse is true! Very annoying.
Similarly, if I change the byX value of an existing transition, it doesn't appear to take the new value in account...
I found out a working solution, there might be more elegant/simple ones, but at least mine works! :-)
var scene: Scene;
var animated: Node;
Stage
    title: "Forum Test"
    scene: scene = Scene
        width: 500
        height: 500
        fill: Color.MINTCREAM
        content:
            Ellipse
                centerX: 250
                centerY: 250
                radiusX: 100
                radiusY: 100
                fill: Color.AQUA
                onMouseEntered: StartAnimation
                onMouseExited: StopAnimation
            animated = Circle
                centerX: 250
                centerY: 250
                radius: 50
                fill: Color.PURPLE
var bRestart: Boolean;
def transitions: Transition[] = [ GetTransition(100), GetTransition(-100) ];
var currentTransition: Integer;
function StartAnimation(me: MouseEvent): Void
    bRestart = true;
    currentTransition = 0;
    transitions[currentTransition].playFromStart();
function StopAnimation(me: MouseEvent): Void
    bRestart = false;
function GetTransition(x: Number): Transition
    def translation: TranslateTransition = TranslateTransition
        duration: 1s
        node: animated
        byX: x
        action: function (): Void
            if (bRestart)
                currentTransition = 1 - currentTransition;
                transitions[currentTransition].playFromStart();
            else if (currentTransition == 0) // Must go back!
                transitions[1].playFromStart();
}

Similar Messages

  • How can I show an image before my animation starts playing

    Hey there!
    First of all, great work on making Adobe Edge...! I can see real potential in the use of this program!
    I have started to work on an animation which will work as a splash-screen before the users see the actual site. (Yes I know... but the client wants it like this...)
    The problem I have now is that the animation plays after a few seconds and that during these seconds it shows the content of the website. Besides that I still find it pretty difficult to actually position the animation the way I want.
    I am using a plug-in for wordpress so I might not be in the right place to find help.
    I tried fixing this with a pre-loader but this is also too slow. Is there any way I can force the animation to play sooner or to make sure they can't see the content before the animation has played?
    You can find the concept of the website on: www.appyourservice.nl/concept/Jack.
    Any help is appreciated.
    Cheers,
    Dominic

    For sure,
    It's also in my reply above. What I did is add an other div to my website which overlaying the complete content.
    Then you add in the animation a line to hide this div before the animation starts playing like so:
    So add this to the stage in "CompositionReady" --> jQuery("#div").hide();
    This will make sure that the animations hides the div before playing so you will see first only the overlaying div and once the animation is ready to play, this div will hide and the animation will start.
    Hope this helps.
    Cheers,
    Dominic

  • How do I prevent animation from playing until visible on screen?

    I have multiple pieces on animation elements on my site. I'd like the animations to play when the user has scrolled to that postion on the page and not beforehand. Right now, page loads, user is at the top of the page and all animations load and start playing. By the time I scroll down, the animations have ended.
    Thank you in advance.

    Hi, interactive-designer-
    Check out this stackoverflow article, which will help you figure out where you are in the page.
    http://stackoverflow.com/questions/3898130/how-to-check-if-a-user-has-scrolled-to-the-bott om
    From here, you can set the autoplay to false and then start the animation using AdobeEdge.* APIs when it's appropriate.
    Hope that helps,
    -Elaine

  • Tell edge animation to play

    Hi, Is it possible to tell an edge animation to play from a button widget in muse?

    Hi
    Sorry to say but there's not much going on between the two camps, Muse and Edge A that is.  Like you, I subscribe to Muse but since I discovered EA...well...
    Thing is, dragging the aimated button to the trigger container just overlays it which effectively hides it.  Hence, it will simply not work as a trigger to launch lightbox.  I myself had the same idea....but its more involved that this.  As always.
    A possible solution might be to design your lightbox  and simply use the built in trigger for now -  go ahead and publish the site like this.  View your site in a browser of your choice then click on the trigger which will reveal the URL that launches the Lightbox feature.  Copy this in the browser.  Cheeky eh?
    Then go back to your button in Edge A (select it) and add an on click event handler (look for {} to the left of the element and select click event).  Using the snippets on the right-hand plane choose add URL and paste the link from the clipboard between the " " so when the button is clicked it references the lightbox.  Go back to Muse and position your edge button again and publish again.  Its very long winded I know.  Get it? Will it work? dunno.  Have I tried it? no.  But the logic is faultless, because the URL trigger on your button  should point to the lightbox...thats the theory anyway.
    Hope this is of some help and hope it works...might as well give it a try eh?...this is how I discovered Edge A trying to animate buttons etc.  In the end I decided to build my entire site using it. 
    regards

  • Animated gif plays only once

    I am using Captivate 5.5 on a Windows machine. I inserted an animated gif into my Captivate, using insert > animation...  Then, I inserted a button. When I pressed F4 to preview the animation, it played only once. I put a check mark on the loop on the timing of the properties of the animation. Still, it played only once. It stopped when the play head stoped moving. I cannot make the animated gif play continuously. Does anybody know how to make the animated gif play continuously?
    thaks.

    You can try this:
    Stick this in the header area of your code
    <script type="text/javascript"> function showBuyLink() {
    document.getElementById("buylink").style.visibility = "visible";
    } // adjust this as needed, 1 sec = 1000
    setTimeout("showBuyLink()", 5000);
    </script>
    Stick this around your buy link code.
    <div id="buylink" style="visibility: hidden"> <!-- put all your add to cart buy links and images inside this hidden div --> <p style="text-align:center; font-size:26px;"> <a href="http://mybuylink">Add to Cart or Buy Link</a> </p> </div>
    Yopu can rename "buylink", but you have to make sure you rename all instances or it will kill the script.
    If you're not comfortable incorporating that, unfortunately, the other option would be to create a Flash animation and put a button in the last frame.
    That would be just as difficult (if not worse) as writing (or tweaking) a javascript to delay the hotspot, and even worse because it would be invisible to phone users. Additionally, people who disable javascript would never see the link if you did add the script.
    There isn't any way to do this with HTML or CSS, and you now know the flaws with the methods that will work.

  • NEED HELP!!! Flash Animation (MAC) play back on PowerPoint (PC)

    NEED HELP!!! Flash Animation (MAC) play back on PowerPoint
    (PC)
    Shockwave Flash Animation is complete.
    We want to change the Flash Animation w/video (MAC) files to
    QuickTime files.
    Then change the QuickTime files using Adobe Premiere®
    Pro CS3 to an MPG level 1 file (not level 4)
    Must be expert in:
    Shockwave Flash Animation (MAC)
    QuickTime (MAC)
    Adobe Premiere® Pro CS3 (MAC or PC)
    AdobePowerPoint (PC)
    Virtual,Telephone or inperson heip on how to make a Shockwave
    Flash Animation (MAC) play back on PowerPoint PC

    (This is the Adobe Scout forum for game developers, you should try the Flash Player forum)
    To install Flash Player, try this link: http://get.adobe.com/flashplayer/

  • A script to force acrobat to play avi content with built in flash player instead of quicktime

    Hello, is there a script that would force acrobat to play embedded avi content with the built in flash player instead of the quicktime player?  first reason is that the built in quicktime player doesn't play the avi files anyway (for me at least); and second is that there are hundreds of sound clips in the pdf, and it is likely that i will have to revise the document and export again, so I can't manually change the properties of each sound clip to open with flash player.  Any thoughts would be appreciated.

    Buy software have wmv to Vp6 function.

  • Interactive elements are not allowing the animations to play.

    Hello all...
    I am using Cp4. In my quiz slide I have planned few animations(.swf & .gif) which will describe the question type that the slide contains. I want those animations to play continuously. I checked the loop property on to run them continuously. I don't want to increase the duration of the question slides but the animations should run continuously till the user attempts & submits the answer.
    But the interactive elements which have pause(e.g. button, clickbox) are stopping the animations.
    Is there any solution ?
    Thanks & regards,
    Pullela.

    Hello Pullela,
    Sorry, have something to finish soon, that is why I have no answer ready if there is one. This seems an issue similar but the opposite as when playing slide audio: that will stop when the user is clicking an interactive object. There I have a solution, put the audio to an object and it will continue to play. But do not see an immediate solution for your problem, seems interesting to explore and will do as soon as I have some time.
    Lilybiri

  • How can I combine multiple animations. (Play another animation after one has finished with a click?)

    How can I combine multiple animations. (Play another animation after one has finished with a click?) Like a slideshow but with animations. any ideas?

    You can do this by calling up the different edge Animate composition html pages using buttons and an iframe:
    To get a general idea, put this in the body of an html page and insert your own URLs where indicated
    <iframe id="iframeID" src="yourFirstURL" width="640" height="480">
    <p>Your browser does not support iframes.</p>
    </iframe>
    <button onclick='loadIframe("iframeID", "firstAnimURL")'>First Animation</button>
    <button onclick='loadIframe("iframeID", "secondAnimURL")'>Second Animation</button>
    <button onclick='loadIframe("iframeID", "thirdAnimURL")'>Third Animation</button>
    <script>
    function loadIframe(iframeID,url) {
    //alert("Hello");
       document.getElementById("iframeID").src = url;
    </script>
    Peter Small

  • Animation not playing in folio preview

    Hi, I have created a document in InDesign and added animation using the 'Interactive - Animation' option, but when I create a folio, the animation isnt playing in the folio preview? Is there any tips to get the animation working in folio preview?

    You have apparently done no research at all on this topic. I urge you to stop right now and read all of the DPS documentation which includes a list of which InDesign features are and more importantly aren't supported in DPS. Hint: Aninimation are not supported.
    Please post followups in the DPS forum.
    Bob

  • Html5 animation only plays once???

    I have an html5 animation that plays fine if I click or tap it the first time.  If I change pages and return, the animation shows the correct "start" poster, but clicking it goes directly to the last frame, as if the animation remained at that frame, and only the poster was reset.
    The same page also contains another html5 animation that is looped.  It plays fine every time (although I would like to know how to get it to stop, other than turning the page and coming back.)  But: if I activate this animation first, the second animation never activates.  The page-change trick resets this animation, but not the one described above, which simply doesn't work.
    ...and neither will scale down to fit the window, if I try to give them a smaller window to play in.
    Both are from FlashCS6 (not CC), rendered to html5 by CreateJS.
    Any advice?    --Jose

    Thank you.  These are not set to autoplay, however.  They are dynamic illustrations of points I make in the text.  The idea is that the reader should start them after reading the appropriate text.  Alas, if you start the one at the top of the page, the one at the bottom cannot be started at all.  I'm fairly certain that the page is fully loaded.

  • Getting a simple animation to play in IE

       I am having trouble getting a simple animation to play properly, on a site designed by someone else, in IE. It works fine in Mozilla and Safari. In IE, on some computers, it shows up but there is a prompt about downloading a Shockwave add-on. On other  computers it doesnt show up at all. Going from Mac to PC is also presenting problems. I'm freelance, so it's not like I'm in the office with these other people, so I only know what's going on with the 3 pc's I have at my disposal; which is as described above. I tried uploading another .swf with just 1 frame to see what would happen and it did the same thing. I'm starting to think it is a problem with the site and not the Flash.
       If anyone could take a look at it and offer some help, it would be greatly appreciated.
    Thanks,
    Murrz
    www.buildingdimensionsnc.com

    Thanks for your help. I didn't even think about the .html file. Normally I send both but I thought they had that sorted (so I was told) out when it worked in Mozilla and Safari. I won't know until tomorrow if it worked, but thanks again.
    Export your movies a Shockwave version or two behind, just to be on the safe side.
    This I don't quite get. Normally I publish and send .swf and .html and send them and everything works.
    Murrz

  • GE620DX gets really hot while playing high end games

    Hi, i just got a notebook GE620DX it works great and performance is really worth it.
    However, my only problem is that it gets really hot while playing high end games.
    It feels so hot that it is like burning your hand if you put it just right the exhaust vent.
    Is this normal with any gaming laptop or there is problem?
    Thanks Very Much!

    Laptop computers naturally run hot (or at least very warm), and if they stay hot for prolonged periods of time they may overheat and cause serious damage. Whether or not you're experiencing the warning signs and dangers of your laptop overheating, the simple and inexpensive protective measures below will help keep your laptop cooler and make it work more reliably.
    5 easy tips to cool a hot laptop
    1. Adjust your power settings from "high performance" to a more "balanced" or "power saver" plan. This will tell the system to only use the power required to run your applications, rather than always using the maximum processor speed; if you need to play games or other intensive work, you can switch back to the high performance plan as necessary.
    2. Use dust remover spray to clean out of the laptop's vents. Dust can accumulate in and block the laptop's fan vents -- a problem easily solved with a can of compressed gas (~$10). Turn off your laptop and spray the vent to remove the dust.
    3. Use a laptop cooling pad that has a fan or two. Laptop pads that have vents but no fans can also increase the air flow around your laptop and they're very portable, but for stronger cooling needs, a fan is the best way to go. For this test, I used a Belkin F5L055 (under $30), but there are also several others selected by this site's previous guide that you can explore or you could even custom build a laptop cooling system if you're so inclined.
    4. Keep your working environment or computer room as comfortably cool as possible. Computers, like most people, work much better in air conditioned environments. Most server rooms or data centers operate at 70 degrees or below, according to Server Fault, and that seems like an ideal temperature recommendation for home offices as well.
    5. Shut down your computer when not in use, and especially when you are not at home. The last thing you need when you get home is to find out your laptop was a fire hazard (one of the dangers of overheating laptops).
    Taking the steps above brought down the internal temperature of an old and dangerously hot laptop from 181° Fahrenheit (83° Celsius) to 106° F (41° C) -- a difference of 41% after one hour of using the active laptop cooling pad and bringing the room temperature down to 68 degrees.
    View more at: http://www.techyv.com/questions/my-laptop-gets-too-hot

  • Link to DPS article after animation has played?

    Hi,
    Is it possible to link to a DPS article using a trigger command (or after a delay, or anything similar) without the need for a second click once an animation has finished?
    Currently I have a short animation that will play when pressed and I would like it to link to another article once it has reached the end of the timeline or a specific label. The animation itself works fine and the DPS link does work but will not go to the specified article unless there is another press by the user at the end.
    I have tried linking to the article using both 'complete' in the default timeline and trigger actions, to no avail...
    Any ideas?
    Thanks

    Found a work-around.
    Made a JPEG of the magazine cover and imported to Edge and made it dissolve in after the title animation.
    This gives the illusion that it goes to the cover page.
    Was hoping for a generic topper that wouldn't need updating each month.

  • Mouse Leave animation being played when going down past 50% of object

    I'm new to Adobe Edge and I'm not really familiar with either CSS or javascript but I'm getting better. I've been trying to work on the navigational menu for my website for two weeks and the progress is very slow. I finally got the dropdown menu to happen correctly, except one thing. When I scroll down on the "AccomButton" and move the mouse past the 50% point of the object, the animation for the "up" occurs. I have it set to do this on "mouseleave". This seems to be the only instance in which the "up" animation is occuring wrongly. If I hover on any of the top 50% of the "AccomButton", it stays in the down or "stop" position.
    Your help will be very much appreciated as my head hurts from banging it on the table the past two days!
    Sorry, I forgot to add the code:
    (function($, Edge, compId){
    var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes
       //Edge symbol: 'stage'
       (function(symbolName) {
          Symbol.bindElementAction(compId, symbolName, "${_Accommodations}", "mouseover", function(sym, e) {
             // insert code to be run when the mouse hovers over the object
             // play the timeline from the given position (ms or label)
             sym.play("drop");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_Accommodations}", "mouseleave", function(sym, e) {
             // insert code to be run when the mouse leaves an element
             // stop the timeline at the given position (ms or label)
             sym.stop("stop");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_HolstonButton}", "click", function(sym, e) {
             // insert code for mouse click here
             // Navigate to a new URL in the current window
             // (replace "_self" with appropriate target attribute for a new window)
             window.open("www.theriveroverlook.com/TheHolstonRoom", "_self");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_TennesseeButton3}", "click", function(sym, e) {
             // Navigate to a new URL in the current window
             // (replace "_self" with appropriate target attribute for a new window)
             window.open("www.theriveroverlook.com/TheTennesseeRoom", "_self");
             // insert code for mouse click here
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_AccomDrop}", "mouseleave", function(sym, e) {
             // insert code to be run when the mouse leaves an element
             // play the timeline from the given position (ms or label)
             sym.play("up");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_AccomDrop}", "mouseenter", function(sym, e) {
             // stop the timeline at the given position (ms or label)
             sym.stop("stop");
             // insert code to be run when the mouse enters an element
          //Edge binding end
       })("stage");
       //Edge symbol end:'stage'
    })(jQuery, AdobeEdge, "EDGE-379000071");

    I'm new to Adobe Edge and I'm not really familiar with either CSS or javascript but I'm getting better. I've been trying to work on the navigational menu for my website for two weeks and the progress is very slow. I finally got the dropdown menu to happen correctly, except one thing. When I scroll down on the "AccomButton" and move the mouse past the 50% point of the object, the animation for the "up" occurs. I have it set to do this on "mouseleave". This seems to be the only instance in which the "up" animation is occuring wrongly. If I hover on any of the top 50% of the "AccomButton", it stays in the down or "stop" position.
    Your help will be very much appreciated as my head hurts from banging it on the table the past two days!
    Sorry, I forgot to add the code:
    (function($, Edge, compId){
    var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes
       //Edge symbol: 'stage'
       (function(symbolName) {
          Symbol.bindElementAction(compId, symbolName, "${_Accommodations}", "mouseover", function(sym, e) {
             // insert code to be run when the mouse hovers over the object
             // play the timeline from the given position (ms or label)
             sym.play("drop");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_Accommodations}", "mouseleave", function(sym, e) {
             // insert code to be run when the mouse leaves an element
             // stop the timeline at the given position (ms or label)
             sym.stop("stop");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_HolstonButton}", "click", function(sym, e) {
             // insert code for mouse click here
             // Navigate to a new URL in the current window
             // (replace "_self" with appropriate target attribute for a new window)
             window.open("www.theriveroverlook.com/TheHolstonRoom", "_self");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_TennesseeButton3}", "click", function(sym, e) {
             // Navigate to a new URL in the current window
             // (replace "_self" with appropriate target attribute for a new window)
             window.open("www.theriveroverlook.com/TheTennesseeRoom", "_self");
             // insert code for mouse click here
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_AccomDrop}", "mouseleave", function(sym, e) {
             // insert code to be run when the mouse leaves an element
             // play the timeline from the given position (ms or label)
             sym.play("up");
          //Edge binding end
          Symbol.bindElementAction(compId, symbolName, "${_AccomDrop}", "mouseenter", function(sym, e) {
             // stop the timeline at the given position (ms or label)
             sym.stop("stop");
             // insert code to be run when the mouse enters an element
          //Edge binding end
       })("stage");
       //Edge symbol end:'stage'
    })(jQuery, AdobeEdge, "EDGE-379000071");

Maybe you are looking for

  • New bugs in 7.1.1 ive found.

    So on my iphone 5s ive come across this very small and innocent bug. With the phone dialer app when you open it with the tab set to the recent's section and then immediately switch to the keypad, there is a big checkmark like flash on the screen. Whe

  • Forms based authentication in sharepoint 2013 using custom membership provider

    I am developing  FBA  for SP2013 using custom membership provider using the following link  http://benredl.wordpress.com/2012/10/03/creating-forms-based-authentication-and-user-profiles-in-sharepoint-2013-using-custom-membership-and-role-providers-an

  • Question about DNG converter in Bridge CS4

    Hello, I just installed Photoshop CS4, When I updated, it downloaded a hefty update (199 megs), so my setup now is: Win XP pro Bridge 3.0.0.464 Camera RAW 5.7 Photoshop CS4 11.0.2 My Camera is a Panasonic Lumix FZ150 ( 2011 vintage) I have downloaded

  • Error Received MAC Mavericks with CS5.1... FILE.OPEN will not work

    I was just told CS5.1 is no longer supported by Adobe chat and to use this venu, so here it goes. 1) Operating System: MAC 10.9 Mavericks 2) Photoshop Version: 5.1 3) Problem:       * FILE>OPEN selection from the dropdown menu in the upper left Task

  • Make queriable a non based item

    hello all. what's the best way to make queriable (f7/f8 functionality) a non based item? i've tried dynamic sql but it's not admited in forms, and I don't think exec_sql it's the best way. any ideas? thanks in advance.