there are several options on how to do it. They all have 1 thing in common, that is passing the id to the swf object (via flashvars in html, or via LoadVars in flash)
the flashvars works like this:
the LoadVars work completely different, as the call a php page from within flash. This page will then send the id to flash. Here's a basic code:
The Flash:
actionscript Code:
var lv = new LoadVars();
lv.load("http://myurl.com/getid.php");
lv.onLoad = function(){
if(this.id != ""){
//do stuff with the id
}else{
//invalid id specified
}
};
The php (getid.php):
When you use this, flash now nows what the id is. You can do a very similar thing to retreive the url. There are 2 options:
1. You receive the id in flash, you request another php page which will send the url
2. you automaticly send the url, and forget about the id
both are not that hard to write. The only difference is that you will have to send some extra data to php when you first retrieve the id.
Here's a sample code to get the url instantly:
The Flash:
actionscript Code:
var lv = new LoadVars();
lv.load("http://myurl.com/geturl.php");
lv.onLoad = function(){
if(this.url != ""){
// do stuff with the url
}else{
// invalid id specified
}
};
The php (geturl.php):
Hope this helps you out. if it doesn't let me know, i'll try to explain more. Also take a look at the Loadvars page on livedocs
UnrealEd