How to play to and stop on a frame?

I use this code to play a movie.  I can't stop on the last image.  It keeps resetting back to the first image.  I tried this.stop () and gotoandStop() with numbers of images and image labels, but none of it worked.

This.Stop ();

var myStartButton:StartButton = new StartButton;
addChild (myStartButton);
myStartButton.x = 284;
myStartButton.y = 255;
myStartButton.addEventListener (MouseEvent.CLICK, regarderME);

function playMe(event:MouseEvent):void {}
This.Play ();
removeChild (myStartButton);

if(this.currentFrame == This.totalFrames) {}

This.Stop ();
}

Add a stop() to the last frame of your movieclip.  Otherwise, you will need to create a loop that repeatedly times controls if currentFrame is totalFrames.  That is to say, if you check only when playMe() is running, it is most likely will fail.

Tags: Adobe Animate

Similar Questions

  • I have a program that runs in the background of my computer, how can I find and stop him

    How can I find and stop a program that runs in [t] he bottom of everything I do on my computer

    Press CTRL-ALT-DEL

    Launch the Task Manager

    In the Windows Task Manager, click the processes tab.

    Locate the process / click on it (to highlight) / then click on end process

    If my comments have helped please vote as helpful.

    Thank you.

  • How to play music and narration at the same time on windows movie maker?

    I'm working on a project and successfully, I could put my videos for a song. to get all the points for the project I need to explain what is happening in videos. I have now that I need to tell and I was able to do it too. I don't know how to play the narration without stopping the music, I need narration and music at the same time. I know this is possible because I found...

    You can add music and narration Audio / Music track in Windows Movie Maker. The two can play at the same time in your published movie. You can then adjust the audio levels to determine which audio will play louder than the other in your movie.

    Please write again (:)

    I'm working on a project and successfully, I could put my videos for a song. to get all the points for the project I need to explain what is happening in videos. I have now that I need to tell and I was able to do it too. I don't know how to play the narration without stopping the music, I need narration and music at the same time. I know this is possible because I found...

    You can add music and narration Audio / Music track in Windows Movie Maker. The two can play at the same time in your published movie. You can then adjust the audio levels to determine which audio will play louder than the other in your movie.

    Please write again (:)

    =================================
    Simple solution... Publish (save) your project in the
    film format .wmv to a folder on your hard drive.

    Re-import the file .wmv (as a new project) and now
    audio / music will be clear and you can add
    the narration.

    John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • How can I remove and stop online storage?

    Hello

    For the last day or so PE9 has terrible fonctionnee.

    I finally gave up and went back to PE8 and she does not good either.

    Then I noticed it says that my online backup complete.

    I have deliberately never used online backup, but I'm sure that what ever he does is why they run every two so bad.

    I don't want to store my stuff online and I can't find out how to keep him from doing what is practical and delete what is there.

    It took about 12 files to fill still.

    Never a whole video.

    I clicked on your online storage management and removed all the stuff, but I didn't know if I should click remove them items from the hard drive button.

    I don't want things removed from my hard drive, it they talk about their hard drive then OK.

    When I restarted the program he always says, it was full.

    So I think I have to say delete the hard drive, but I didn't want my files until I know what I'm doing.

    These two programs have always will work perfectly on my computer.

    I should have chosen something to launch it, now, I just want him to stop.

    He used to ask me to connect, now he's doing on his own.

    Any help welcome.

    Mike

    The items that you are looking for must be under the Edit > Preferences in the elements Organizer (your first screenshot) - NOT in Premiere Elements itself (your second screenshot).

    But the point confused, is that your organizer menus are not displayed!

    I got myself in the past and I think that it is due or when you apply too much a custom in the dialog box font size window color and appearance.

    Or if you have selected a too large of DPI (or too large a CIO custom in the display properties;)

    If you can remember something like that I suggest that you reset them and your menus should reappear.

    For a quick solution if you look at the following image closely you can see to the left of my red pointer arrow one ' > ' symbol. If you click on that ' > ' all the menus Organizer reappears as a large menu tree.

    What is the method that you choose to solve the problem, the menu option you want is shown here:

    See you soon,.
    --
    Neale
    Insanity is hereditary, get you your children

  • How to play subtitles and change volume in Windows 8 metro video app

    8 windows vedio app dosnt play subtitles, but when it is played the same file on vlc subtitles when played, also I do not see a volume control in the metro vedio app user interface

    Hi Alby,

    I want to tell you that subtitling must be available for the video you're watching. You can follow the steps to add subtitles on the video app:

    a. open the video application
    b. right click on the video you want to play
    c. Select playback options.

    If closed captioning is not available, you will see is not available.

    Note: You will get the subtitles only if the video has it.

    Hope that answers your query. You can write back to us for other queries/problems related to windows and we will be happy to help you further.

  • How do nested Movie Clip play once and then stop?

    Hi all

    I was looking for a simple solution to this issue for more than a year. I saw a few solutions

    that work, and lots of questions that remain unanswered questions.  So I thought that I get it from the pros.

    I have a nested clip (image sequence) I use the snippet of Flash CS5 GoToAndPlay.  The Clip

    loops continuously.  How to play once and stop.  I tried the snippet for the stop, I tried

    Stop(); in my layer "Actions".  I tried a stop(); in the last picture of my sequence nested.  I tried a stop to the

    end of the function, but nothing stops this 'thing'. He keeps going and going and going.  This is my typical of the code which

    loops...

    Stop();

    btn3.addEventListener (MouseEvent.CLICK, cd_ClickToGoToAndPlayFromFrame);

    function cd_ClickToGoToAndPlayFromFrame(event:MouseEvent):void

    {

    gotoAndPlay (1);

    }

    btn4.addEventListener (MouseEvent.CLICK, ef_ClickToGoToAndPlayFromFrame);

    function ef_ClickToGoToAndPlayFromFrame(event:MouseEvent):void

    {

    gotoAndPlay (10);

    }

    There are basically two (2) buttons on the page, and the back and the button forward and the sequence of images is nested in a

    video clip, in this case, to frame (1) and another nested video clip to frame (10).  How can I play once and stop

    on the last frame of the clip nested?

    Thank you

    Duane

    You are welcome.

    If my answer has worked for

    you, please indicate your question as answered.

  • Twice in loop and stop at a record label?

    Hello community,


    My question:

    How can I loop my entire animation twice * and after that judgment to label a frame?

    It's the same question about it , but this time to animate the CC.

    Example:
    A banner has 100 images. It must be a loop twice from 0 to 100, then plays entre0 and stop at frame 80.


    Thank you

    Michael

    * Copy the following code loops all the animation twice:

    {if(!this.alreadyExecuted)}

    this.alreadyExecuted = true;

    this.loopNum = 1;

    } else {}

    this.loopNum ++;

    {if(this.loopNum==2)}

    This.Stop ();

    }

    }

    You can place this code in the frame of 80, and he would do what you ask for. Make sure that in the publication settings, you have the chronology of verified loop box.

  • How to play a .swf movie in another project after every 10 seconds?

    Hello

    I have a Logo.swf file that plays once and stops. I want to use this flash animation in a flash using the CHARGERother project. Is actually what I need, I want to play this film each interval of 10 seconds using Actionscript 3. How can I have? Help, please.

    Thank you.

    Hello

    There are 2 scenarios for this:

    1. animation of the logo in the logo.swf is a movieclip and called the stop() function in the last picture.

    Solution:

    import flash.display.Loader;
    import flash.display.LoaderInfo;
    import flash.events. *;
    import flash.net.URLRequest;

    var logoSWF:MovieClip;
    var: timer = new Timer (1000);
    timer.addEventListener (TimerEvent.TIMER, playLogo);

    function loadLogo() {}
    var url: String = "logo.swf".
    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);
    Loader.Load (new URLRequest (url));
    }

    function completeHandler(event:Event):void {}
    Timer.Start ();
    var loader: LoaderInfo = LoaderInfo (event.currentTarget);
    logoSWF = MovieClip (loader.content);
    addChild (logoSWF);
    }

    function playLogo(event:Event=null):void {}
    logoSWF.logo.play (); 'logo' is the name of the instance to logo.swf
    }
    loadLogo();

    2. the animation of the logo in the logo.swf in the main timeline and has the astop() function in the main timeline.

    Solution:

    import flash.display.Loader;
    import flash.display.LoaderInfo;
    import flash.events. *;
    import flash.net.URLRequest;

    var loader: Loader;
    var: timer = new Timer (1000);
    timer.addEventListener (TimerEvent.TIMER, playLogo);

    function loadLogo() {}
    var url: String = "logo1.swf";
    loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);
    Loader.Load (new URLRequest (url));
    }

    function completeHandler(event:Event):void {}
    Timer.Start ();
    var loader: LoaderInfo = LoaderInfo (event.currentTarget);
    addChild (loader.content);
    }

    function playLogo(event:Event=null):void {}
    MovieClip (loader.content). play();
    }
    loadLogo();

    ///////////////////////////////////

    I hope this helps.

    Best regards

    Etienne Das

    http://deepanjandas.WordPress.com/

  • I have an iMac (2015).  When I open Garageband, there are only two buttons on the control bar, play and stop.  No record button, rewind or ff.  Where are they and how can I make it appear?

    I have an iMac (2015). When I open Garageband, there are only two buttons on the control bar, play and stop. No record button, rewind or ff. Where are they and how can I make it appear?

    Try to enlarge the GarageBand window by dragging the corners of resizing.

    If she looks like this, your window is small:

    You can also try to click the double arrow at the end of the toolbar to reveal more options.

  • How can I prevent the shutdown task scheduler engine, get the new display detected to work and avoid receiving the message "Internet Explorer has encountered a problem and stop"? __

    My laptop is a Dell Inspiron 1520, running Windows Vista Home Edition Premium and Internet Explorer 9.  My extra monitor is a Sharp Aquos LED HD - TV, the model LC-46LE700UN.  I've been using a VGA cable to me onnecter the laptop and TV.

    The laptop seems to operate normally when not connect to the TV.

    As soon as the VGA cable is connected to the laptop (without being connected to the TV), the following message appears:

    'Microsoft Windows - Task Scheduler engine has stopped working.  A problem caused the blocking of the program works correctly.  Windows will close the program and notify you if a solution is found. »

    When initially, I connected the laptop to TV, "new display detected" was automatically acti EV.  Soon, it was activated is no longer automatically.  I was able to activate manually using Windows Mobility Center during automatic activation failed initially but now Windows Mobility Center no longer detects the new view.

    Using Fn + F8, I can view the image on the laptop or TV, but not both simultaneously.

    The message "Internet Explorer has encountered a problem and stop" appears intermittently, but I can still make internet sites and show the content after the message.

    I have download software, myp2p.eu, a site for watching TV programs "streaming", including PPStream, Sopcast, Live, Stream Torrent Sina, a Swarm, TVAnts, UUSee, VGO and Veetle player and canceled downloads for PPL (who failed an integrity check), PPMate (corrupted) and (blocked) TVKoo.

    Norton Security quarantined the installer of UUSee, indicating that it was a high risk of program with many users.

    To a computer repair shop and using a different additional display flat screen, I could not duplicate the problems yesterday (4 October 2010), when the "new detected display" has been activated automatically, and I could see the photo or the other and both screens.

    I tried to restore the system to a date (on the list) before when the problems occurred first - failure of the restoration of the system.  I tried to use scandisk, but received no indication that he had performed and corrected all errors found after restarting Windows.  I looked at responses from forum, the display setting and the new display detected support literature.

    How can I avoid these problems?  Help!

    Hello

    Restoring the system end up with any error message?

    This could also happen if one of the substantive programmes is in conflict with the proper functioning of your computer. To troubleshoot error messages and other issues,
    You can start Windows Vista by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    Steps-
    1 log on to the computer using an account with administrator rights
    2. click on start, type msconfig.exe in the start search box and press ENTER to start the System Configuration utility.
    If you are prompted for an administrator password or for confirmation, type your password, or click on continue
    3. on the general tab, click Selective startup, and then clear the check box load startup items. (The check box use the file Boot is not available.)
    4. on the Services tab, click to select the skin all the Microsoft services check box, and then click Disable all

    Note: Following this step lets services Microsoft continue to run. These services include networking, Plug-and-Play, record of events, error reporting, and other services.
    If you disable these services, you can permanently delete all restore points. Do not do this if you want to use with existing restore points system restore utility

    See this article-
    http://support.Microsoft.com/kb/929135

    This should solve your problem.

    -Robert

  • How do you computer when you start upwards and stops

    How do you computer when you start upwards and stops?

    Hello

    1. You use any meaningful application in your system?
    2. Are you facing any problem sound in the computer or speaker?
    3. To better help you, let me know the brief description of the problem.
    4. Do you get audio startup in Windows?

    If you are facing problems of sound in the computer, see the link below:

    The startup sound is not played correctly when you start Windows XP, Windows Vista or Windows 7

    http://support.Microsoft.com/kb/321735

    Tips for solving common audio problems

    http://Windows.Microsoft.com/en-in/Windows7/tips-for-fixing-common-sound-problems

    It will be useful.

  • Is it possible to play or pause a video by clicking on the video itself than with a set of the command bar and stop buttons?

    Is it possible to play or pause a video by clicking on the video itself than with a set of the command bar and stop buttons? If Yes, how can we do?

    When you set the video object, just add a listener for events such as:

    myVideo.addEventListener (MouseEvent.CLICK, toggleVideoPlayback);

    private void toggleVideoPlayback(e:MouseEvent):void {}

    If play, pause

    If in pause, play

    }

  • How to play several audio files at the same time and mute toggle some voices?

    Hi all

    Forgive me if this is mentioned elsewhere and kindly point me in the right direction.  I'm a kid with flash and action script so if you are in doubt, error on the side of more specific in your response, there is a lot of vocabulary I still don't know.

    The goal:

    I have 4 audio files which are Soprano, Alto, tenor and low voice of a musical example.  The result should allow the user to play all 4 voices at once and dumb voice specific to hear all the possible combinations of voices playing together or solo.  I imagined a check box at the beginning of each rated musical line that puts that voice muted when checked.

    It would be ideal to have the game, interrupt and stop reproduction choices where 'Stop' resets playback at the start and 'Pause' maintains the current place in time and takes over from there, once playback is started again.

    I am able to get the simple audio files to play from a single button, but I am struggling to find how to link multiple audio files to start at the same time by a single button.  I found this link: https://forums.adobe.com/thread/1069107?start=0 & tstart = 0

    where the last message mentions the use of tables, but being a complete beginner, I don't completely understand what they are doing.

    I know it's a big piece of questions at once, but if you could meet any part of it, or direct me to a tutorial/instructions, I would really appreciate it.

    Thank you for taking the time to help others

    use:

    kglad wrote:

    use:

    import flash.events.MouseEvent;

    import flash.media.SoundTransform;

    var soprano: Sound = new Soprano();

    Var high: Sound = new Alto();

    var tenor: Sound = new Tenor();

    var bass: Sound = new Bass();

    Ash var: Array = [soprano, alto, tenor, low];

    var offsetA:Array =]

    var st: SoundTransform = new SoundTransform();

    play_btn.addEventListener (MouseEvent.CLICK, playF);

    pause_btn.addEventListener (MouseEvent.CLICK, pauseF);

    stop_btn.addEventListener (MouseEvent.CLICK, stopF);

    playF function (e: MouseEvent): void {}

    for (var i: int = 0; i)< sounda.length;="" i++)="">

    This ["sc_" + i] = [i] Sunda () .play;

    }

    }

    function pauseF (e: MouseEvent): void {}

    for (var i: int = 0; i)< sounda.length;="" i++)="">

    offsetA [i] = this ["sc_" + i] .position;

    This ["sc_" + i]. Stop();

    }

    }

    function stopF (e: MouseEvent): void {}

    for (var i: int = 0; i)< sounda.length;="" i++)="">

    offsetA [i] = 0;

    This ["sc_" + i]. Stop();

    }

    }

    function unpauseF(e:MouseEvent):void {}

    for (var i: int = 0; i)< sounda.length;="" i++)="">

    This ["sc_" + i] = Sunda [i] .play (offsetA [i]);

    }

    }

    function muteF(i:int):void {}

    St.volume = 0;

    This ["sc_" + i] .soundTransform = m;

    }

    function unmuteF(i:int):void {}

    St.volume = 1;

    This ["sc_" + i] .soundTransform = m;

    }

  • I've been upgraded to El Capitan and electricity went off and stopped the session.  I don't have time to continue for 12 hours.  It is the CV.  How can I cancel until I have more time?

    I've been upgraded to El Capitan and electricity went off and stopped the session.  I don't have time to continue for 12 hours.  It is the CV.  How can I cancel until I have more time?

    Hello nancy milano,.

    Thanks for this info and choosing the communities Support from Apple. I know how important is able to complete your update to El Capitan at a later date! The good news is that you can simply delete the "install Mac OS X" install app in the Applications folder on your Mac. Then you can open the Mac App Store when you're ready to update and restart the download from the tab updates or searching through the Mac App Store for El Capitan. This is a resource that explains the process of update more:

    Update of OS X El Capitan

    See you soon!

  • How to play the next song with the repetition of the same song over and over again

    How to play the next song with the repetition of the same song over and over again.

    In this screenshot, shot an Apple article, you can see four icons at the bottom of the screen. Look at the third argument of the right, with the two arrows going in a circle. It's the repeat function. When turned on, you can tap the icon to turn it off.

Maybe you are looking for