Play/Pause animation on cursor rollover!

Hi,
I have a sequence of images that make up an animation.
I want it so...
     - when the file initially opens, the first frame is showed
     - when the cursor rolls over the frame, the animation plays
     - the animation keeps playing until the cursor is taken off the frame, at which point it is paused.
My animation has sound.
No buttons, just plain and simple cursor roll over.
Thank you for any help you guys can give me!
Sam

Thank you so much for your help Ned!
But I'm still having problems....It's made no difference what so ever and I've done exactly what you've said.
I've got some pictures here to help.
Below is shot of my timeline as I see it...
This is also the code I have inserted on the first frame of the "Actions layer"....
These are some errors with the code (not sure if this is relevant)....
Any more ideas Ned?

Similar Messages

  • Play pause toggle button

    Hi,
    I'm new to Flash. Kindly help anyone.
    Need assistance to create toggle button. Here attaced two screenshots.
    1. inner-animation.jpg - it contains all movie clips and play pasue controls.
    2.main-animation.jpg - this is the main timeline ( inside all movie clips & control buttons)
    3.playbuton-inside.jpg - its a button symbol ( as well as pause )
    4. There also bg music and sounds for some particular animation.
    Here all working fine. But i need play & pause animation as a toggle button.
    Here is the code i added for pause:
    play();
    pause_btn.onRelease=function(){
    stop();
    Here is the code i added for pause:
    stop();
    play_btn.onRelease=function (){
    play();

    You are using AS2 code, so you should be posting in the AS2 forum (http://forums.adobe.com/community/flash/flash_actionscript?view=discussions).  If the intention is to use AS3 code, then you need to change things.
    If the intention is to use the same single button for both pause and play, then what you normally would do is establish a boolean variable that you se to determine whether the clicking of the button should play or stop the movie...
    var playMovie:Boolean = true; // assumes the movie is stopped at the start
    pause_play_btn.onRelease = function (){
       if(playMovie){
           play();
           // manage play/pause btn
       } else {
           stop();
           // manage play/pause btn
       playMovie = !playMovie; // reverse the value of the playMovie variable
    In that code where I show "// manage play/pause btn" is where you need to do whatever you need to make the pause/play button appear as intended... either hiding one or the other, or changing its frames to show the appropriate image.

  • Animation couldnt control with Play pause toggle button..

    I have multiple movie clip with bg sound.I have used the code AS3 for toggling the animation ( Play & Pause ).Automatically the animation starts and button also togggled on click but couldnt control the animation .
    I need some solutions like when the intial stage the animation wont start etither the button click to play.After that the flow as it is in action ( ON Click ). Kindly anyone guide me to solve it. i'm very new to flash. this is my first project and ihave to finish it soon..
    btns.visible = false;
    btns.addEventListener(MouseEvent.CLICK,onEl);
    dfr.addEventListener(MouseEvent.MOUSE_OVER,onEls);
    dfr.addEventListener(MouseEvent.MOUSE_OUT,onEld);
    btns.addEventListener(MouseEvent.MOUSE_OVER,onEls);
    btns.addEventListener(MouseEvent.MOUSE_OUT,onEld);
    var _vrSts:int = 0;
    function onEl(eve:Event):void    {
        if(_vrSts)    {
            trace('status:'+_vrSts);
            _vrSts = 0;
            btns.gotoAndPlay(1);
        }else    {
            trace('status:'+_vrSts);
            _vrSts = 1;
            btns.gotoAndStop(2);
    function onEls(eve:Event):void    {
        btns.visible = true;
    function onEld(eve:Event):void    {
        btns.visible = false;

    Hi Ned!
    i done it. here is the solution.One issuse is" End of the animation it goes to 1st frame with pause button, but intially there has play button."
    stop();
    btns.visible = true;
    btns.addEventListener(MouseEvent.CLICK,onEl);
    dfr.addEventListener(MouseEvent.MOUSE_OVER,onEls);
    dfr.addEventListener(MouseEvent.MOUSE_OUT,onEld);
    btns.addEventListener(MouseEvent.MOUSE_OVER,onEls);
    btns.addEventListener(MouseEvent.MOUSE_OUT,onEld);
    var _vrSts:int = 0;
    function onEl(eve:Event):void    {
        if(_vrSts)    {
            //trace('status:'+_vrSts);  
            _vrSts = 0;
            //btns.label = "Play";
            btns.gotoAndPlay(1);
            btns.visible = false;
            //if(currentFrame == 445)
                //gotoAndPlay(1);
                if(currentFrame == 445) {
                gotoAndPlay(1);    
                btns.gotoAndStop(1);    
            else
               stop();
            //btns.gotoAndStop(1);
        }else    {
            //trace('status:'+_vrSts);
            //stop();
            _vrSts = 1;
            btns.gotoAndStop(2);
            //btns.label = "Pause";
               play();
    function onEls(eve:Event):void    {
        btns.visible = true;
    function onEld(eve:Event):void    {
        if(_vrSts)
            btns.visible = false;

  • Missing Play/Pause 3D Animation pop-up Mac OS

    I am missing the Play/Pause Animnation popup in a 3D Pdf to open the animation sequenze slider in the Mac OS versions of Adoibe Reader. Is there a possibility to activate the slider?

    Thanks for your answer.
    The problem is, the toolbar is there, also the Play button. But beside the Play/Pause button in the win version there is a small triangle (like the one beside the Light button for example) to open the popup with the animation slider. That's what i'm missing. Same document works fine in the win version.

  • How can i change the settings of play/pause in Elements 13?

    Hello!
    How can i change the settings of play/pause in Elements 13? I definitely need cursor back to the "start play" point each time i hit stop (spacebar), like it works in Sony Vegas or in most of audio editing software. Can somebody help?
    Thanks!

    invasion 21
    The following is a copy of the reply that I posted to your question earlier today in the Adobe Premiere Pro Forum
    invasion21
    You are in the Adobe Premiere Pro Forum. What is your program? Is that Premiere Elements 13? If so, you are in the wrong forum where
    Premiere Pro answers may not be appropriate for your Premiere Elements (any version) question.
    You are not going to find what you are looking for in Premiere Elements preference settings.
    You write
    I WANT it playhead jump back to start play position, when i hit spacebar for pause.
    You can maneuver yourself into that through Edit Menu/Keyboard Customization/Applications/ and its Help category which by
    default shows
    Go to Timeline/Clip Start, using Home
    and
    Play/Pause Toggle, using Space
    But, you may find it is best to leave well enough alone. Explore and experiment with changing the keyboard shortcuts for the commands and decide what works for you.
    ATR

  • Play/Pause Button in AS3

    I have search the internet, but I cannot find a simple way to
    create a play/pause button in AS3. All the solutions I find are for
    older versions when buttons could have actionscript directly
    applied to them.
    I created a flash animation and exported it as a .swf to work
    with only one layer in a new .fla file. I have three layers
    created, button, video, and actionscript. What I need is a button
    that will look like a pause button when the animation is playing
    and to pause the animation when clicked. It would be nice if it
    could also switch to a play button when paused.

    I made a movieclip (ppBtn) with 2 frames. The first has the
    pause button and the frame label 'pause'. The second frame has the
    play button, 'play'. I placed your script into the action layer.
    When I preview the animation, the buttons just alternate really
    fast and have no fuction.

  • Call play, pause , stop gives an error

    Hi,
    I built something like toolbar(Dialog) that include three buttons , each one for play.pause and stop.
    I built that for the fullsize view screen there i cant click the Cursor player buttons.
    I try to write code inside the button click event to play the cursor in the active sheet:
    View.ActiveSheet.Cursor.Play(true) - but this give an error and then close the diadem(not responding error)
    (the same about pause and stop)
    Help please!!
    Thanks

    Hi Oz,
    Would you please submit your *.SUD file and any other files it calls so we can attempt to reproduce this problem?  If you're shy about posting to this forum, you can email me directly at [email protected]
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Play/Pause Button

    Hi does anyone have a script to play/pause an animation I
    have created? Thank you

    for timeline animation, using the movieclip's instance name
    followed by play()/stop() should play/pause your animation.

  • Why is play/pause in video never exact?

    I have a video and a play button in my project.
    The play button is set to play the video and the timeline, with triggers on the timeline telling the video and timeline to toggle play/pause at certain places. No autoplay on timeline or video.
    The video plays and pauses as it should, but no preview is exactly the same. Sometimes the video pauses half a second before or after the set trigger. Is Edge not stable enough to be 100% accurate all the time?

    Here it is. It´s very simple so you should be able to grasp all the actions I´ve taken pretty quick I suspect. Watch the animation in the timeline as well as preview, you´ll see that I´ve set the play/pauses at specific points. It´s crucial that they land right on, and not one or two frames later. I will have texts pointing in on the aircraft and if it doesn´t stop where I´ve set it to stop things won´t work.
    As for now, the preview doesn´t match the actions in the timeline. The first two, three pauses are correct but some of the later ones pauses different in every preview. Why?
    (After the last pause things play weird, don´t bother about that, I have to fix this first)
    http://adobe.ly/1CvBQho
    Thanks!

  • How best to handle a start button and a play-pause toggle button?

    Hello,
    Still new to AS3, on a project for a client. I'd appreciate advice on how best to handle the navigation for 5 movieclips set inside 5 separate frames on the main timeline. I have a play button on frame 1 to start the animation, but I'd like to include a play/pause toggle button on the other frames to finish the navigation. Everything works except the toggle button, when clicked, does toggle but does not stop the animation. I've copied the code, including the toggle button code on frame 4 below. How best to handle both a start button and a play-pause toggle button?
    Thanks for any help in advance.
    Frame 1:
    PlayBtn_mc.buttonMode = true;
    stop();
    PlayBtn_mc.addEventListener(MouseEvent.CLICK,startMovie);
    function startMovie(event:MouseEvent) {
    gotoAndPlay(2);
    Frame 2:
    stop();
    Frame 3:
    stop();
    Frame 4:
    RewindBtn_mc.buttonMode = true;
    RewindBtn_mc.addEventListener(MouseEvent.CLICK,rewind);
    function rewind(e:MouseEvent) {
    prevFrame();
    FFBtn_mc.buttonMode = true;
    FFBtn_mc.addEventListener(MouseEvent.CLICK,forward);
    function forward(e:MouseEvent) {
    nextFrame();
    ToggleBtn_mc.buttonMode = true;
    ToggleBtn_mc.addEventListener(MouseEvent.CLICK, doToggle);
    function doToggle(myevent:MouseEvent):void {
    ToggleBtn_mc.play();
    Frame 5:
    (Loops back to Frame 1)

    I can't tell you how appreciative I am of all your assistance.
    Could you double-check on this, I may have stumbled upon somthing- I tweaked your last code, which toggled, but didn't seem to call the scene_test_mc into action.
    But I copied below what both toggles the play/pause button and calls the mc into action. Could you verify this as reliable code and not a fluke that will break? Thank you so much! :
    ToggleBtn_mc.buttonMode = true;
    ToggleBtn_mc.addEventListener(MouseEvent.CLICK, doToggle);
    scene_test_mc.buttonMode=true;
    scene_test_mc.addEventListener(MouseEvent.CLICK, doToggle);
    function doToggle(myevent:MouseEvent):void {
    var mc:MovieClip=MovieClip(myevent.currentTarget);
    if(mc.currentFrame==1){
    mc.gotoAndStop(2);
    scene_test_mc.play();
    } else {
    mc.gotoAndStop(1);
    scene_test_mc.stop();

  • ?ipod no longer turns off by pressing and holding play/pause on click whee

    ipod had turned off before, but now cannot turn it off. It continues to stay on. I've tried to use hold switch to see if that helps, but ipod still won't turn off, and it uses up my battery. hold play/pause button doesn't seem to work?

    Did you try resetting it? I had the same problem with my 30gb video and it worked.

  • How can I get my Apple Remote to play/pause and do other functions on all applications?

    When I press the F8 button on my Macbook, it plays or pauses the media for whatever media application I have open, whether that's iTunes, VLC, or MPlayerX. Same goes for F7 and F9, which are backwards and forewards respectively.
    Well I recently bought an Apple Remote and expected that the same thing would go for the remote; the play/pause button would give the same command as the F8 button, so I could use the remote on whatever application that also supported the F7, F8, and F9 buttons. But apparently, that's not the case; so far I've only been able to control iTunes.
    So is there any setting I can change or program I need to install to have the Apple Remote buttons work just like the keyboard media buttons? I tried Remote Buddy, but that's not giving me specifically what I want since it's only designed to make specific programs compatible. But they still don't support for example MPlayerX, which is my default video player.

    Gosh, that must explain why it didn't come with a magic hat!
    I completely accept the fact that Apple designed it to do a limited set of functions, but in the post I asked if there was any program that I can install that causes it to do hit the function keys for me. There's already Remote Buddy, which intercepts remote signals and performs specific functions instead of the normal ones. How then can there not be a program that also intercepts them, but hits the function keys? Seems to me that that would be even easier than what Remote Buddy's doing.

  • How to change the size of youtube play/pause and progress bar?

    I have windows 8 and on internet explorer (hah), youtube videos play fine there. However, when I use Firefox, the display below videos showing the progress bar and play/pause decreases in size immensely. Is there a solution to this?
    This also applies to other videos on websites such as twitch, but not vimeo.
    I have tried changing font size to no avail, but I am relatively new to Windows (a Mac convert) and don't know the full options.

    I talked to Lenovo support and found the solution! Download the Youtube Center Add on to Firefox.
    https://addons.mozilla.org/en-US/firefox/addon/youtube-center/
    Then, click "Player" and change the Player Type to HTML5. Go to "Player Size" next (still under Player) and change the default to "Small". It works!
    If the other thread didn't get sufficiently solve,d feel free to link to this. I don't want to necro the thread though.
    Thanks to jscher2000 though!

  • I would like to know if there is such an app that allows my iPhone to act as a remote for my iPad ie if I'm recording something on my iPad I can use my iPhone to press record/play/pause/forward or rewind my iPad via my iPhone

    I would like to know if there is such an app that allows my iPhone to act as a remote for my iPad ie if I'm recording something on my iPad I can use my iPhone to press record/play/pause/forward or rewind my iPad via my iPhone

    As the King says, if your friends wifi router was relatively new, it likely has not been picked up by Apple's location based information database system and thus there is no location information associated with it.  So your iPad had no way of getting its location.
    The wifi location databases are traditionally updated by wardriving - literally companies employ people to drive around sniffing out active wifi signals and associating an approximate location to it.  Some companies also have web sites to submit that information if owners wish to (Apple does not seem to have one though), and the various companies with wifi location databases buy and sell their information.  Bottom line is though, it can take weeks, months or sometimes even longer for a residential router to get picked up - depends on where you live (more rural, likely the longer time it takes).
    When I moved from VA to NC it took up to 6 months for mine to reflect my new location (I checked it once the week I moved in, and then periodically thereafter, and it finally was getting it right after about 6 months) and I live in a pretty densley populated area (triangle NC).

  • IPod 5.5G Video, 30GB, No Sound Audio, Play/Pause Won't Shut Down, etc.

    Even though I have marked this topic as a question, it is more of a heads up for those having problems with Sound and Audio on the 5th Gen (Video) iPods.
    I was having audio problems like many others are describing and took it upon myself to look into the cause. I found that there is a problem with a flat ribbon cable that connects to the main board of the iPod. The issue is that there are very thin, gold plated traces of copper on a somewhat thin plastic backing which fits into a ZIF (i.e. Zero-Insertion-Force) connector.
    At issue is the amount of bending of the plastic cable when a clip on this ZIF connector is 'locked'. It seems that on some of these plastic ribbon cables, these small gold plated copper traces will crack and break, causing sound to come only from one channel or the other, or for scratchy sound, and even possible problems with the Hold switch. (I removed my Hold/Headphone Jack cable assembly and confirmed this under a microscope.)
    I don't know if the cracking is immediate upon the connector being locked, or if there is some length of time before cracking will occur. I also cannot say if this is truly a problem with the ZIF connector force, or the copper on the ribbon cable. There are different problems if the copper is too thin or too thick. Other problems can cause the copper to break, have problems adhering to the plastic 'ribbon', etc.
    Since this cable not only includes Left/Right Audio, but the Hold switch, units with this problem may not only have audio problems, but apparently have problem with the Hold switch not functioning properly and issues with Holding down the Play/Pause part of the Click-Wheel to power down an iPod. Another issue appears to be that the 'Clicking' noise of the Click-Wheel either becomes quiet or disappears altogether.
    Ok, here's the question part...
    Apple, do you have any knowledge of this issue? Is it systemic, or just several isolated units? Since the 5.5G is not in production, is it out of the question to hope to get a discounted repair or replacement part? What would your typical response be?
    (Note: I had an AppleCare contract that apparently doesn't run out until October of this year, but because I took it upon myself to open the unit I understand that this is now voided.)
    At this point I am thinking of buying a replacement Hold/Audio ribbon cable to install myself, but am very concerned that the part I purchase may also have these issues.
    Sincerely,
    Nobuo

    After all my worry, concern, and consternation, I took my own advice and went to see the Genius Bar at the local Apple store this afternoon on my way home from work, just to see if they knew about this issue. At least I was expecting they would tell me I was out of luck for opening the iPod, at most I thought they would take it in for service and then let me know they found I had opened it and that I'd have to either pay for service, buy a new one, or that they'd simply be returning it as is. Instead they offered to replace my iPod.
    I don't know if this was because I was starting to make other customers nervous (talking loud is a habit when I get anxious), and they said they don't work in individual parts like the flex ribbon cable which I told them in detail was defective - I even mentioned that I had tried to fix it by applying solder to fill in the breaks in the gold traces. But after 20 minutes of them listening to me and continually offering to exchange the iPod (not one, but two Genius' at the Genius Bar were offering me an exchange) - I gave in.
    I have to say parting with it was a bit of an emotional thing - I still had all my podcasts, songs, photos, etc, on the iPod (I would have wiped it, but I really didn't expect much - I don't know what I was expecting). Maybe I was thinking of all the Smart Playlists I would loose (again), and have to recreate (again), or maybe it wasn't wanting to part with it because I figured it would be my mod-ing unit (I had seen what some did to add 32GB Compact Flash to their iPods and was tempted to do this myself). It was a very lonely 30 min drive back home.
    I am still a bit gob-smacked with a 'New' 5.5Gen Video iPod. Part of me wants to thank Apple, and part of me wants to cry at loosing an old friend. (And I am sure there is a part that is sad that it wasn't me that fixed it.) I was also pretty well put in my place by the Genius when she said not to open the replacement. (If you've ever seen those TV shows where the actor becomes smaller and smaller when being scolded, that was me in the store.)
    The moral of my story is - *do not hesitate to take your product to Apple if you think it needs to be fixed!* It all definitely made me feel like Apple employees really do understand the value of 'Customer Service', even when the customer isn't always right. I hope others will learn from my mistakes.
    Sincerely,
    Nobuo

Maybe you are looking for