flash - AddChild with Dynamic DispalyObject in Flex -
I'm pretty sure what I want it completely, though I can not get it to work for some reason is. What I would like to do, calls an uncontrolled component that is spread over the canvas. Since the test canvas, test canvas, test canvas can have different types of components, which I will not know until the time because I thought it would be a way to go about it. What do I have here
& lt; Mx: script & gt; & Lt ;! [CDATA [import component. Test Kaavanas; Import mx.containers.Canvas; Import flash.display.Sprite; Import flash.utils.getDefinitionByName; Private Function Init (EVT: Event): Zero {var type: string = "test canvas"; Var controlClass: class = getDefinitionByName (type) in the form of class; This.addChild (new control class (as canvas)); }] & Gt; & Lt; / Mx: script & gt;
Any ideas will be awesome!
Enter the name of the eligible class completely:
var Type: string = "component.TestCanvas"; Var controlClass: class = getDefinitionByName (type) in the form of class; Apart from this, the only import statement does not include class definitions in the compiled SWF, unless there is reference to class within the application. Just declare that type of variable in WWF (no need to start) to make sure that the definition is actually involved. var dummy: testcanvas;
Comments
Post a Comment