actionscript 3 - accessing an image component in flex from actionscript3 -


i have image component in flex (mxml file), below

<mx:image id="imageid"/> 

i have separate actionscript class , trying set source of image init() in actionscript class.

i trying access like,

    [embed(source="hello_world.png")]         [bindable]         public var hello_world:class;          init()     { .................          imageid.source = new hello_world(); ....................     } 

but image doesnt displayed.

so question is, how access image component declared in mxml page in actionscript class.

judging answers on as3 embed images class , these images class?, need cast hello_world class bitmap:

init() { .................      imageid.source = new hello_world() bitmap; .................... } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -