vote up 0 vote down
star

Okay, I'm using the new Flex 4 state parameter values, such as:

<s:BitmapImage id="buttonImg" width="38" height="33" alpha="1"
   source.up="@Embed('src/assets/images/tab.home.up.png')"
   source.down="@Embed('src/assets/images/tab.home.down.png')"
   source.over="@Embed('src/assets/images/tab.home.over.png')"
   source.disabled="@Embed('src/assets/images/tab.home.disabled.png')"/>

This works fine, but I want to be able to access/change, for example, "source.up" at runtime. But, when I try to access it as in:

buttonImg.source.up = "...

I get this popup error: Cannot create property up on ...

So, is there ANOTHER way to access this?

Thanks.

flag

1 Answer

vote up 0 vote down

Nevermind my previous, I think this FLEX{er} article explains what you need to do. Instead you would need 4 BitmapImages, 4 skins, and specify the state that each gets used in with the includeIn attribute.

For changing an image on a BitmapImage, I'm assuming you would change the source attribute.

link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.