Since I moved to using adobe flash 2017+, I've gotten warnings 1082/1083.
The warning is:
Warning: 1082: Migration issue: Method gameThread will behave differently in ActionScript 3.0 due to the change in scoping for the this keyword. See the entry for warning 1083 for additional information.
Although the only error which I am getting is for putting events inside classes, I cannot add mouse events or any events without having these warnings and I don't know how to fix...
People suggested to remove super() which is not the solution.
Example of event which I added to main code error comes on line " addEventListener...."
package {
import flash.display.MovieClip;
import flash.events.Event;
import data.Player;
public class Game extends MovieClip {
private var players:Array = new Array();
public function Game() {
super();
resetPlayers();
addEventListener(Event.ENTER_FRAME, this.gameThread);
}
private function resetPlayers():void{
for (var i:int = 0; i < this.numChildren; i++){
if (getChildAt(i) is Player){
players.push(getChildAt(i));
}
}
}
protected function gameThread(event:Event):void{
for (var i:int = 0; i < this.players.length; i++){
players[i].fall();
}
}
}
}