Category Archives: Adobe_AIR/FLEX

How to find your Google Plus ID

This is so simple 1. Go to your Google + account ( 2. Click on the Profile icon on the Left. 3. If you look at the URL in the address bar, it should look something like this: 4. The long numerical string in the URL is your Google+ ID. Here is CoderzHeaven’s from… Read More »

How to drag and drop a file from outside to your flex or AIR application and render it correctly?

Actually we have to do this by registering your application with the eventlisteners for NATIVE_DRAG_ENTER and NATIVE_DRAG_DROP. The following code shows how to do this. Just copy and paste the code to your MXML file and see the result. Drag and drop an image file from outside to your AIR application. import mx.controls.Alert; import mx.controls.Image;… Read More »

Adding Links in Menu in Adobe AIR/ FLEX.

Hi all… In this tutorial I will show you how to add links in a menu in Adobe AIR/ FLEX. It is really simple. Just add a normal menu item and on the click handler for menu items match the label and navigate to the URL, that’s all. Check out this example. Change the mx:Application… Read More »

ToolTip Sound in Adobe AIR/FLEX…

Sometimes we may need to have a sound when we hover over something, i.e when a tooltip appears. Actually this can be done easily by adding an eventListener to the corresponding control. Take a look at the example. This line is the important line. myLabel.addEventListener(ToolTipEvent.TOOL_TIP_SHOW, myListener); The function myListener gets called when we hover over… Read More »

Using ButtonBar in Adobe AIR/FLEX, A simple Example

Hello………. A button Bar is a convenient way to place your buttons in an application. It saves a lots of space in your application interface. Take a look at the following example which shows how to use the ButtonBar. An itemClickEvent is attached to each button in the ButtonBar. You can place as many buttons… Read More »

Toggle between Full Screen and normal Screen in Adobe AIR or FLEX.

Hi all……… We often need to toggle between fullscreen and normal screen in our application. The following code snippet helps you to toggle between these two screens in Adobe AIR or Flex. Here I am using StageDisplayState class to do both which has “stage.displayState = StageDisplayState.FULL_SCREEN” and ” stage.displayState = StageDisplayState.NORMAL” constants to do this.

Create PopUp Window in Adobe AIR / FLEX, A simple Example.

Below code shows how to create a new popUp window in Adobe AIR or FLEX. To create a new window “right click on the src folder and create a new MXML Component named Here “MyLoginForm” It should be aTitleWindow for the example below. How ever You can create other components, but the code accordingly must… Read More »

FullScreen Event in Adobe AIR or FLEX

  The following simple code snippet explains how to get an eventListener for FullScreen Event in Adobe AIR or FLEX. The function “onScreenModeChange ” gets called when you maximizes your window. private function init():void { stage.addEventListener( FullScreenEvent.FULL_SCREEN, onEnteringFullScreenMode); } private function onEnteringFullScreenMode( e:FullScreenEvent ):void { if( e.fullScreen ) { // Do something on fullscreen…………… } else… Read More »

How to dynamically add controls in Adobe AIR or Flex?

Below example shows how to add a label control dynamically in AIR or FLEX. var L : Label = new Label(); L.addEventListener(MouseEvent.CLICK,LabelListener); = “my_label_name”; L.text = “my Text”; addChild(L); // This function listens to the mouse click in the above added label. private function LabelListener(event:MouseEvent):void { } Please note that you can add any… Read More »

Trim() function in ActionScript(Adobe AIR , FLEX etc)…

The function for trim in ActionScript is defined inside StringUtil Class. Checkout the following function. public function stringTrim(result:String):String{ result = StringUtil.trim(result); trace(result); return result; } Please post your valuable comments if the post was useful. The function for trim in ActionScript is defined inside StringUtil Class. Checkout the following function. public function stringTrim(result:String):String{ result =… Read More »

Crop an Image in Adobe AIR or Flex.

Below code shows how to crop an image in Adobe AIR. Change the mx:WindowedApplication to mx: Application to run it as a FLEX Application. The code uses copyPixels to extract the desired part from the image file. The important line in the below code crops the image. cropBD.copyPixels(loadBD, new Rectangle(startPoint.x, startPoint.y, squareSize, squareSize),posPoint);