Playing one movieclip after another in as3

In as2 I am using:
_parent.gotoAndPlay(_parent._currentframe + 1);
to have one movieclip play and then when it finishes the next
movieclip plays. How do I do this is as3?

Thank you for posting your discovery! I was looking for quite
some time looking for a solution but asking the wrong questions to
the search engines. MovieClip(parent).nextFrame(); works for the
project I'm on but for the future is there away to determine from
the stage if an added Child is finished. I've been able to add a
listener for a sound clip and then execute a function:
drumSC.addEventListener(Event.SOUND_COMPLETE, drumsFinished);
but is there a way to listen for when a movieclip is
complete(hint Event.COMPLETE doesn't work)?
Thank you

Similar Messages

  • Embed question - play one movie after another

    I am trying to figure out how to play a short 10 second clip before each movie on my website. The clip may be a short ad or a promo and will depend upon the content of the main video. What is the code that enables you to play one move after another in a web page. I don't want to edit the two clips to become one cos over time the ads and promos will change. In Realplayer I remember using SMIL but how is it done in QT. I will eventually write code to write out the Embed tag but now i am just experimenting. Here is what my drupal site puts out
    <!-- start main content -->
    <!-- begin content -->
    <!--[if !IE]> <-->
    <object type="video/quicktime" width="483" height="381"
    data="http://www.1234567.com/files/videos/Mpeg4TestSnapX-480x360.mp4">
    <!--> <![endif]-->
    <!--[if IE]>
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="483" height="381" scale="tofit" >
    <![endif]-->
    <param name="src" value="http://www.1234567.com/files/videos/Mpeg4TestSnapX-480x360.mp4" />
    <param name="AUTOPLAY" value="true" />
    <param name="KIOSKMODE" value="false" />
    Your browser is not able to display this multimedia content.
    </object>
    Problems viewing videos?
    Download latest Quicktime Player

    Embed the initial movie clip as normal, but give it an HREF property.
    Set the source for the HREF to be the next movie, set autohref=true, and set target="myself". It's the same technique you use to build a poster movie but (a) instead of having the poster movie open QT Player, you have its target open in its own frame and (b) instead of waiting for a user to click the poster, you have the poster movie "click itself".
    Code that I used a very long time ago to display a "Loading..." graphic as a movie loaded (waste of effort, actually, as the movie is fast start and loads very fast):
    <embed
    src="loading.mov"
    height="208"
    width="256"
    autohref="true"
    href="Worm.mov"
    target="Myself">
    </embed>
    (of course this was before I learned about OBJECT and the need to use OBJECT to activate the ActiveX control in IE. Also, it's worth noting that the javascript hack isn't strictly necessary for IE users, but without it, IE users will get a security dialog before they get the movie.)
    The code above can be found on:
    http://capital2.capital.edu/admin-staff/dalthoff/adventures/worm.html
    --Dave Althoff, Jr.

  • ITunes won't play one song after another automatically.

    I have an iMac . iTunes has always played one selection after another automatically, and I am not talking about shuffle. I downloaded an audio book (Mp3 files) which loaded into music, but I have to choose each segment manually, it won't play one segment sequentially automatically.

    Are the selections un-checked?  Items that are not checked will not automatically play.  If they are checked, go into Get Info and see if you have the "Skip when shuffling" option set -- if it is, and if you happen to have Shuffle turned on, they won't play.

  • How do I play one podcast after another?

    Hello,
    I have iTunes 7.0.2 and I can't figure out how to play podcasts one after another ... like, when one podcast is done, to go on to play the next one. Any ideas?

    I think you can create a podcast playlist then drag episodes to it, and arrange them in the order you want to listen.
    Hope that helps.

  • Playing one video after another, PLZ help!

    Hi,
    Im trying to play one video and then when this finishes i want to start another. Can anyone help in any way?
    when i do it it seems to ignore the first video and start the second straight away. any idea why?
    Thank you all in advance.
    Lila

    You should add a controllerListener to the player you create, when the media file end, jmf raises the EndOfMedia event to controllerUpdate method. You can do whatever you want at this point.
    Aydin

  • Preventing iTunes from playing one song after another

    When I'm listening to music from my playlist, I notice that when the song reaches its end, iTunes automatically starts the next song in the playlist.
    I don't want that to happen--I just want the song to end and that's that. I would think being able to control this would be under Preferences but I couldn't find it there. Can anybody help me? Thanks.
    Jim

    you can always make a playlist with the one song you want to play or you can take the check marks out of all the songs in your playlist, this will allow you play only one song at a time, but they won't sync to your ipod or play in other playlists.

  • Playing one movie after another on one iDVD Project

    Hello,
    I am making a slideshow dvd that has two sets of videos. One is a slideshow from iPhoto in .mov format and a ending in .m4v My problem is that I need to play the slideshow first and then the ending without having to go back to a menu. How would I go about this. Thank you

    Hi
    Only way I know of is: Re-do the SlideShow in iMovie HD 6 as a full movie.
    Add this to Your iDVD project.
    No there are NON - Play all option in iDVD so when needing this one has to
    feed iDVD with one full movie and then double with each Chapter as an individual
    small movie.
    In DVD Studio pro this can be done: But price scarry and needs lot's of learning
    to do it right.
    Yours Bengt W

  • Playing one track after another.

    I have a good deal of classical music and different movements of many works are different tracks. So I have, say, Sonata in A flat, track 1, track 2, etc. I play the first track and then, instead of going to the next track, the ipod skips to a random song. How do I change this? Is there a way of telling iTunes/iPod that a series of tracks should be played together in a certain sequence.

    It sounds like you have 'Shuffle' play turned on.
    Go to the settings menu and make sure that Shuffle is set to 'Off'.
    Ian

  • How do i get music videos to play like the music does on my ipad, for example one right after another and shuffle

    I need to know how I can get the music videos on my IPad to play like the music does.  What I mean id setting up a playlist, shuffle, and have them play one right after another instead of going back to the main screen.

    At the top of the playlist where it shows the playlist title and the number of songs, there are two icons. Click the "play" triangle to add the entire playlist to "Up Next", or the "shuffle" symbol to do the same thing but in random order. But the currently playing track will stop playing, and all the songs in "Up Next" will be removed (replaced by the ones from this playlist).
    If you hold down the "option" key while clicking those icons, the currently playing song will continue playing, and the new playlist will be added to "Up Next" (above the songs that were already there).

  • I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    You're welcome.
    Going back to your original post:
    5) Tried running Itunes in 'safe mode', running itunes as an administrator..nothing.
    Was that iTunes' safe mode as opposed to Windows' safe mode? iTunes safe mode is invoked by holding down CTRL+SHIFT immediately after clicking the icon to launch iTunes and continuing to hold until this message pops up:
    Click continue, then close iTunes and reopen. With luck iTunes now opens normally every time.
    tt2

  • AS3: Tween from one MovieClip to Another

    Hi!
    As the title implies, I'm trying to use ActionScript 3 to tween from one movieclip to another based on an external event.
    I'm currently using two "Tween" objects to adjust alpha values. The first tweens-out the previous movieclip, and the second tweens-in the current movieclip. Code follows, with headers included for completeness:
    // headers
         import fl.transitions.Tween;
         import fl.transitions.easing.*;
    // tweens
         var MOVIECLIP1_out:Tween = new Tween(MOVIECLIP1, "alpha", Regular.easeOut, 1, 0, 3, true);
              var MOVIECLIP2_in:Tween = new Tween(MOVIECLIP2, "alpha", Regular.easeIn, 0, 1, 3, true);
    My issue, as you might suspect, is that the transition doesn't look right. The previous clip tweens to a blank white screen, and then the second is brought in. I need the tweens to overlap, as they would with a timeline-based tween.
    How do I remedy this? My solution was to create a loop, from 0 to 1 incrementing by 0.2, and setting the respective alpha values to increase and decrease. I also planned to set the time for each tween to one-tenth (0.1) of a second:
        var _out1: 1
        var _out2: 0.8
        var _in1: 0
        var _in2: 0.2
    while (_in1 <= 1)
        var MOVIECLIP1_out:Tween = new Tween(MOVIECLIP1, "alpha", Regular.easeout, _out1, _out2, 0.1, true);
        var MOVIECLIP2_in:Tween = new Tween(MOVIECLIP2, "alpha", Regular.easeIn, _in1, _in2, 0.1, true);
        _out1 = _out1 - 0.2;
        _out2 = _out2 - 0.2;
        _in1 = _in1 + 0.2;
        _in2 = _in2 + 0.2;
    This would result in ten total tweens, over one full second, as follows:
    time : Clip : alpha change
    0.1 : MOVIECLIP1 : 1 to 0.8
    0.1 : MOVIECLIP2 : 0 to 0.2
    0.1 : MOVIECLIP1 : 0.8 to 0.6
    0.1 : MOVIECLIP2 : 0.2 to 0.4
    0.1 : MOVIECLIP1 : 0.6 to 0.4
    0.1 : MOVIECLIP2 : 0.4 to 0.6
    0.1 : MOVIECLIP1 : 0.4 to 0.2
    0.1 : MOVIECLIP2 : 0.6 to 0.8
    0.1 : MOVIECLIP1 : 0.2 to 0
    0.1 : MOVIECLIP2 : 0.8 to 1
    And the transition is complete.
    I feel that there must be a smarter way to accomplish this task. Do I have my head screwed on right here? Any suggestions?

    I think that I posted this in the wrong forum... maybe an admin can move this to the AS3 section?
    Anyway, in the absence of an answer, I coded the following, and it works pretty well. I had to round the alpha values to the tenths place.
    YOURBUTTON.addEventListener
      MouseEvent.MOUSE_OVER,
      function(evt:MouseEvent):void
        var _out1:Number = 1;
        var _out2:Number = 0.8;
        var _in1:Number = 0;
        var _in2:Number = 0.2;
    while (_in2 <= 1)
        var MOVIECLIP1_out:Tween = new Tween(MOVIECLIP1, "alpha", Regular.easeOut, _out1, _out2, 1, true);
        var MOVIECLIP2_in:Tween = new Tween(MOVIECLIP2, "alpha", Regular.easeIn, _in1, _in2, 1, true);
        _out1 = int((_out1 - 0.2 + 0.05)*10)/10;
        _out2 = int((_out2 - 0.2 + 0.05)*10)/10;
        _in1 = int((_in1 + 0.2 + 0.05)*10)/10;
        _in2 = int((_in2 + 0.2 + 0.05)*10)/10;

  • My iPad air won't charge at all and I don't know if it's the charger or port help!i have had a new port put in before and it worked fine after but it's not working now! I have spent way to much trying to fix this thing one problem after another?

    My iPad air won't change at all, and I don't know if it's the port or charger cable it is charging normally but it just won't charge. I have had a new port put in before after a charger getting stuck in there but it worked fine after and now it's not working at all! I don't know if maybe it's the charger getting old but I have spent far too much money on this iPad then I should have as it's one problem after another witch is causing me lots of stress.

    Try giving your iPad a reset. Hold down the sleep and home keys for about 20 seconds. When you see the silver apple, let go and let it reboot and try again.
    How are you charging it? its's best charged plugged into the wall  not via USB. So if you're trying via USB, try using the supplied power block plugged into the wall.

  • Help!! As I was scrolling through my library, one folder after another had the photos in it turn to "static"!  Lots of streaks and dots!  What is happening and how do I save my photos?

        As I was scrolling through my Aperture library just now, I saw one folder after another turn the photos in that folder into garbage!   They have lines and dots and nothing recognizable - what in the world is causing this?    Can I get my photos back?    It almost looks like a virus eating my files - could it be - and if it is - is my entire computer in trouble?   HELP HELP HELP!

    Interesting that you posted this Cleaning up photo library about one hour before this post. I'd say there is a good possibility they are related.
    Without knowing your system, OS version and Aperture version and what you were doing to 'clean up' your library there is little we can do.
    My photo library is a mess.  I have moved things around a lot in a futile attempt to organize them, now I have a lot of placeholders with no files attached.  How do I clean things up?
    I suggest you restore from your backup and forgo the cleaning operation until you have a better grasp of the situation.
    BTW the Masters folder is organized by date and time of import at least in Aperture 3, if you are using 2 then all bets are off,
    Good luck with Apple support, if you want to try and get this sorted out post back the information I requested above.
    regards

  • HT201365 i forgot my pass code my home button doesnt work i cant restore because find my phone is on im frustrated and out of solutions my home button just stopped working today and it has just been one issue after another this morning help help help

    i forgot my pass code my home button doesnt work i cant restore because find my phone is on im frustrated and out of solutions my home button just stopped working today and it has just been one issue after another this morning help help help

    If you are unable to restore your iPhone with iTunes without having to enter the passcode, you will not be able to update your iPhone's backup. You will need to place the iPhone into recovery mode in order to restore the iPhone with iTunes and you can restore from the most recent backup available.
    http://support.apple.com/kb/ht1808

  • How do I get my iphone to play all my music one song after another ?

    Hi
    I cannot get all my music to play one one after another like on my Ipod ?
    I have to choose and satrt each song ?
    Can anyone help ?

    If you don't have the prior computer backup files, you may want to look at this to get your information from the phone:
    http://www.wideanglesoftware.com/touchcopy/index.php

Maybe you are looking for