davecates
03-05-2008, 12:20 AM
hi,
I'm trying to add a combo box to a movieclip - all done at runtime using only actionscript - no components dragged onto the stage.
I have tried all the possible ideas in the world and still I can't see my combo box!! I have a combobox in the library but not on the stage.
Here's my code:
Main fla file:
import mx.controls.ComboBox;
import Myclass;
var createClassObject:Function;
var combotest2:Myclass = new MyClass();
MyClass.as
import mx.controls.ComboBox;
class Myclass extends MovieClip{
var name:ComboBox;
var createClassObject:Function;
public function Myclass(){
super.createClassObject (mx.controls.ComboBox, "name", 1);
name.addItem("item1");
name.addItem("item2");
}
}
Any ideas why the combo isn't showing?!?!?
I'm trying to add a combo box to a movieclip - all done at runtime using only actionscript - no components dragged onto the stage.
I have tried all the possible ideas in the world and still I can't see my combo box!! I have a combobox in the library but not on the stage.
Here's my code:
Main fla file:
import mx.controls.ComboBox;
import Myclass;
var createClassObject:Function;
var combotest2:Myclass = new MyClass();
MyClass.as
import mx.controls.ComboBox;
class Myclass extends MovieClip{
var name:ComboBox;
var createClassObject:Function;
public function Myclass(){
super.createClassObject (mx.controls.ComboBox, "name", 1);
name.addItem("item1");
name.addItem("item2");
}
}
Any ideas why the combo isn't showing?!?!?