wezzy
wezzy

Reputation: 5935

Display embed images in Flash/Flex Builder

i'm using image 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

Upvotes: 3

Views: 8266

Answers (2)

Joey
Joey

Reputation:

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

Upvotes: 0

Francisc
Francisc

Reputation: 80505

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.

Upvotes: 2

Related Questions