SubMenuItem class
package
{
import flash.text.TextField;
/*
* The SubMenuItem encodes the children and therefore extends
* the Composite class.
*/
public class SubMenuItem extends Composite
{
public function SubMenuItem (myText:String,url:String)
{
super (myText,url);
/*
* We create the textfield for each child of the submenu.
*/
var tf:TextField = new TextField ;
tf.width = width;
tf.height = height;
tf.text = myText;
tf.mouseEnabled = false;
tf.autoSize = "center";
addChild (tf);
/*
* The button modes are all stored in the Composite class
* from which this class inherits.
*/
butMode ();
}
}
}