0
votes

I just started learning Flex this week, and I cannot get an image path to work. My folders are as follows:

ProjectFolder
-src
--assets
--skins
-bin

My image is in assets, we can call it image_name.jpg and my skin is in the skins folder. How would I put it as the source of a bitmap in a custom skin?

Broken Attempt:

 source="@Embed(source='/assets/image_name.jpg')"

as a property of a s:BitmapImage MXML tag.

Thanks!

1
Does this work? source='assets/image_name.jpg' - Alexander Farber
Thanks, that does compile. Now the problem is that the image doesn't show up. - AJcodez

1 Answers

1
votes

Ok, you save the image in src/assets and use:

source="@Embed('assets/image_name.jpg')"

Source: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/primitives/BitmapImage.html#includeExamplesSummary