di niente figurati
anzi un es semplice della cosa ..
x leggere i file che stanno in una cartella images e stamparli in flash
la pag asp
Codice PHP:
<%
strPath = "images"
Set fs = Server.CreateObject ( "Scripting.FileSystemObject" )
Set dir = fs.GetFolder( Server.MapPath(strPath) )
var = 1
out = ""
For Each File In dir.Files
out = out&"file"&var&"="&File.name&"&"
var = var + 1
Next
response.Write(out)
%>
mentre nel flash action con loadvars
Codice PHP:
var myLV = new LoadVars();
myLV.onLoad = function (ok){
if(ok){
var i = 1;
testofile=""
my_fmt = new TextFormat();
my_fmt.font="verdana"
my_fmt.size="11"
while(this['file'+i] != undefined) {
trace("file n."+i+": "+this['file'+i]);
testofile=testofile+this['file'+i]+"
"
_root.createTextField("testo",1,50,50,200,200)
testo.multiline=true
testo.html=true
testo.htmlText=testofile
testo.setTextFormat(my_fmt);
trace(i)
i++;
trace(testofile)
}
} else {
trace('File non caricato');
}
}
file = "leggere.asp";
myLV.load(file);