Saturday, December 31, 2011

Flash Builder cannot locate the required debugger version of Adobe Flash Player

When debugs with the flash builder it prompt out the annoying message. Error From Flash Builder 4.5

C:\Windows\System32\Macromed\Flash\NPSWF64_11_1_102.dll Flash Builder cannot locate the required debugger version of Adobe Flash Player. You might need to install the debugger version of the Flash Player or reinstall Flash Builder. Do you want to try to debug with the current version?

    STEP to fix it:
  1. Uninstall Flash Player | Windows
  2. Install back the the debug version
    For google chrome user, you need disable the default plugin flash player in the chrome:plugin.
  1. Go to browser url and type : about:plugin
  2. Disable the flash player version, leave one flash player (debug version) enabled.

Friday, December 30, 2011

Flex 4 : Dynamic Add Images

Dynamic create image using AS3.0 script, each created image will add in the event listener handler.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx=""
  <!-- Place non-visual elements (e.g., services, value objects) here -->
   import mx.controls.Alert;
   import flash.display.Sprite;
   import mx.controls.Image;
   private function handleImageClick(event:Event):void
      // your click handler code"Click on me!! ID ="+;
   private function createTile():void
      var image:Image = new Image(); = "img_"+tileBox.numChildren;
      image.width = 50;
      image.height = 50;
      image.source = "";
      image.addEventListener(MouseEvent.CLICK, handleImageClick);

   protected function BT_add_clickHandler(event:MouseEvent):void
      // TODO Auto-generated method stub
 <s:TileGroup id="tileBox" left="50" right="50" top="50" bottom="50"
     contentBackgroundColor="#D3B4B4" horizontalGap="2" orientation="rows"
 <s:Button id="BT_add" left="50" top="21" label="Add Image" click="BT_add_clickHandler(event)"/>
 <s:Label left="152" top="29" text="Click on image get ID"/>