Add BitmapData To Application Dynamically

if you faced with an error like : type Coercion failed: cannot convert flash.display::Bitmap@3fda39a1 to mx.core.IUIComponent. you are probably trying to add a bitmap directly to defaul app. so check this little code, it creates an UIComponent for holding bitmap. private function init():void { var bmd:BitmapData = new BitmapData(80, 30, false, 0xFFCC00); var rect:Rectangle = new Rectangle(10, 10, 40, 10); bmd.fillRect(rect, 0xFF0000);var pt:Point [...]

Flash Policy

If you are developing a flex project which needs loading external files you may face with security errrors. Just for skipping these in development go to project->properties->Flex Compiler ->Compiler Arguements and add -use-network=false By the way don’t forget the cross domain in server side If you enjoyed this post, make sure you subscribe to my RSS feed!