homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

switching between multiple videos
actionscript 3

5+ Year Member

Msg#: 3717571 posted 1:47 pm on Aug 7, 2008 (gmt 0)

I have a simple application that I want the user to be able to switch between videos on a button click.

The problem is that I cannot get the first video to stop once the second video is clicked.

import flash.events.*;

function squashClick(event:MouseEvent):void {
function okraClick(event:MouseEvent):void {
function eggplantClick(event:MouseEvent):void {

each button has an instance name of squash, okra, eggplant. I add the event listener and tell it to go to a certain frame when clicked.



WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member

Msg#: 3717571 posted 2:08 pm on Aug 8, 2008 (gmt 0)

You just need to stop it:


you might want to see if there is an easier implementation of your flash app so instead of having the movies on separate frames you dynamically load them with AS.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved