Archive for March, 2009
Today, i faced a weird problem of fileReference.load() not working in AIR. Even, in the latest 3.3 SDK. To resolve that, you have to install Flex Builder Update. Then, modify your App.xml into air version 1.5. As, to get the benefits of latest AIR Version. Otherwise, in AIR: Code gets compiled but when we select [ READ MORE ]
The link uses Cocomo SDK for achieving the basic video conference[ READ MORE ]
Utility functions to find First Day of a month, Relative Date information like “Today”, “Yesterday” public static function getFirstDayofMonth(fullyear:uint,month:uint):uint { var tmp:Date = new Date(fullyear,month,1); return tmp.getDay(); } public static function isLeapYear( fullyear:uint ):Boolean { var flag:Boolean = false; if(((fullyear%4==0) && (fullyear%100!=0)) || (fullyear%400==0)) flag = true; return flag; } public static function getWeekName( index:uint [ READ MORE ]
The below custom functions might be of use where you don’t want to use currency formatter or numeric Formatter of AS3 public function currencyFormat( number:Number ):String { var words:Array = String( number ).split( “” ).reverse(); var results:Array = new Array(); var l:int = words.length; for ( var i:int = 0; i < [ READ MORE ]
The Below code demonstrates the conversion of ByteArray to BitmapData. In the below case, SWF is loaded and converted into BitmapData private function swfLoad_complete(evt:Event):void { byteArrayToBitmapData(swf.content.loaderInfo.bytes); } private function byteArrayToBitmapData(ba:ByteArray):void { loader.contentLoaderInfo.addEventListener(Event.COMPLETE, getBitmapData); loader.loadBytes(ba); } private function getBitmapData(e:Event):void { var content:* = loader.content; var BMPData:BitmapData = new BitmapData(content.width,content.height); var UIMatrix:Matrix = new Matrix(); BMPData.draw(content, UIMatrix); [ READ MORE ]
The code below demonstrates the data type conversions among basic DataTypes used most in Flex. The ‘init()’ method does to and from conversion for ArrayCollection to XML and XML to ArrayCollection Object, String, XML, ArrayCollection import mx.collections.ArrayCollection; import mx.rpc.xml.SimpleXMLEncoder; import mx.rpc.xml.SimpleXMLDecoder; import mx.utils.ObjectUtil; private function xmlToArrayCollection(xml:XML):ArrayCollection{ [ READ MORE ]
To Select a Static Text in Flash, as like mentioned in LiveDocs. It doesn’t work, its mentioned in the below bug entry [Link]. The work around for that is to embed the fonts of the text in your flash movie[ READ MORE ]
Get every new post delivered to your Inbox.
Join 398 other followers