I make a kind of simple game for assessing students, I can build the code based ActionScript 2.0. I hear from a fried that ActionScript 3.0 can be used on Android. So I hope my game can play in Android, this is my ActionScript 2.0 code
stop();
score=0;//skor total
step=1;//gerakan pemain
moveframe=4;
number=0;//dadu
a1.onPress=function(){
number=0;
number=number+1;
score=score+1;
step=step+1;
moveframe=moveframe+1;
_root.player._x = _root["square"+step]._x;
_root.player._y = _root["square"+step]._y;
_root.gotoAndStop(moveframe);
_root.soal.gotoAndStop(step);
trace(step);
}
b1.onPress=function(){
number=0;
number=number+1;
score=score+1;
step=step+1;
moveframe=moveframe+1;
_root.player._x = _root["square"+step]._x;
_root.player._y = _root["square"+step]._y;
_root.gotoAndStop(moveframe);
_root.soal.gotoAndStop(step);
trace(step);
}
c1.onPress=function(){
number=0;
number=number+1;
score=score+1;
step=step+1;
moveframe=moveframe+1;
_root.player._x = _root["square"+step]._x;
_root.player._y = _root["square"+step]._y;
_root.gotoAndStop(moveframe);
_root.soal.gotoAndStop(step);
trace(step);
}
d1.onPress=function(){
number=0;
number=number+1;
score=score+1;
step=step+1;
moveframe=moveframe+1;
_root.player._x = _root["square"+step]._x;
_root.player._y = _root["square"+step]._y;
_root.gotoAndStop(moveframe);
_root.soal.gotoAndStop(step);
trace(step);
}
e1.onPress=function(){
number=0;
number=number+1;
score=score+1;
step=step+1;
moveframe=moveframe+1;
_root.player._x = _root["square"+step]._x;
_root.player._y = _root["square"+step]._y;
_root.gotoAndStop(moveframe);
_root.soal.gotoAndStop(step);
trace(step);
}
In AS3 that would be something like that:
Keep in mind that you need do much more than just that if you want to have your app running on Android smoothly. Yet if you're doing it just for your own fun, then yes, just migrating to AS3 will suffice.