views:

753

answers:

2

Hi, I am new to Flash, I am trying to create a class for a symbol.

I created a new Flash file, drop a DynamicText, convert this DynamicText to a Symbol called "TextBox1"

Then I created TextBox1.as in the same directory as the .fla I just created.

package
{
 import flash.display.*;

 public class TextBox1 extends MovieClip
 {

  public function TextBox1() 
  {
   trace("TextBox constructor");
  }

 }

}

I ran the Flash file but it doesn't display the message. Did I miss anything?

+1  A: 

Did you associate the class with the symbol? Right click the symbol. Tick export for ActionScript and put TextBox1 in the class field.

Luke
Perfect! I knew it was something simple. Thank you Luke!
No worries. An up vote would be nice though... :)
Luke
A: 
superjoe30