Hi,
I am trying to write a class for a movie clip which will contain two Dynamic textboxes.
one will have the index value and will be invisible. and the other will have a Sentence, which will be displayed in the main window and can be dragged by the user.
The below is the code that I wrote for the class, i have difficulty with getting this to work. I am wondering if I am doing anything wrong here. Hope you get the idea.

thanks
NEO

class SentenceMovie extends MovieClip{

var text:String;
var index:Number;
var mySent_mc:MovieClip;


function SentenceMovie( _sent:String , _index:Number ){
this.setText(_sent);
this.setIndex(_index);
}


public function setText(_sent:String ){
this.text = _sent ;
}


public function setIndex( _index:Number ){
this.index = _index;
}


public function getText():String{
return this.text;
}


public function getIndex():Number{
return this.index;
}

public function createMovieClip(){
this.mySent_mc.createTextField("myText_txt" , 2 , 0 , 0 , 100 , 100 );
/*Displays undefined*/ trace( "this.mysent_mc.myText_txt = " + this.mySent_mc.myText_txt );
this.mySent_mc.myText_txt.multiline = true;

this.mySent_mc.myText_txt.wordWrap = true;
this.mySent_mc.myText_txt.autosize = true;
this.mySent_mc.myText_txt.text = this.getText();
this.mySent_mc.createTextField("myIndex_txt" , 1 , 0 , 0 , 1 , 1 );
this.mySent_mc.myIndex_txt._visible = false;
this.mySent_mc.myIndex_txt.text = this.getIndex();
}

public function getMovieClip(){
trace("this.mySent_mc = " + this.mySent_mc) ;
return this.mySent_mc;
}

} // end of class SentenceMovie