content top

Embed Fonts in Flex with CSS

Embed Fonts in Flex with CSS

When using embedded fonts, watch out for embedding the complete set of styles for your font (bold, italic, …). For example, Buttons may use a “bold” value for the font-weight style. In the case you did not embedded also the bold version of the font, and you are trying to display special chars like chinese, arabian or hinhi (the chars which are not included into the OS default system), then you will get just some strange...

Read More

Flex Spark Button Black background

Flex Spark Button Black background

The new Spark Buttons are a little different than Halo (flex 3) Buttons. Since Flex 4+ SDK the complete skinning mechanism of UI components has changed. Now, in order to set background color of a Button the fillColor and fillAlpha styles are no longer available. To set the background to black for example a new style is used, this is chromeColor and can be set on most components which have a background. Here is a sample code ...

Read More

How to merge ArrayCollection in AS3

How to merge ArrayCollection in AS3

Solution 1:   var list1:ArrayCollection = new ArrayCollection([1,2]); var list2:ArrayCollection = new ArrayCollection([3,4]);   var mergeList:ArrayCollection = mergeArrays(list1, list2); trace(mergeList); // 1,2,3,4   private function mergeArrays(a:ArrayCollection, b:ArrayCollection):ArrayCollection { for each(var item:Object in b) { ...

Read More

Get the Object Type in Flex

Get the Object Type in Flex

In this post we will identify the type of an object in Adobe Flex and ActionScript3. Depending on the case, you may want to check if the object is of a particular type or for example just to list the type of the object in order to do a switch case. So, based on your needs you can use one of the next three options. I will let you choose the best for you based on your situation. Option 1: Using getQualifiedClassName() import...

Read More

Setting size 100 percent using ActionScript3 on Flex controls

Setting size 100 percent using ActionScript3 on Flex controls

For example we have in out .mxml file   <mx:TextInput ... width="100%" /> We can translate the with to actionscript by using the property called percentWidth. Save for height property we have percentHeight. Please note this is not a style like “top”, “bottom” or “padding-*” The ActionScript code to add same control should look like:   var textinp:TextInput = new...

Read More
content top