How do I access an embeded image in a custom component?


hi,

 

i using flex 3 , want access embeded image custom component.

 

let's have embedded image in root of application following code:

 

            [embed("myimage.jpg")]
            public var myimg:class;

 

... , have made custom component in actionscript using vbox base

... , added image controll to custom component.

 

is there way can use embeded image source image in custom control?

hi ccay,

 

yes can it...

 

just use shown below..

 

import mx.core.application;

 

<mx:image source="{application.application.myimg}" />

 

don't forget import above namespace ..

 

application.application gives reference application top level main class...and embed variable should public had kep already..

 

thanks,

bhasker



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support