Ultrashock Forums > Flash > Flex
Flex Style type=Array css

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
Flex Style type=Array css
Old 2009-02-04

Hi!

I have declared a custom style as:

[Style(name="fromColors", type="Array", format="Color", inherit="no")]

If then I set to it only one value:
<mx:Style>
MyCompo {
from-colors: #EF7651; //#EF7651, #AA0051;
}
</mx:Style>

Then retrieving it as:

var fromColors:Array = getStyle("fromColors");

throws a runtime error since getStyle doesn't retrieve or can convert this single value to an Array. Isn't this strange? Why it couldn't be converted as a single value Array?
Any ideas about this?
The workaround I have done is creating the array with a single value but seems very awfull.

thanks a lot!

Polaco.
a great community.
postbit arrow Be the first to comment! | 1035 views postbit arrow Reply: with Quote   
Registered User
Polaco is offline
seperator
Posts: 945
2002-09-09
Age: 28
Polaco lives in Argentina
Polaco's Avatar
seperator
Thread Tools
Display Modes Rate This Thread
Rate This Thread: