I have 1 Flash File, and 2 folders, with 1 XML file in each. This is how the directory looks like:
Root Folder
|_images folder
| |_FE folder (artist 1)
| | |_images folder <–The images.
| | |_images.xml
| |
| |_AE folder (artist 2)
| |_images folder <–The images.
| |_images.xml
|
|_art.swf
|_index.php
The way I want it to work is like this: A user will click on a link with the url looking like this: index.php?initial=FE (or AE).
I want flash to get that initial value, and tell it what directory it should choose to get the correct XML file. This is what I have in the Action Script:
startDrag("/Zoom", true);
_root.Zoom._visible = false;
/* first create a new instance of the LoadVars object */
myVars = new LoadVars();
// call the load method to load my php page
myVars.load("index.php");
// once vars have been loaded, we will have these variables:
initials = myVars.ini
//THIS IS WHERE IT SHOULD CHOOSE WHICH DIRECTORY TO CHOOSE FROM TO GET THE CORRECT XML FILE!!
xmlData.load("images/"+initials+"/images.xml");
/////////////////////////////////////
The following is my PHP code:
echo $_GET['initial'] . "<br>";
$initial = $_GET['initial'];
$vars = "";
$vars .= "ini=" . $initial;
echo $vars . "<br>";
I don’t know what I’m doing wrong, because it won’t display anything, as you can see here.