This is a discussion on help!! convert as2 code to as3... within the Actionscript 3.0 newbies forums, part of the Flash English category; hi, I am following this tutorial but it is in as2 code and I need help in converting the code ...
hi,
I am following this tutorial but it is in as2 code and I need help in converting the code to as3 version..thanks..
http://www.flashclassroom.com/docs/d...ectsgamemx.pdf
onClipEvent (load) {
found = [];
for (i=0; i<7; i++) {
found[i] = false;
}
}
onClipEvent (mouseDown) {
x = _root._xmouse;
y = _root._ymouse;
for (i=0; i<7; i++) {
if (_root["object"+i].hitTest(x, y, false)) {
myColor = new Color(_root["object"+i]);
myColor.setTransform({rb:255, bb:255, gb:255})
found[i] = true;
break;
}
}
gameover = true;
for (i=0; i<7; i++) {
if (found[i] == false) {
gameover = false;
}
}
if (gameover) {
_root.gotoAndPlay("feedback");
}
}
Bookmarks