MovieClip Compile Error
Good evening,
Sorry for a newbie question, but that's what I am! I am attempting to create a single frame movie clip that contains 3 dynamic text fields. In the MovieClip class I need to modify the contents and format of the text fields. My code has no syntax errors, but it does not compile. Here is my code:
package
{
import flash.display.MovieClip;
//import fl.controls.TextArea;
//import flash.text.TextField;
public class FactProblem extends MovieClip
{
private var txtT1:String="a";
private var txtT2:String="b";
private var txtT3:String="c";
private var locX:Number=20;
private var locY:Number = 20;
//private var t1:TextArea;
//private var t1:TextField;
public function FactProblem()
{
with (this)
{
x = locX;
y = locY;
//t1.text = txtT1;
//t2.text = txtT2;
//t3.text = txtT3;
}
}
}
}
As you can see from my code I tried importing TextArea and TextField, but the problem persists. as the code exists, this is the error message:
ReferenceError: Error #1056: Cannot create property t1 on FactProblem.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at FactProblem()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
Your suggestions would be greatly appreciated. For the past three days I've not been flashing; I've been stumbling in the dark!