Tag Archives: Alert
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; import flash.filesystem.File; private… Read More »
Listening to keyBoard in Adobe AIR/FLEX….
Hi all…. We all need to know which key is pressed in an application up on which we may need to take an action. For example if the user presses “Ctrl + s” we know he want to save. So for that we need to listen to keyBoard events. For this we use the keyBoard event Listener. First… Read More »
How to show hyper link in Alert in Adobe AIR/ FLEX?
Alert Button with Image in Adobe AIR/FLEX…
We usually see only alerts with text only, but in Adobe AIR and FLEX we can have alerts with our images in it. That’s really cool right. Take a look at this simple example. It places an image in the alert. Make sure that you have the image named “alert_image.png” in your “src” folder or otherwise give the… Read More »
File Operations in Adobe AIR/FLEX
The following example shows how to deal with a simple text file in Adobe AIR/FLEX. This example illustratesd how to write a string to a text file and save it in the desktop. However you can use the “application directory” but make sure that you have necessary write permission to access the directory. Please leave your valuable comments…..
Access a remote database from Adobe AIR or FLEX.
Access a remote database from Adobe AIR or FLEX. Many often you need to access online database from your application. For doing it in Adobe AIR of FLEX you need HttpService. The following example shows how to access an online database from an AIR Application. Note that you cannot return an array from a remote file or database,… Read More »
Using StyleManager in Adobe AIR and FLEX.
Pass a variable from one window to another in Adobe AIR?
We often need to access another window variable in the current window. The following example shows how to access a variable from one window in the next window. The logic is to create an object of next window in the current window and assign the value of variable in the current window itself so that it becomes available… Read More »
How to Implement Box2D in Adobe AIR?
Everyone will be fascinated how flash games are built on the web that implements the real world physics. Well for your information there are a lot of physics engines available. One of them is the Box2D. Box2D was written in C++. Then it was converted to flash. So now I am going to show you how to build… Read More »
Add Context menu in Adobe AIR or FLEX.
This sample shows how to add a menu to your context menu or the right click of your menu in Adobe AIR. AIR Uses the ContextMenu class to add menu to your mouse right click. import flash.events.ContextMenuEvent; import mx.controls.Alert; // call this function to create context menu in AIR and FLex private function createContextMenu():void { var myContextMenu:ContextMenu =… Read More »
How to refresh a page in Adobe Flex?
How to Skin your Alert or ToolTip in Adobe Flex using actionScript?
The code below does this . Simply copy and paste the following code.. applicationComplete=”init()”> Alert { color : #124332; background-color: #ffffff; header-colors : #243322, #243322; header-height:19; drop-shadow-enabled: true; drop-shadow-color :#243322; corner-radius :10; border-style :solid; border-thickness: 1; border-color : #243322; footer-colors : #243322, #ffffff; title-style-name : “title”; } .myalertstyle { backgroundAlpha: 0.3; backgroundColor: black; borderAlpha: 0.3; borderColor: white; dropShadowEnabled:… Read More »