Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Flex 4 Background Image Fail

Sign in to follow this  
Black Knight


Seriously why did adobe made putting a background image to controls so much harder between flex 3 and flex 4?

In flex3 most of the components have a backgroundImage property.

And you are done.

In Flex 4 you have have to either write tons of code to create a custom skin and do something like :

or use backgroundImage property with Embed as in :

Which I don't want because that makes the swf bigger and requires me to recompile the swf everytime an art asset is updated.

The only work around I found is this :

"600" height="50">
"images/background.png" percentWidth="100" percentHeight="100" maintainAspectRatio="false">
"middle" percentWidth="100" percentHeight="100" paddingLeft="10" paddingRight="10">

"32" height="32">

"32" height="32">

This code loads an external image and puts it in the background of the buttons without fucking the layout.

Am I missing something here? Looks like flex 4 making things more complicated, I don't understand what people are talking about when they say it's making skinning easier, basically you have to create a new skin file with tons of code for each component you want to skin.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!