-
URL variables
I want to load a movieclip into a movieclip the file is retrived from a URL variable
eg.
page.php?url=foo.swf
and have this in my web document:
<PARAM NAME=movie VALUE="index.swf?pg=<?php echo $_REQUEST["url"];?>">
and in Flash
loadMovie(pg)
But I want to have a test where I test if pg is empty or not
eg. something like:
/*
If not pg load default page
/*
if (!pg) {
//Load default page(eg. default.swf)
}
else {
//Load pg)
}
But I just can't get things to work, can anyone help
regards T
-
One easy way to find out if the parameter is loaded into flash or not:
put one dynamic textbox on your stage and name the "var" property of the textbox (not "instance name" of your textbox) to the name of your parameter's name. In your case "pg".
Everytime you load your flash, the text box shall display the pg parameter. If not... soemthing wrong with your HTML code.
If it displays the URL you want:
if (pg.length<1) {
//Load default page(eg. default.swf)
}
else {
//Load pg)
}