rgo
11-04-2007, 05:24 PM
Hi I have a file that some one else did... I am new to flash and I am trying to alter it. their code looks like this
for(i=0; i<itemNum; i++) {
_root.attachMovie("mc_button","mc_button"+i,10+i);
ref = _root["mc_button"+i];
// Vertical Positión (_y)
ref._y = stageHeight/2+10;
// Horizontal Positión (_x) + separation (20px)
ref._x = ( space * i ) + separation;
// Loads the picture description
ref.picName=picturesXML.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue
// unloads the marc
ref.marc.marc.unloadMovie()
// Load the picture(.jpg)
ref.marc.marc.loadMovie(picturesXML.firstChild.chi ldNodes[i].childNodes[1].firstChild.nodeValue)
trace ("1"+picturesXML.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue);
// Large Picture URL
//ref.picURL=picturesXML.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue
// ID
ref.ID=i
}
I am unable to determine what the line _root.attachMovie("mc_button"
means what is "mc_button" and where can I find it in my movie also what is ref.marc.marc.loadMovie.
I know loadMovie is loading a movie... in this case an image but what does the ref.marc.marc have to do with anything
thanks.
for(i=0; i<itemNum; i++) {
_root.attachMovie("mc_button","mc_button"+i,10+i);
ref = _root["mc_button"+i];
// Vertical Positión (_y)
ref._y = stageHeight/2+10;
// Horizontal Positión (_x) + separation (20px)
ref._x = ( space * i ) + separation;
// Loads the picture description
ref.picName=picturesXML.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue
// unloads the marc
ref.marc.marc.unloadMovie()
// Load the picture(.jpg)
ref.marc.marc.loadMovie(picturesXML.firstChild.chi ldNodes[i].childNodes[1].firstChild.nodeValue)
trace ("1"+picturesXML.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue);
// Large Picture URL
//ref.picURL=picturesXML.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue
// ID
ref.ID=i
}
I am unable to determine what the line _root.attachMovie("mc_button"
means what is "mc_button" and where can I find it in my movie also what is ref.marc.marc.loadMovie.
I know loadMovie is loading a movie... in this case an image but what does the ref.marc.marc have to do with anything
thanks.