Skip to main content
KyronSaif
Participant
August 22, 2020
Question

Error 1120 when trying to convert a .fla to an .apk

  • August 22, 2020
  • 2 replies
  • 241 views

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!

 

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Colin Holgate
Inspiring
August 25, 2020

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.

 

Joseph Labrecque
Community Expert
Community Expert
August 22, 2020

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.