# Help creating class

**URL:** <https://forum.kirupa.com/t/help-creating-class/228019>\
**Category:** Uncategorized\
**Created:** [June 4, 2007, 5:59pm UTC](https://forum.kirupa.com/t/help-creating-class/228019 "2007-06-04T17:59:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecptavares](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@ecptavares](https://forum.kirupa.com/u/ecptavares)\
**Post date:** [June 4, 2007, 5:59pm UTC](https://forum.kirupa.com/t/help-creating-class/228019/1 "2007-06-04T17:59:30Z")

</div>

Hi!

I am creating a helloWorld example here with actionscript 3.0 but I am having some dificulties.

Here is my class :

```
Code:
package

```

{  
public class Greeter  
{  
public function sayHello():String  
{  
var greeting : String;  
greeting = “Say Hello!”;  
return greeting;  
}  
}  
}  
and here is my code at flash:

```
Code:
var mygreeter : Greeter = new Greeter();

```

mainText.text = mygreeter.sayHello();  
And here are the error messages I am getting:

1180: Call to a possibly undefined method Greeter.  
1046: Type was not found or was not a compile-time constant: Greeter.

What am I doing wrong?

thank you
