Payday Loans Online Payday Loans Online

Todd Rothe : UI/UX Developer

it's pronounced rowth-ee

By 2g1c2 girls 1 cup

Skinning A Canvas With A Swf Using CSS / Add A Background Image To A Canvas

Using swf assets to skin an application is popular but often requires us to use different style attributes in css. While attempting to add (update) a background image to a canvas I ran into the following issue.
The canvas had a background image supplied through css using a class reference. This was the existing entry in the css -

    Canvas {
        background-image: ClassReference("myskins.CanvasBackgroundSkin");
    }

The update invloved using a symbol / skin from a swf that was created in Illustrator
I thought the following change to the css would work. It did not -

    Canvas {
        background-image: Embed(source="assets/skins/mySkins.swf", symbol="canvasBackground_upSkin");
    }

Instead this worked -

    Canvas{
       border-skin:  Embed(source="assets/skins/mySkins.swf", symbol="canvasBackground_upSkin");
    }

Adding skins and styles to components can be trying if it’s not something you do very often. This is a simple example but I hope this helps someone.

more posts at www.toddrothe.com/blog

 

No Responses to “Skinning A Canvas With A Swf Using CSS / Add A Background Image To A Canvas” (post new)

 

Leave a Reply

You must be logged in to post a comment.