Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Flex 4 Background Image Fail

Flex 4 Background Image Fail

Black Knight
Under a ShadowyTree · · 1 min read
2,880 0
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.

Discussion

Loading comments...