Groups | Blog | Home
all groups > flash actionscript > july 2004 >

flash actionscript : H E L P (I am going blind & mad...)



tg-1
7/13/2004 8:38:04 PM
How do I refrence movie clips? or the data in them?
I have a gallery of dynamically created loader MC's each gets a value from an
XML file (PIC1.jpg, PIC2.jpg etc)

here is the AS:
myMCL.loadClip( prod.pic_loc , this["Loader"+n]); // prod.pic_loc is the XML
ref.
which works fine,

Now I need to refrence each MC's by the (prod.pic_loc) value ?
I have a listner with onPress

myListener.onLoadComplete = function(targetMC){
targetMC.onPress = function() {
trace(targetMC); // this gives me: _level0.Loader0 etc.
trace(?);// what do I put here to get the value PIC1.jpg,
or PIC2.jpg etc when I click on the correct MC?
}
}

Please, Please Help...
tg-1
7/13/2004 9:02:44 PM
Hi All, I am going ledd mad, because, I needed to refrence the newname and the
xml value as well...

this.attachMovie("Loader", prod.pic_loc, n);
&
myMCL.loadClip( prod.pic_loc , this[prod.pic_loc]);

Hope this will be usefull to someone.... ;-)
AddThis Social Bookmark Button