简体   繁体   中英

Flex: get path of image to transcode

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 as:BitmapImage MXML tag.

Thanks!

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

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