-
I have a menu that I need to change depending on the html or php page it is inbeded in.
how can i do this. I need the movie clip to gotoAndStop on different frames. Do i input data into html, is there a checkURL command?
thanks
-
there is a thing called an FS Command... you could make a little javascript function to substring off the last part of the URL (after the last /) and return it to the movie, i've never done much/anything with future splash commands, that is what i guess FS stands for.
-
Deathbringer
there sure is a check url command, and its... (drumroll...) _url . so _level0._url gives you the full http://www.whatever.com/folder/page.html layout. you can use the string object to extract the words you want and redirect your swf.
Also, as a note on piracy, you can protect your swfs by theives by checking the url, so if the server that's playing the URL is not yours then gotoAndPlay("getLost");
this only works on playback as hack programs totally overlook it.
if (_level0._url == "http://www.yourserver.com") {
gotoAndPlay("intro");
} else {
stop();
}
however if you publish the SWF it'll now only work on the server and it won't work locally, but the fact it doesn't play then is because the url is something like C:/windows/My Documents as URL works locally too.
-
this method only returns the url of the swf and some lousy information about the directories and host, not the HTML or PHP page in which it is embedded.
-
Deathbringer
yeah, but that's the point of using the string object. the stuff you don't want is probably at the begining of the returned string so when you use the Object, set your start index to -1 and it'll begin from the end of it.
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
|