FORUMS: list search recent posts

AS2_how to restart music when exiting a page

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
pablo rendon
AS2_how to restart music when exiting a page
on Sep 16, 2008 at 9:19:53 pm

I have a (song) mp3 playing when my site loads and continues to loop until the viewer watches a video, i have applied "stop all sounds" to this video, and it functions as such. now i would like to bring the music back in when the viewer exits this page, and only this page, as the music only needs to stop on this page.

im sure there is a simple solution to this.

all help is appreciated.


Return to posts index

Kelly Johnson
Re: AS2_how to restart music when exiting a page
on Sep 17, 2008 at 10:56:15 pm

You can code a cue point so the video triggers the sound back on when it's finished and thus would be on.

If someone clicks any other button, just start the music on that click.

You could set up a condition like:
var A:number=1;

Then, when you make the sound go off, in that same little script put:

Then, on all your buttons you can put something like:
if (A==2) {

Only if A is actually equal to 2 will it start the player. Otherwise, if it's already playing, it won't interfere.

ps.. yes, that's 2 equal signs in the second code above and just one in the first.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved