Hi there everyone.
I have a silly question. I’ve seen examples of the for loop written for(i in this) but it never seems to work for me. The code below works if I use numbers but not the ‘this’ (whether I have the var in or not). Am I just writing it incorrectly? Thanks a bunch for looking!
for(var i in this){
_root["m"+i].onRelease = function(){
selectVid=this._name+".flv";
video1.attachVideo(netVid);
netVid.setBufferTime(2);
netVid.play(selectVid);
_root.info_txt.htmlText = loadText[this._name];
}
}
for(i=0;i<7;i++){
_root["m"+i].onRelease = function(){
selectVid=this._name+".flv";
video1.attachVideo(netVid);
netVid.setBufferTime(2);
netVid.play(selectVid);
_root.info_txt.htmlText = loadText[this._name];
}
}