Getting a movie clip to stop playing, when another one is activated.

Hello,
I have a file with 3 movie clips and three buttons that control them to play...with the script below It is working fine.
stop()
function startImageOne(Event:MouseEvent):void
    imageOne_mc.play();
function startImageTwo(Event:MouseEvent):void
    imageTwo_mc.play();
function startImageThree(Event:MouseEvent):void
    imgThree_mc.play();
start1_btn.addEventListener(MouseEvent.CLICK, startImageOne);
start2_btn.addEventListener(MouseEvent.CLICK, startImageTwo);
start3_btn.addEventListener(MouseEvent.CLICK, startImageThree);
Then, I wanted to stop a movieClip, if another one was selected to play..so I inserted stop options to the function, which I thought would work, but doesn't. Does any one know why...See this code below..
thanks
stop();
function startImageOne(Event:MouseEvent):void
    imageOne_mc.play();
    imageTwo_mc.stop();
    imgThree_mc.stop();
function startImageTwo(Event:MouseEvent):void
    imageTwo_mc.play();
    imageOne_mc.stop();
    imgThree_mc.stop();
function startImageThree(Event:MouseEvent):void
    imgThree_mc.play();
    imageOne_mc.stop();
    imageTwo_mc.stop();
start1_btn.addEventListener(MouseEvent.CLICK, startImageOne);
start2_btn.addEventListener(MouseEvent.CLICK, startImageTwo);
start3_btn.addEventListener(MouseEvent.CLICK, startImageThree);
thanks
Babs

