walnoot
08-05-2006, 03:25 PM
Since there's no AS3 forum and I know a couple of guys around here are already progressing in AS3 I hope you don't bother me asking a total newbie question on this.
Here (http://livedocs.macromedia.com/labs/as3preview/docs/wwhelp/wwhimpl/js/html/wwhelp.htm) they give the really first start in AS3, the program that's always your first in every language:the HelloWorld application.
They tell you to make a Greeter.as
package
{
public class Greeter
{
public static function sayHello():String
{
var greeting:String = "Hello World!";
return greeting;
}
}
}
and a HelloWorld.fla
var myGreeter:Greeter = new Greeter("Bob");
mainText.text = myGreeter.greeting;
in the HelloWorld.fla you drag a textfield on the stage and give it the instancename:mainText
when I test the movie it says:
ArgumentError: Error #1063: Argument count mismatch on Greeter$iinit(). Expected 0, got 1.
at Timeline0_f9b48cb254eeb04dbca16453c75a97e/::frame1()
I really want to take the time to intensively study AS3 in the upcoming years but for now I really don't understand what I do wrong, I did this tut three times over to ensure myself I didn't make any typo's.
Thanks in advance,
Wouter
Here (http://livedocs.macromedia.com/labs/as3preview/docs/wwhelp/wwhimpl/js/html/wwhelp.htm) they give the really first start in AS3, the program that's always your first in every language:the HelloWorld application.
They tell you to make a Greeter.as
package
{
public class Greeter
{
public static function sayHello():String
{
var greeting:String = "Hello World!";
return greeting;
}
}
}
and a HelloWorld.fla
var myGreeter:Greeter = new Greeter("Bob");
mainText.text = myGreeter.greeting;
in the HelloWorld.fla you drag a textfield on the stage and give it the instancename:mainText
when I test the movie it says:
ArgumentError: Error #1063: Argument count mismatch on Greeter$iinit(). Expected 0, got 1.
at Timeline0_f9b48cb254eeb04dbca16453c75a97e/::frame1()
I really want to take the time to intensively study AS3 in the upcoming years but for now I really don't understand what I do wrong, I did this tut three times over to ensure myself I didn't make any typo's.
Thanks in advance,
Wouter