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 »

Show Alert in cocos2D Android.

Here is a simple example showing alert in android cocos2D. For this I am using an example from my previous android cocos2D tutorial.. So please read that tutorial before reading this because the I am using the classes and files from it. I am only changing the Gamelayer.java file to show an Alert Dialog when the sprite move… 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 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 »

How do you call an actionscript function from a html page and viceversa. How to you access the actionscript variable function from an HTML page in actionscript.

The following code helps you to do this. Save the following  code as am .mxml file The html file start.html