开发者

Display embed images in Flash/Flex Builder

开发者 https://www.devze.com 2023-01-02 08:54 出处:网络
i\'m using imag开发者_StackOverflow中文版e embedding in Flex 4 (the same goes with Flex 3). I have one class with a lot of

i'm using imag开发者_StackOverflow中文版e embedding in Flex 4 (the same goes with Flex 3). I have one class with a lot of

[Embed(source="../assets/icons/icon1.png")] 
public static const image:ClasS

And i reference them using:

<mx:Image source="{imagesResources.image}"/>

When i run the application i see the icon but in Flash(Flex) Builder i can't see the images while working in Design mode. Is there any way to enable image visualization in Flash Builder design mode ? or a better way to include resources.

thanks


Sadly no. If you embed an image (or resource) and then set the source property to be the Class variable they will not show in Design View in Flex Builder for Flash Builder.

What I do when I want to see them is make them static source="mypath/myimage.jpg", do the tweaks then change that back to the Class variable.


Have you tried using the @Embed() directive in MXML? Look at this link under the title "Using the @Embed() directive in MXML"

0

精彩评论

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

关注公众号