Hi Ned,
I checked the names and they are all correct...(I named one of the instances img instead of image, but it is all fine.
The movie clips are simple...They have a stop action in the first frame, and then it is just an image that fads in and fades out..
Pretty simple?
The code looks fine, so I can't figure out, why the movie clip that is currently playing doesn't stop, when another button is activated.
It seems like is should work??
I'll keep playing .. thanks!!
babs

Similar Messages

  • How can I get an flv video to stop playing when I exit the page it's on?

    The audio continues to play no matter where I navigate on the site.
    Thanks

    You want to stop the audio from playing and also downloading more video/audio if it is still downloading when you go to a new keyframe where the video display/component or mp3 player is removed from the stage because it's keyframe ended or do not exist anymore but you still hear the audio.
    Add an event listener to your video playback component that calls a function when the flash player tries to remove the video plaer from the stage that stops the netstream or at least stops/pauses the video playback.
    [link removed]
    //sample NetConnection and NetStream classes when the video player is removed from the stage tell the NetStream to stop playing or downloading the content with .close();
    var connection:NetConnection = new NetConnection();
    connection.connect(null);
    var stream:NetStream = new NetStream(connection);
    addEventListener(Event.REMOVED_FROM_STAGE, videoRemovedFromStage);
    function videoRemovedFromStage(e:Event){
       stream.close();

  • I need to play a song on a Keynote presentation, how do I do this ? I use to drag and drop the mp3 in Keynote but it stops playing when the slide move to the other one... how can I make the song keep playing through the whole presentation ? Thanks.

    I need to play a song in a row in a Keynote presentation, how do I do this ? I use to drag and drop the mp3 in Keynote but it stops playing when the slide move to the other one... how can I make the song keep playing through out the presentation ?
    Thanks.

    Drag the file into the audio window in the Document inspector...

  • How do I get a movie clip to play fully in an iphoto slide show.

    How do I get a movie clip to play fully in an iphoto slideshow.  Right now it only plays for a few seconds, while the complete clip is 22 seconds.

    Bring up the Settings pane for the slideshow and click on the movie clip in the tray at the top.  Then in the Settings pane click on This Slide button and set the play time to the actual length of the movie clip. 
    OT

  • Laptop (EliteBook 6930p) speakers stop playing when docked (HSTNN-IX01 PA286A)

    This is very frustrating problem.
    My laptop's (EliteBook 6930p) internal speakers play audio just fine but as soon as I place the laptop on the docking station (HSTNN-IX01 PA286A), speakers stop playing.
    Audio output device stays the same as 'speakers' whether docked or not.
    While docked, I can get audio out through line out on the laptop as well as the line out on the docking station.
    But the built-in speakers just will not play while docked.
    Sound is not mutted, volume level is not hear 0%, it just stops playing when docked.
    I've tried, reinstalling audio drivers as administrator under freshly installed Vista and Windows 7.
    Same behavior is observed under the two different OS's I've tried.
    Is it just not possible to get audio out of the built-in speakers when docked to this docking station?
    Is there anyone who can confirm built-in speakers working whiled docked to this particular docking station?

    Hello vlsi2000,
    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial product. You can do this at http://h30499.www3.hp.com/hpeb/ .
    I hope this helps!
    Thank you
    I worked on behalf of HP.

  • IPOD 5G 60Gig Stops playing when moved

    Have a 5G 60 gig ipod that stops playing when its moved - even slightly. This problem is 'intermittent', in that I can sometimes run with it and it continues to play, but sometimes if I move it even slightly the song will stop. I can start it again - and it starts correctly from where it stopped. The majority of the time I have the hold button engaged. It doesn't matter if I'm playing a video, song, etc.
    Any suggestions would be greatly appreciated. If there is a firmware update or other software fix that corrects this I would appreciate a pointer. Thanks much. E.

    You may need to reset it. Put the hold switch to the OFF/White position. Now toggle it ON/orange then back off again. Then press and hold both the MENU and center buttons on the iPod and hold them for a good 15 seconds or so. Your iPod should reboot starting with the Apple Logo screen.
    If it doesn't work the first time, give it a second or third go. Sometimes it takes a few tries.
    http://www.apple.com/support/ipod/five_rs/

  • Why does my browser constantly have to stop playing when watching You Tube?

    Why does my browser constantly have to stop playing when I watch You Tube or other videos?
    this is driving me nuts. It stops and then starts up again after a few seconds and then stops again and re-starts.
    Happens on both Safari and Firefox.
    Can anyone help?
    Message was edited by: kathrynfromsananselmo

    Hi Kathryn ...
    Most YouTube content requires the Flash plugin... try troubleshooting.
    Quit Safari and Firefox if they are open.
    Now uninstall the Flash plugin then reinstall new >  Troubleshoot Flash Player | Mac OS
    Use Safari to test. Launch Safari From your Safari menu bar click Safari > Empty Cache
    Now try a video.
    BTW... if you have the ClickToFlash extension installed in Safari > Preferences - Extensions, that can prevent Flash based video from streaming. It can also be installed as a plugin in /Library/Internet-Plug-Ins.
    And check to see if Safari is running in 32 bit mode. Right or control click the Safari icon in your Applications folder then click Get Info. If the box next to:  Open in 32 bit mode  is selected, deselect, quit then relaunch Safari to test.

  • IOS8 - Music stops playing when I open Messages app

    Since downloading iOS8, my music stops playing when I open the Messages app.  I have to go back to the Music app to begin playing the music again once I have closed the Messages app.  I assume it has something to do with the video/audio message feature.  How can I get my music to continue playing when I open the messages app?

    Rebooting my phone (a 5S) solved this issue, at least temporarily. I was ready to rush to the Apple Store and beg them for an iOS 7 phone; no music while texting is a definite deal breaker for me.

  • IPod no longer stops playing when a podcasts ends

    Starting with iPod software 2.1 and iTunes 8.0, my iPod Touch 1st Gen. no longer stops playing when the end of a Podcast is reached. It will start playing the next Podcast episode in the list although that is an older podcast that I have already listened to.
    Prior to these software updates, I would be listening to, let's say, the MacCast podcast number 100, when it finished, the iPod would stop. I could then go up the list and play a newer episode or switch to a different podcast. However, now, once episode 100 finishes, the next episode down the list is number 99 and it starts playing automatically (even though I have already listened to it).
    Is there some new setting I am missing? Is anyone else having this problem?
    Regards,

    It's a new "feature" of the latest firmware upgrade.
    I personally hate it.
    Send Apple feedback here:
    http://www.apple.com/feedback/

  • Why does pandora stop playing when i unlock my phone

    Why does pandora stop playing when i unlock my phone?

    Hello wayne1722
    If you are having issues with the Pandora app, check out the article for troubleshooting the issue.
    iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/TS1702
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • HT4211 why youtube stops playing when you want to see your facebook status

    i am a new user of iphone , i want to know why does youtube stops playing when you switch to another app, why cant it continue playing while we check someother app.

    Probably because Google did not program it to keep running in the background.
    Its up to the App developer to provide this functionality.

  • Sounds stop playing when user locks screen on iOS with AIR 3.9 Beta

    We built a simple application that should play sounds when in background and when the screen is locked.
    Since we updated to the latest AIR 3.9 Beta SDK, all sounds stop playing when the user locks the screen on iOS.
    The sounds resume when the screen is unlocked.
    - it works on Android
    - we use renderMode : cpu
    - we use UIBackgroundModes : audio
    - we use NativeApplication.nativeApplication.systemIdleMode=SystemIdleMode.KEEP_AWAKE;
    - sounds play when the app is in background
    - was working great with AIR 3.8 SDK
    Any help would be greatly appreciated.
    Thanks!

    Thanks for reproting the issue, we have an internal already logged bug for this, which is under investigation at the moment.
    -Nimit

  • TS3700 music stops playing when the screen goes dark, but the earbud jack is flush with the iPod. The Jack is hard to push in now. what is the problem?

    Music stops playing when the screen goes dark; the earbud jack is flush with the iPod. The Jack is hard to push in. what is the problem? How do I Fix it?

    And you are positive the white part of the headset is flush with the body of the Nano?
    Have you tried another set of headphones to see if the problem persisted? If so, it's likely that the headphone jack needs replacing.
    B-rock

  • When I play my Ipod shuffle 3rd gen there's a moment when I start hearing interference until it stops playing, when I turn it off and on again it starts playing from the first song all over again, and once it sounded like the music was slowing down.

    My Ipod shuffle 3rd gen starts playing songs with some kind of interference until it stops playing, when I turn it off and on again it starts playing from the first song all over again, and once it sounded like the music was slowing down.  First I thought it was the earphones, but I exchanged them for newer ones and so far its the same

    You may want to do a Restore on the shuffle in iTunes.  The Restore button is on the shuffle's Summary screen in iTunes.  This will erase the shuffle, re-install its software, and set it to default settings.  If it's a software or data corruption glitch, the Restore should fix it.  After the Restore, reload or resync your songs, and try it again.  As a test, you may want to initially select a small number of songs to put back on the shuffle.

  • How can I get rid of the music that plays when people call me?

    I get complaints about the music that plays when people call me. They expect  a tone that indicates a ringing phone and get frustrated with the music.
    How do i change from the automatic music to a ring tone? Thanks-

    I read this OP's post better then I did that other one from this morning.
    I am not crazy about those that have ringback tones on their phones.  It is a good thing that no one I call has one any more.

Maybe you are looking for

  • My IPAD screen shows a bunch of lines then goes black

    When I turned on my IPAD2 the screen showed a series of different color lines, then went black It worked fine last night any ideas on problems. I have a lock code on it, so I can't even get in to unlock it.

  • What happened to the show bookmarks button firefox 3.6.x

    In Firefox 3.6 and all previous versions I have used, there was a button on the bookmarks toolbar near the New-Tab/New-Window buttons. The button was purplish with a white "star" in the center. Clicking the button would open the sidebar and display t

  • Translated document: mismatched tag

    Hello, I received an IDML file from translator wich I cannot open with InDesign CC. I received this message: "Cannot open document: mismatched tag" Is there any workaround? Thank you, Sebastian

  • JScrollPane: Contents not visible

    I am having trouble using JScrollPane. My situation is this ... I have an abstract class (PanelSupport) that extends JPanel and a class (TaskPane) that extends this abstract class. I want to add the class TaskPane to a JScrollPane but when I do this

  • Jerky Playback of QT video

    I created a 30 clip in After Effects for a class I'm taking and for some reason when I play it back in QT 7.2 the thing seems to be dropping frames or something. If I watch the inspector I can see the frame drop and come back, drop and come back. I a