Displaying posts tagged with

“flex”

Dec
7
2010

Flex 4 – How to get image minimal cutout

Code snippet to take minimal area from BitmapData where something is painted. For example user will paint something in your Flex application and you want to take minimal area and do object from this painting. (It’s code from bigger project, some refactoring is needed) protected function makeObjectFromDrawing(bmpData:BitmapData):void { var bmpData1bit:BitmapData = new BitmapData(bmpData.width, bmpData.height, true, [...]

Dec
7
2010

Flex 4 – How to embed Fonts and load it from another SWF

Create Font SWF in Flash Profesional Create new Action Script 3.0 project Go to library, use top-right icon and select New Font Select Font and on the ActionScript tab check Export for ActionScript Press F9 and add following code import flash.text.Font; Font.registerFont(FontName); Publish it Load it via Loader in FLex 4 Project private var fontSWF:Loader [...]