开发者

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

开发者 https://www.devze.com 2023-03-06 15:40 出处:网络
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 i开发者_运维知识库t to the stage !

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 i开发者_运维知识库t 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>
0

精彩评论

暂无评论...
验证码 换一张
取 消