-
I have a text file with only a line of script :
tab[0]="fiche.swf"
I load variables with : loadVariables("myfyle.txt",0);
so I make a loadMovie(tab[0],myObject);
but nothing appear ????
I did a trace (tab[0]); , and the window show "fiche.swf", I guess the loadvariable work well but how can I use the content of the variable to load the movie ?
Thanxxxxxxxx
Ejoe
-
hmm...
I just did a couple of tests. It looks like flash won't automatically create an array if you load in a bunch of variables named with array notation like:
bob[0]=this.swf&
bob[1]=that.swf&
bob[2]=someother.swf&
Then, when you reference the variables, flash thinks they should be an array and won't return the value correctly. What you could do is just name the variables sequentially, like this:
bob0=this.swf&
bob1=that.swf&
bob2=someother.swf&
Then, you can loop through them with a for loop. The bad thing is you won't have a .length attribute to know how many total variables you have.
-
thanx man, but I have tried what you said , the loadVariables works but then I try loadMovie(tab0,myObject); but it didn't works why?
thanks !
PS: Do you search a job ?
-
well, take a look at my test files
Go here:
http://www.richpaul.com/learning/loa...loadArray.html
download that example. It should get you moving in the right direction.
ps. Yes, I'm looking for a job...work is scarce, so it seems, for front-end flash designers...at least here in Utah...
[edit]stupid path names...sheesh[/edit]
-
hey, thanks man.
thanks for your help man, it works well!
By the way, why don't you come in France ? There are lots of good opportunities here!
Flash Designers are really welcome !
Ejoe
-
hummm...
excuse me, I don't understood that line:
someBob[i] = _root["bob" + i];
what is _root["bob1"] ?
Thanks!
-
Lifetime Friend of Site Staff
obj["name"] is an alternate method of accessing a named propery of an object, it's equivalent to saying obj.name but the method using the brackets lets you use an expression in place of the property name which is a LOT more flexible.
This is covered very nicely in Colin Moock's new book ActionScript : The Definitive Guide. You must have a copy of this on your desk. You can find out more at http://www.moock.org/asdg
-
thanks!!!!!!
Ok i got it ( at last! )
Thank you for all !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|