Hi There
I have a main class file and another class file with a function in that I want to call from the main class. when I addChild the second class in the main class file I get 1136 error - incorrect number of arguments.
How do I solve this error message?
Here is the code in my main class file:
package
{
import flash.display.*;
import flash.utils.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
public class BugGoopFSGame extends MovieClip
{
public var mybackground:BackGround;
public var cinders:Cinders;
public var gameTimer:Timer;
public var spidy:Spidy;
public var myplaybtn:Play;
public var timerback:TimerBack;
public var timermiddle:TimerMiddle;
public var timerfront:TimerFront;
public var settings_btn:Settings_btn;
public var sound1:Sound1 = new Sound1();
public var sound3:Sound3 = new Sound3();
public var channel:SoundChannel = sound1.play(0,int.MAX_VALUE)
public var st:SoundTransform = channel.soundTransform;
public var scoreText:ScoreText = new ScoreText();
var wordArray:WordArray;
public var wordtext:wordText;
public var letterA = new A ();
//**Constructor Function
public function BugGoopFSGame()
{
gameTimer = new Timer(31,5120);
//Add event listener for start button
myplaybtn.addEventListener(MouseEvent.CLICK, startTimer);
}
//Start timer function
public function startTimer(timerEvent:MouseEvent):void
{
gameTimer.start();
trace("Game Timer started");
myplaybtn.visible = false;
scoreText = new ScoreText();
addChild(scoreText);
wordtext = new wordText();
addChild(wordtext);
trace("WordText Box Added");
wordArray = new WordArray(); //as soon as I add this, I get the error message
addChild(wordArray);
wordArray.showLetter();
}