Play a movieclip once, then go to the next frame on the main timeline

Hello, I'm sorry for the long topic's title.
I have an animation I'd like to use as an INTRO in my flash
movie. I will joint it inside a movieclip, giving it the istance
name "INTRO". And I position it in the first frame of the main
timeline.
How can I make possible that played once my intro (my
movieclip) the player jumps to the second frame of the timeline,
named by the istance "HOME".
Is it possible?
Thankyou very much for your help,
and great things.
Stebianchi

on intro's first frame place:
if(!this.played){
_level0.gotoAndStop(2);
and on its last frame place:
this.stop();
this.played=true;
_level0.gotoAndStop(2);
// or this.removeMovieClip(), if this is no longer ever used.
and if you use this, you don't need the frame 1 code.

Similar Messages

  • How do I loop back from the first frame to the last frame?

    Hi there,
    I'm currently working on the framework for a product viewer.
    I have:
    a movie clip called 'viewer_mc' which contains the images take from different angles of the product. The actionscript generates a script on the last frame of this that returns it to frame 1.
    a button instance called 'autoplay_btn' which plays through the movie clip from whatever the current frame is, and stops on frame 1.
    a left and right button which serve to move the movie clip frame, to give the appearance that the product is rotating.
    I have succeeded in getting it to:
    have the movie clip play through once, return to frame 1 and stop.
    have the buttons return functions when held down, that move the frame in the movie clip using nextFrame and prevFrame commands. The right button successfully loops round to frame 1 and continues functioning to give the appearance of continual rotation.
    The last problem I am experiencing is getting the left button to act in the corresponding manner, going from the first frame to the last and continuing to function.
    Here is my actionscript so far:
    import flash.events.MouseEvent;
    var lastFrame:Number = viewer_mc.totalFrames;
    var thisFrame:Number = viewer_mc.currentFrame;
    var backFrame:Number = viewer_mc.currentFrame-1;
    1. This is the part that gets it to play through once before returning to the first frame. I think perhaps the problem I am experiencing is because of the 'viewer_mc.addFrameScript(lastFrame-1, toStart)' part i.e. although I'm holding the left button, its returning to this script and therefor getting bounced back immediately to the first frame. However, there is no flicker on the screen which you might expect if this were the case
    Note - as this is a generic product viewer which I can use as a template I am using lastFrame etc. as opposed to typing the value in
    function toStart (){
              viewer_mc.gotoAndStop(1);
    viewer_mc.addFrameScript(lastFrame-1, toStart);
    2. This is the functionality for the autoplay_btn that will play through a rotation / return the viewer to the initial (frontal) view of the product (frame 1).
    autoplay_btn.addEventListener(MouseEvent.MOUSE_DOWN, autoplay);
    function autoplay (ev:MouseEvent):void{
              var startFrame:Number = viewer_mc.currentFrame;
              viewer_mc.gotoAndPlay(startFrame);
    3. This is the functionality of the right button, which when held, moves the movie clip to the next frame via the 'rotateRight' function based on the 'nextFrame' command. It loops back round to the first frame due to the 'viewer_mc.addFrameScript(lastFrame-1, toStart)' script generated on the last frame of the movie clip, as is desired.
    right_btn.addEventListener(MouseEvent.MOUSE_DOWN, rightDown);
    function rightDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stoprightDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateRight); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stoprightDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateRight);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stoprightDown); //remove the listener for mouse up
    function rotateRight(e:Event):void {
        viewer_mc.nextFrame();
    4. This is the functionality of the left button, which when held, moves the movie clip to the prev frame via the 'rotateRight' function based on the 'prevFrame' command. And this is where the problem lies, as although it works for getting the movieclip back to frame 1, it does not loop round to the last frame and continue functioning, as is wanted.
    left_btn.addEventListener(MouseEvent.MOUSE_DOWN, leftDown);
    function leftDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stopleftDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateLeft); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stopleftDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateLeft);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stopleftDown); //remove the listener for mouse up
    I'd imagine it is probably my logic for this part that is really letting me down - I can do a similar function in actionscript 2, but am trying to learn actionscript 3 just to move with the times as it were, and struggling a bit. Still this is only a few days in!
    function rotateLeft(e:Event):void{
              if(thisFrame==1){
                        gotoAndStop(viewer_mc.totalFrames-1);
              } else{
              viewer_mc.prevFrame();
    Any help you can give me would be gratefully received. For an example of the effect I am trying to achieve with the autoplay button etc. I recommend:
    http://www.fender.com/basses/precision-bass/american-standard-precision-bass

    Thanks for getting back to me.
    Here's the code without my comments / explanations:
    import flash.events.MouseEvent;
    import flash.events.Event;
    var lastFrame:Number = viewer_mc.totalFrames;
    var thisFrame:Number = viewer_mc.currentFrame;
    var backFrame:Number = viewer_mc.currentFrame-1;
    function toStart (){
              viewer_mc.gotoAndStop(1);
    viewer_mc.addFrameScript(lastFrame-1, toStart);
    //last image of viewer_mc = first image of viewer_mc
    autoplay_btn.addEventListener(MouseEvent.MOUSE_DOWN, autoplay);
    function autoplay (ev:MouseEvent):void{
              var startFrame:Number = viewer_mc.currentFrame;
              viewer_mc.gotoAndPlay(startFrame);
    right_btn.addEventListener(MouseEvent.MOUSE_DOWN, rightDown);
    function rightDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stoprightDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateRight); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stoprightDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateRight);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stoprightDown); //remove the listener for mouse up
    function rotateRight(e:Event):void {
        viewer_mc.nextFrame();
    left_btn.addEventListener(MouseEvent.MOUSE_DOWN, leftDown);
    function leftDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stopleftDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateLeft);//while the mouse is down, run the tick function once every frame as per the project frame rate
    function stopleftDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateLeft);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stopleftDown); //remove the listener for mouse up
    function rotateLeft(e:Event):void{
              viewer_mc.prevFrame();
    The definition of the rotateLeft function is where the problem lies I think - I've taken out my poor attempts at doing the logic from the previous post. If I were to write it out long-hand the statement I want to write is: 'If you get to frame 1 and function rotateLeft is called go to the end of the movie clip'.
    The reason I have to use the viewer_mc.totalFrames-1 definition in the addFrameScript call is the addFrameScript function is 0 based i.e. if you want to call frame 1 of the movieclip you have to return a value of 0 in the addFrameScript (or such is my understanding of it anyway). As such, the last image in the movie clip will need to be the view obtained at 360 degree rotation, which is of course the same view as at 0 degree rotation. As a consequence, the last frame in the movie clip is superfluous for the user, but necessary for the overall effect to be achieved. And, in addition, to keep up the effect of a 360 degree view when the rotateLeft function is called it needs to skip that last frame to go to the lastFrame-1 (or totalframes-1), or in other words, the view of the image prior to completing the full 360 rotation.
    the variables thisFrame and lastFrame are defined at the very top of the script. Like you said they might need to be defined or called on again elsewhere.

  • Queued up events are supposed to get processed the next frame, but in practice it is not true!

    According to Adobe's documentation found here, there are 3 parts to runtime code execution: events, the enterFrame event, and rendering. Events, it says, are processed during the first part. It then states:
    If events occur during other parts of the execution cycle, the runtime queues up those events and dispatches them in the next frame.
    However, when I'm seeing a low framerate, and lots of input events occur (say mouseclicks for example), those events are sometimes not executed until several seconds and 10s of frames later. According to that documentation, all my mouseclicks should be processed on the next frame and the event queue should then be empty (assuming I don't click during the next frame). This problem only occurs in Firefox and Internet Explorer. Chrome, Safari, and the standalone player behave correctly, in that they process all input events on the following frame.
    Why is this happening? It seems like the Firefox and IE plugins implement event handling differently than what is described in the flash documentation, or is it possible the browsers are responsible for delaying the input to flash?

    each clock cycle, if no new objects were created and no previously created objects are eligible for gc:
    Flash checks for any events completed from the previous cycle.
    Then it executes the listener function code, if there is any, for those events.
    Then if you have code on a frame that was just entered, that code will execute.
    Then it dispatches the Event.ENTER_FRAME event to all your listeners for that event.
    Then the display is rendered.
    in view of that and knowing that time alone cannot be used to determine in which cycle anything occured in flash, what evidence do you have that an event dispatched in one cycle failed to be detected by a listener in the next cycle?

  • TS1717 I just downloaded a song and it only plays the first 50 seconds and then moves to the next song in the list. How can I get it to play the rest of the song?

    I just downloaded a song and it only plays the first 50 seconds and then moves to the next song in the list. How can I get it to play the rest of the song?

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copy of the track and try redownloading a fresh one. See the following document for instructions:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the item, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.

  • After i have downloaded an album from iCloud to my new macbook pro. Itunes will only play one song at a time. If i hit the fast forward or back button will not do anything. I have to use the mouse to hit the next tidal in the album then hit play for it

    after i have downloaded an album from iCloud to my new macbook pro. Itunes will only play one song at a time. If i hit the fast forward or back button will not do anything. I have to use the mouse to hit the next tidal in the album then hit play for it to play the next song. Or put it in the UP NEXT.

    First, make sure these items have checkmarks next to their names in iTunes. Continuous playback only works on checked items. Itunes will play all checked items in a list whether or not they're from the same album.
    If you see that nothing in your library is checked and you want to check everything, hold down Ctrl while checking an item. This checks everything.
    Next, fixing the "1 of 1" problem is easily. Select all the tracks that make up the book/album. Let's say there are 15. Press Ctrl-I. Doublecheck that the album box is filled in with the name of the book, and if not, type it there. Enter "15" in the box for the total number of tracks. Click OK. Now all the items should be "1 of 15," "2 of 15," and so on.

  • How can i do to make the iPod play the next album when the albums that it's playing finish?

    How can i do to make the ipod play the next album when the album that is playing finish? because when tha album that i'm listening to is over ihave to select another, and i want to listen all the albums continuously
    Thanks

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, then sign back in with the other ID.  When you delete the account it will prompt you about what to do with the iCloud data.  If you need to migrate it and merge it with the data in the new account choose Keep on My iDevice; then choose Merge to upload the data and merge it with the new account.  If your data is already in the other account and you don't need to migrate it to the other account, choose Delete from My iDevice.

  • How do I set up iTunes to automatically move on to play the next album after the last one has finished? (in Album view)

    How do I set up iTunes to automatically move on to / play the next album after the last one has finished? (in Album view).
    This used to happen automatically in Genre view.

    Hi Henryhippo,
    If you have questions about play order in iTunes, you may find the following article helpful; I believe you can use the Play Next or Add to Up Next to add albums as well as songs.
    iTunes 11 for Windows: Ways to play songs
    Regards,
    - Brenden

  • TS1718 I can't get iTunes to simply play the next song on the list

    I can't get iTunes to simply play the next song on the list. It simply stops after playing one song.

    That's consistent with all the tickboxes to the left of the tracks (in Song view) being unchecked.
    Go into Song view and Ctrl-click (on Windows) or Command-click (on Mac OS) one of the empty boxes to do a "global recheck".
    If you can't see the tickboxes, head into your General preferences tab and select "Show list tickboxes" as per the following screenshot (it's for an earlier version of iTunes, but the boxes are in roughly the same place in the recent versions 11.x):

  • After playing the song I selected in iTunes 11 it jumps to the another album rather than playing the next song on the original album I selected.  ***?  How do I fix this?!?!?

    After playing the song I selected in iTunes 11 it jumps to the another album rather than playing the next song on the original album I selected.  ***?  How do I fix this?!?!?

    I found that clearing the "Up Next" list fixes the problem.  But I have to clear that list everytime I just want to hear just that one album.  Each time I select on song on the album, the "Up Next" list builds it's own list rather than just play through the album.  I think this has something to do with the issue.  How can I fix this?!?!

  • Once a timer is at 40 go to the next frame.

    Hey there,
    When a timer in my game hits 40 I want it to go to the next frame. Here is what I have:
    onClipEvent (enterFrame) {
              var atFrame:Boolean = false;
              if (_root.timer == 40) {
                        atFrame = true;
              } else {
                        _root.timer++;
              if (atFrame == true) {
                        myRandom = random(3);
                        if (myRandom == 0) {
                                  gotoAndStop("game1");
                        if (myRandom == 1) {
                                  gotoAndStop("game2");
                        if (myRandom == 2) {
                                  gotoAndStop("game3");
    Where "game1-3" are the names of my frames. And timer is the name of my dynamicText.
    Any suggestions as to why this isn't working would be greatly appreciated.
    Kind Regards, Eric

    first of all your variable must be initiated
    _root.timer=0
    Yor code is insede a MovieClip?
    I change the code
    _root.timer = 0;
    onClipEvent (enterFrame) {
              var atFrame:Boolean = false;
              if (++_root.timer == 40) {
                        goGame();
    function goGame() {
         myRandom = int(Math.random()*3);
          if (myRandom == 0) {
              _root.gotoAndStop("game1");
         if (myRandom == 1) {
              _root.gotoAndStop("game2");
         if (myRandom == 2) {
              _root.gotoAndStop("game3");

  • Recently, after cancelling the tick of a song, which is the next song after the one I am listening, in the song list, the canceled song will still run for the next song. I remember that it used not to happen like this. How can I solve this problem?

    Recently, after cancelling the tick of a song, which is the next song after the one I am listening, in the song list, the canceled song will still run for the next song. I remember that it used not to happen like this. How can I solve this problem?

    This looks like a change of behaviour in iTunes 12. Once songs are queued up to the Up Next list then they play whether ticked or not. If you want to skip certain songs already queued click the Up Next tool, then click the small X to the left of the song that appears when you hover over it.
    tt2

  • HT201269 Have new iPhone 5s and older iPad ( looking to buy new iPad ) question for both is should I hook them up to mu computer and back up the computer on each devise and sink and than the next one.  The second question is should I do the I pad first ca

    Have new iPhone 5s and older iPad ( looking to buy new iPad ) question for both is should I hook them up to y computer and back up the computer on each devise and sink and than the next one.  The second question is should I do the I pad first cause it has photos in my email that have not been downloaded and it is one of or is the first model

    No it's not stealing. They have an allowance that you can share with so many computers/devices. You'll have to authorize her computer to play/use anything bought on your acct. You can do this under the Store menu at top when iTunes is open on her computer.
    As far as getting it all on her computer....I think but I am not sure (because I don't use the feature) but I think if you turn on Home Sharing in iTunes it may copy the music to her computer. I don't know maybe it just streams it. If nothing else you can sign into your acct on her computer and download it all to her computer from the cloud. Not sure exactly how to go about that, I haven't had to do that yet. I wonder if once you authorize her computer and then set it up for automatic downloads (under Edit>Preferences>Store) if everything would download. Sorry I'm not much help on that.

  • Can I use action build to fade one table row as I move to the next row in the table?

    I have built a table with 6 rows.  Right now,I am building the table row by row when I play the slide. Is there a way to fade or dissolve one row when I move to the next row in the table? I want to be able to de-emphasize the row I just discussed when I move to the next row in the table. I can fade the entire table by invoking that action but I do not seem to be able to use this action one row at a time. Thanks for your comments and assistance.

    you will have to use a workaround to get the exact effect you described
    create a table with out any text
    use text tool to add text and position in each table cell
    select the text boxes( command click) in the first row and group them (arrange > group)
    use a, build in, to display text and then a, build out, to remove it
    repeat the above for the other rows

  • Newbie: How to go to the next frame after movie clip is complete

    I know this should be the simplest thing to do, but I can't
    figure it out. I have a movie clip on my timeline. I want it to
    play completely before the timeline moves to the next frame. Can
    someone point me in the right direction?

    On the last frame in the movieclip, place this code (it's
    Actionscript 2).
    _parent.nextFrame();

  • After the next updating of the browser to 13th version such problems have occured : 1. At each start of Firefox constantly there comes a window of check of addi

    After the next updating of the browser to 13th version such problems have occured :
    1. At each start of Firefox constantly there comes a window of check of additions on compatibility, that on the previous versions was not observed.
    2. To the homepage at start the page has added (http://www.mozilla.org/ru/firefox/13.0/whatsnew/?oldversion=rv:12.0) or "Ура! У вас стоит последняя версия Firefox."Besides in options the page is not changed.
    I.e. all the things happen after Firefox is updated, but only now it is constant.
    WinXP SP3

    See these articles for some suggestions:
    *https://support.mozilla.org/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
    *https://support.mozilla.org/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
    *http://kb.mozillazine.org/Preferences_not_saved
    It is also possible that there is a problem with the file(s) that store the extensions registry.
    Delete the files extensions.* (e.g. extensions.sqlite, extensions.ini, extensions.cache) and compatibility.ini in the Firefox profile folder to reset the extensions registry.
    *https://support.mozilla.org/kb/Profiles
    New files will be created when required.
    See "Corrupt extension files":
    *http://kb.mozillazine.org/Unable_to_install_themes_or_extensions
    *https://support.mozilla.org/kb/Unable+to+install+add-ons
    If you see disabled, not compatible, extensions in "Tools > Add-ons > Extensions" then click the Tools button at the left side of the Search Bar (or click the "Find Updates" button in older Firefox versions) to check if there is a compatibility update available.

Maybe you are looking for

  • Unable to capture screenshot of Agentry Client v 7.0.1.207

    Once you have logged a user in the Agentry Client application, it is no more possible to capture screenshots of the Agentry client application. I got an error "Unable to capture screenshot. USB storage may be in use" However you can take screenshots

  • Need info on Flash to Hardware Communication via TCP/IP

    Need someone to throw light on how to talk to hardware devices from flash. For instance a message needs to be sent to mobile on click of a button, looks complex but this just an example. would like to just the method that one needs to follow to achiv

  • Please remove my credit card from my account

    Someone is placing charges only acct.  remove my credit card

  • Applescript to automatically update the EyeTV DVB EPG program guide

    For EyeTV users in Europe and Australia with DVB EPG access, you will all know that EyeTV will not keep that database automatically updated. So I wrote this bit of Applescript will update EyeTV's free to air DVB EPG database. Paste it into the Apples

  • Css stickiness based on the http header

    there is CSS 11503 that should load balances the traffic between 2 servers running IIS (http port 80). In front of load balancer there is a reverse proxy, that hides all real ip addresses of users that send requests to web-servers. The customer would