Flex

Loading a module from outside the application directory in AIR

That has taken a fair bit of Googling to figure that one out. Because of security sandbox restrictions, when using the url of the ModuleLoader component, modules can only be loaded from the application directory (or any of its subdirectories).

Solution adapted from Enable Local App to load RunTime CSS.swf from Server

That has taken a fair bit of Googling to figure that one out. Because of security sandbox restrictions, when using the url of the ModuleLoader component, modules can only be loaded from the application directory (or any of its subdirectories).

Solution adapted from Enable Local App to load RunTime CSS.swf from Server

{syntaxhighlighter brush: as3}
private function loadModule():void
{
var file:File = File.userDirectory.resolvePath("test/MyModule.swf");

Embedding tinyMCE or firebug-lite in the <mx:HTML> tag of an AIR project

When I started experimenting with the mx:HTML tag in AIR, I ran into a series of problem. Javascrpt code that would run perfectly fine in the webkit browser running on the desktop would not run correctly in an AIR app (using the same version of webkit) .

Flex project setup - Five use cases for multiple source paths linking

I had a chance to give a talk at the Wellington User Group recently. In the process of preparing it, I discovered a few new tricks and solidified a few old ones.

What I will describe here is how you can take advantage of source import to set up your flex project to enable parallel development of an official release, unit test, web service test, ui development and experimentation, mock data.

At its worst, you will end up with a reserved workspace in Flash Builder that contains the following projects:

FishBoid, a mini-game for android Nexus One

First attempt at creating a mini-game with Flex on the nexus one.

Determine the direction of the fish by moving your device up and down and left and right.

The video was taken using some box contraption that ensures that the camera moves in parallel to the device, to ensure that the screen remains in focus. Any up and down or left and right movement appears weaker than it actually is.

API additions to use on the Android device

source: Mobile revolution by Serge Jespers

Gestures

public function init():void 
{
   Multitouch.inputMode = MultitouchInputMode.GESTURE;
   logo.addEventListener(TransformGestureEvent.GESTURE_ROTATE, onRotate );    
   logo.addEventListener(TransformGestureEvent.GESTURE_ZOOM, onZoom );
} 

priv

source: Mobile revolution by Serge Jespers

Gestures

{syntaxhighlighter brush: as3}
public function init():void
{
Multitouch.inputMode = MultitouchInputMode.GESTURE;
logo.addEventListener(TransformGestureEvent.GESTURE_ROTATE, onRotate );
logo.addEventListener(TransformGestureEvent.GESTURE_ZOOM, onZoom );
}

private function onRotate(evt:TransformGestureEvent):void
{
// pssst... you should try rotationX or Y
logo.rotation += evt.rotation;
}

Syndicate content
Powered by Drupal, an open source content management system