I have the following code in flash lite 1.1 and would like to convert it into AS2
longN = length(point);
for (i=1; i<8; i++) {
if (i>longN) {
tellTarget ("s" add i) {
gotoAndStop(11);
}
} else {
test = substring(point, i, 1);
tellTarget ("s" add i) {
gotoAndStop(../:test+1);
}
}
}
stop();
Here is what I tried but it seems like not working:
function showNum(){
longN = length(point);
for (i=1; i<8; i++) {
if (i>longN) {
this["s" + i].gotoAndStop(11);
} else {
test = substring(point, i, 1);
this["s" + i].gotoAndStop(_root.test+1);
}
}
}
showNum();
BTW, what’s the different between length(point) and point.length? When I use point.length, it trace out undefined. Thanks in advance!