Dynamic SWF play based on current URL?
I have a SWF banner that has 12 MC's lined up to start on MC1 and play sequentially. play MC1 > MC2 >...>MC12 then back to MC1 and loop.
Well now I have a request to make it play MC3 (example) when I am on a specific page of the site and then loop back to MC1 and start over. As well as the same idea for another page of the site.
currently I have a 2 frame FLA file with the first frame ActionScript looking roughly like this (to kick start the MC's into motion)
play MC1
stop MC2
stop MC3
stop MC4
...
Then the next frame of the time line is a STOP();
from here the individual MC timelines determine the behavior of the MC's
So does it make sense that if I can grab the URL (www.XYZ.com./page3.html) that I could use an IF/ELSE statement to play a different opening script? like this (I know syntax is wrong)...
Actionscript Code:
if URL(page2.html)
{
stop MC1
PLAY MC2
stop MC3
stop MC4
...
}
if URL(page3.html)
{
stop MC1
stop MC2
PLAY MC3
stop MC4
...
}
...
else
{
PLAY MC1
stop MC2
stop MC3
stop MC4
...
}
If this sounds right, does anyone have an idea as to how to do this? I have not pulled URL data before and would love to see this work.
Thank you.