PDA

View Full Version : LoadVars / LoadWars


puchatek
06-13-2008, 04:29 PM
Hello all

Im new to actionscript and lately i try to make gallery in flash ivedone animations i want now to load a list of avaliable pictures in directory through php or from a file.txt with such list to an array in flash. so im writing like this

_root.MojeDane = new LoadVars();
_root.MojeDane.load("file.txt");
trace(_root.MojeDane.mj);

in file.txt i have:

&mj=1.jpg

while running this in flash 8 i receive in output: undefined (as it should be 1.jpg ...) what im doing wrong?

Puchatek

puchatek
06-13-2008, 05:43 PM
i think i got problem more focused:

if i use
in the main time line:

var here = this
varReceiver = new LoadVars();
varReceiver.load("plik.txt");
varReceiver.onLoad = function() {
trace(this.mj);}



i get my result but next i write :

this.pArray[0] = this.mj;

but it appears that content of this.mj disappears cuz in:
this.pArray[0] theres no information (undefined)
Any help?

Puchatek

puchatek
06-13-2008, 06:19 PM
i got my answer here:

http://www.actionscript.org/forums/showthread.php3?t=903&page=3

-_-