Copy link to clipboard
Copied
I am trying to convert a flash game (that was AS2 but converted to AS3 by animate) to an apk, but whenever I click Publish in the Publish Settings, it gives me these errors after it tries to export the swf:
and this is the code that is generating the errors:
this.onEnterFrame = function () {
this._x += 7;
if (this._x > 450) {
this.removeMovieClip();
}
for (i = 0; i < _root.nrEnemies; i++) {
if (this.hitTest(_root["Enemy" + i])) {
_root.score += 10;
_root["Enemy" + i].reset();
this.removeMovieClip();
}
}
}
I'm not good at coding at all, so help would be appreciated, thanks!
Copy link to clipboard
Copied
Check your document settings and see whether advanced layers is enabled. If it is - try disabling its and see if the properties are then available via your code.
Copy link to clipboard
Copied
To work in an APK it will need to already work as an AS3 SWF. At the moment it looks like you still have your code as AS2.