ok i need help here… i’m quite new to php and have little knowledge of actionscript
i’m creating a dynamic online photography site… when the user uploads the jpg into the server folder… flash automatically detects it and show it in flash…
i’ve done a little research… using PHP to read the file in the folder and send the variables into SWF…
here is what i’ve tried…
i’ve created a readFolder.php file which echo out the file names of the folder using the readdir function… i tested in the browser and it outputs correctly the file name - here is what is shown in the browser: “&outputString=girl_1.jpg|girl_2.jpg|girl_3.jpg|girl_4.jpg|girl_5.jpg|girl_6.jpg|girl_7.jpg|&” without the quotes
in flash… i used this code in the first frame of the swf
varReceiver = new LoadVars();
varReceiver.load(“script/readFolder.php”);
varReceiver.onLoad = function() {
this.outputString = this.outputString.split("|");
_root.previewOne.loadMovie(“jpg/girls/”+ this.outputString[0]);
};
previewOne is an empty movieClip i instantiated which will load the jpg
the problem is the jpg doesnt show up in the browser with the embeded swf… i’m sure i’ve specified correctly the url address location…
an interesting thing is when i used a text file instead of the php and test using the “Control > Test Movie” function in flashmx… it shows the picture
so what gives…?:-/