Copy link to clipboard
Copied
I get this error:
ArgumentError: Error #1063: Argument count mismatch on ShipMc(). Expected 1, got 0.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at Main()
This is the main Class:
public function Main() {
ship = new ShipMc(this.stage);//create a new ship
//in ShipMc we need stage to create the keyObject
this.addChild(ship);//add ship to stage
Copy link to clipboard
Copied
Try tracing this.stage and see what you have for it. It probably hasn't yet had time to come into existence by the time you are trying to target it.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now