-
AS3 Movieclip and Main timeline trouble
Hi all.. im new here.
im having some AS3 trouble and was hoping you guys may know the answer.
im doing a sort of a website thingi on flash for one of my college projects.
i have the main menu buttons in the main timeline and the contents of every page inside movieclips. there is one movieclip which triggers a sound clip. what i want to do is to make that sound stop when someone navigates away from the page (that is for the sound to stop when a button in the main timeline is clicked)
anyone knows how to do it?
-
You could put this on each of your buttons on your stage.
myButton.addEventListener(MouseEvent.CLICK, stopSound);
function stopSound(e:Event):void{
nameOfTheSound.stop();
}
-
Yeah thats the only solution i have too.. but the problem is the buttons the user have to click to navigate away from the page are outside the movieclip which declared the variable for the soundclip.
I made a smaller file. It'll help you understand the problem.
http://www.sendspace.com/file/4b99pu
Click on the button inside the moviecip first and then quickly click on the button to page 2. you'll see the sound wont stop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|