FLAASHER
asked on
Reading from external file action qustion ....
Hi experts
http://flash-db.com/Tutorials/loading/loadingData.php?page=2
in this example flash read more than one record from external text file with this code ..
myData = new LoadVars()
myData.load("anastasio2.tx t")
myData.ref = this
myData.onLoad = function(succes){
if(succes){
for(var i=0; i<this.cant; i++){
this.ref["Title_txt"+i].ht mlText = "<b>"+this["Title"+i]+"</b >"
this.ref["Comments_txt"+i] .text = this["Comments"+i]
this.ref["holder_mc"+i].lo adMovie(th is["Image" +i])
}
} else trace("Error loading data")
}
my quistuin is
What is " ref " and we use it many times in the code
can any body explain the example ???
Thanks
http://flash-db.com/Tutorials/loading/loadingData.php?page=2
in this example flash read more than one record from external text file with this code ..
myData = new LoadVars()
myData.load("anastasio2.tx
myData.ref = this
myData.onLoad = function(succes){
if(succes){
for(var i=0; i<this.cant; i++){
this.ref["Title_txt"+i].ht
this.ref["Comments_txt"+i]
this.ref["holder_mc"+i].lo
}
} else trace("Error loading data")
}
my quistuin is
What is " ref " and we use it many times in the code
can any body explain the example ???
Thanks
(as in the first example).
Because, the textifelds are on the _root timeline there, as is the loadVars script.
So you don't really need it, but it is a method to give you the current timeline, no matter where youa re working.
Does this make sense?
Billystyx
Because, the textifelds are on the _root timeline there, as is the loadVars script.
So you don't really need it, but it is a method to give you the current timeline, no matter where youa re working.
Does this make sense?
Billystyx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
does this sample actually work? I noticed success is spelled wrong in it...
Billystyx