when i call a method i get the 1136 error and it says that I need 1 argument, but I didn’t request any parameters:
function tutorial()
{
main.arcade.gotoAndStop(5);
gotoAndPlay(2);
Main();
}
here is the class I am calling
package
{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
public class Main extends MovieClip
{
var temp:int;
var temp2:int;
var onLeft:Boolean = true;
var coolDown:int;
var distance:int;
var p2h= new hitBar2();
var p1h= new hitBar();
var roy = new Roy();
var shane = new Shane();
public function Main(){
combat(roy,shane);
}
I am quite new to actionscript and programming in general, please help!!!
You can’t call a constructor like
Try
Also if the Main class is you applications main class (the entry point) then you can do something like the following.