简体   繁体   中英

How to use images for skins without embedding them in the external style sheet

I'm trying to create a run time css-based swf which DOES NOT have embedded images, but rather picks them up from the file system.

For example,my Current.css file has this piece of code:

.paySeatBundleAvailable {
    upSkin: Embed("../images/common/pay_seat_bundle_available.gif");
    overSkin: Embed("../images/common/pay_seat_bundle_available.gif");
    downSkin: Embed("../images/common/pay_seat_bundle_available.gif");  
}

I dont want the CSS based SWF to have all the images embedded as I have a lot of images. Rather I want the images to be loaded at runtime from the path specified.

I tried using 'Url' in place of 'Embed' , but it throws 'error #1034 type coercion' error.

Help Please?! What is the correct approach?

Create a general skin that does all states (up, over, down, etc) which only has one Image Object. Set the source of that Image object to the appropriate strings and the Image will then do an http call to that image automatically without embedding anything.

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