Hello, I am new to this forum and it’s my first post. I figured out that this forum is quite good as kirupa’s tutorials are. I’m new to flash and actionscript but i find it fun. I draw a box,
give it a name of “box”, and when convert it into a movie clip. That’s ok. Then i press on the
box, and write some code like:
onClipEvent(load) { this._x=100; this._y=100; }
onClipEvent(enterFrame) {this._x++; this._y++;}
And it works, the box is moving down to the right. But if i click on the background and type
some code like:
for (a=1;a<1000;a++) {
box._x++;
}
This doesn’t move the box. Then i try use this.box._x instead of just box._x, it doesn’t work,
so then i try _root.box._x and it doesn’t work. If i draw another object(let’s say a movieclip) and i write some code in it like:
onClipEvent(enterFrame) {
with (_root.box) {
this._x++;
this._y++;
}
}
It doesn’t work too, the debug console outs me something like “Object box is not defined” or something. It seems that i’m doing something wrong, or there it is some settings left untoutched. I would be very happy if anyone could help me with this