Help me please error #1063

Hi guys

I have 3 classes in the library (external classes) and class 1 document called hand

and iam getting these errors all the time I do not know why

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

ArgumentError: Error #1063: incompatibility of County of Argument on tree1 / onAdded (). expected 0, got 1.

at flash.display::DisplayObjectContainer/addChild()

in Main()

Here's the code for (the external classes) in the lib

Class MAINMAP1

package

{

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

SerializableAttribute public class MAINMAP1 extends MovieClip {}

var vx:int = 0

var vy:int = 0

public void MAINMAP1() {}

addEventListener (Event.ADDED_TO_STAGE, onAdded)

}

public function onAdded (event: Event): void {}

}

}

}

class tree1

package {}

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

public class tree1 extends MovieClip {}

public void tree1 () {}

addEventListener (Event.ADDED_TO_STAGE, onAdded)

}

public void onAdded () {}

addEventListener (Event.ENTER_FRAME, onEnterFrame);

}

public void onEnterFrame(event:Event) {}

{

}

}

}

}

HERO class

package {}

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

SerializableAttribute public class extends MovieClip {HERO

private var vx:int = 0;

private var vy:int = 0;

public void HERO () {}

addEventListener (Event.ADDED_TO_STAGE, onAdded)

}

public function onAdded (event: Event): void {}

gotoAndStop (3)

addEventListener (Event.ENTER_FRAME, onEnterFrame);

stage.addEventListener (KeyboardEvent.KEY_DOWN, onKeyDown);

stage.addEventListener (KeyboardEvent.KEY_UP, onKeyUp);

}

public void onEnterFrame(event:Event) {}

x += vx

y += vy

}

public void onKeyDown(event:KeyboardEvent) {}

If (event.keyCode == Keyboard.LEFT) {}

gotoAndStop (2)

VX = - 5

}

If (event.keyCode == Keyboard.RIGHT) {}

gotoAndStop (1)

VX = 5

}

If (event.keyCode == Keyboard.DOWN) {}

Vy = + 5

gotoAndStop (6)

}

If (event.keyCode == Keyboard.UP) {}

Vy = - 5

}

}

public void onKeyUp(event:KeyboardEvent) {}

If (event.keyCode == Keyboard.LEFT: event.keyCode == Keyboard.RIGHT) {}

VX = 0;

}

If (event.keyCode == Keyboard.UP: event.keyCode == Keyboard.DOWN) {}

Vy = 0;

}

}

}

}

THE DOCUMENT CLASS (Main)

package {}

import flash.system.System;

import flash.system.fscommand;

import flash.display.MovieClip;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.events.KeyboardEvent;

import flash.ui.Keyboard;

import flash.events.Event;

import flash.events.MouseEvent;

import flash.display.Stage;

SerializableAttribute public class Main extends MovieClip {}

var mainmap1:MAINMAP1 = new MAINMAP1;

public void Main() {}

addChild (mainmap1);

}

}

}

fact

the program works, but there are errors in the output I couldn.t get it

Help me please

Thank you

onAdded() is called by a listener who passes an event.  use:

function onAdded(e:Event):void {}

etc.

}

Tags: Adobe Animate

Similar Questions

Maybe you are looking for