简体   繁体   中英

ActionScript 3 / Flex 4 : Add Text/Label to an Image loading in AS

I load an image from a url and add it to the stage.

I need a way to add some text to the image before loading it to the stage !

NOTE: add text over the image after it has been loaded

thanks in advance.

NOTE: Image type mx : Image

You could just use a composite component then. Any with absolute positioning should do.

Just make sure to add the label as the last subcomponent.

For example:

<mx:Canvas width="100" height="100">
    <mx:Image source="http://www.gravatar.com/avatar/" width="100%" height="100%"/>
    <s:Label text="This is your text"/>
</mx:Canvas>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM