Highlighted

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

New Here ,
Aug 22, 2020

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:

Error 1120.PNG

 

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!

 

TOPICS
ActionScript, Code, Error, Publish package

Views

56

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

New Here ,
Aug 22, 2020

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:

Error 1120.PNG

 

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!

 

TOPICS
ActionScript, Code, Error, Publish package

Views

57

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 22, 2020 0
Adobe Community Professional ,
Aug 22, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 22, 2020 0
Adobe Community Professional ,
Aug 24, 2020

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.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 24, 2020 0