I tried to play around with looping but I found some problems with this function
This is something I want to achieve
this.m1.mm1.prevFrame();
.....
this.m10.mm10.prevFrame();
this["m"+j+".mm"+j].prevFrame();
Printable View
I tried to play around with looping but I found some problems with this function
This is something I want to achieve
this.m1.mm1.prevFrame();
.....
this.m10.mm10.prevFrame();
this["m"+j+".mm"+j].prevFrame();
try - this[["m"+j]["mm"+j]].prevFrame();
this.m1.mm1.nextFrame();
this.m2.mm2.nextFrame();
this.m3.mm3.nextFrame();
this.m4.mm4.nextFrame();
If I tried this script, This works for me,
BUt whenever I use the loop method, it says".. TypeError: Error #1010: A term is undefined and has no properties."
Something I am trying but not working
this[["m"+j]["mm"+j]].onEnterFrame = function() {
trace("mm")
};
this[["m"+j+".mm"+j]].onEnterFrame = function() {
trace("mm")
};
_root[["m"+j+".mm"+j]].onEnterFrame = function() {
trace("mm")
};
m1.mm1.onEnterFrame = function() {
//trace("mm")
}
This worked for me...
getChildByName seams to work more often then "this" from my experience.PHP Code:for(var i:int = 1; i <= 4; i++)
{
this["m" + i].getChildByName("mm" + i).nextFrame();
}
And in your last post, did you switch to AS2? Because I thought onEnterFrame didn't work in AS3.
Please if any one knows answer then reply me