PDA

View Full Version : Can Flash read the page on witch he was loaded or can the page tell him that?


Moralez
09-26-2003, 12:39 PM
I just need to know If it is possible to read the URL on witch the swf is loaded... or if the page itself can tell the swf that.

webguy
09-26-2003, 01:26 PM
don't know about flash, but PERL, PHP and most other server side languages can easily. Trying to make a security feature are we?

webG

Moralez
09-26-2003, 01:42 PM
Not really... remember that Self-Assembley menubar?

I just been told that the menubar is to create itse.f based on URL on witch he was loaded, I know, I know, There are only 4 sections, the only thing I needed to do was change two variables and upload 4 SWF files (1kb each) but I have to do what they tell me to do... igh...

tost
09-27-2003, 12:55 PM
Hi Moralez,

i use this code to set the path to a php page on the server; it's relative to avoid problems with domain names / security issues, but when i test on my machine i want to have the full url to connect to the online db:


outputURL="scripts/output.php";
// full url insert; for easy local testing
myUrl = this._url;
//trace("myUrl = "+myUrl);
if ( myUrl.indexOf("file") != -1){
outputURL = "http://www.yourdomain.com/scripts/output.php";
}


regards,
tost