warning: Creating default object from empty value in /home/mlange/codes.widged.com/modules/taxonomy/taxonomy.pages.inc on line 34.

Flex

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 );
}

privsource: 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 );
}

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

Developing Android applications with Flash Builder

The first step is to install the AIR 2.5 sdk

Go to the page on Adobe AIR for Android at Adobe Labs. Signup for the prerelease.

Follow all the steps necessary to download the AIR 2.5 sdk. Unzip the archive. You should end up with a folder of the like:

AIR25_mac_sdk_20100517

Navigate to the sdks folder of FlashBuilder, within the Application folder.

/Applications/Adobe\ Flash\ Builder\ 4/sdks/

Developing Android applications with Flex

I am lucky enough to have a Nexus One (my first smartphone). That means that I can experiment with Flex on touch phones.

I will provide more details as I continue to experiment. I had a quick go at producing a hello world solution. Well, that was a conference name badge ("hello my name is") but you get the idea.

Flash Player 10 on Android

Quite gobsmacked. I have now Flex applications running on my Nexus one.

There were some rumours of Froyo only available in June. Then other rumours of it being already pushed over the AIR. But that appeared to be mostly for phones given to the Press.

Thanks to giz http://bit.ly/cF9os6 got froyo on the nexus1.

Once Froyo was installed, I had to point the browser on the device to the labs download page

http://labs.adobe.com/downloads/flashplayer10.html

States in components inheriting from a custom class

A standard recommendation is to separate view from controlling code. A good way to achieve this in Flex is to have a mxml class that contains nothing but view and to move all the controlling code to a superclass.

LoginScreen.mxml


<p:LoginScreenClass xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:p="path.to.LoginScreenClass.*" />

LoginScreenClass.as


package path.to.LoginScreenClass
{
import mx.containers.VBox;
public class LoginPanelClass extends VBox {}
}

Flex Builder autocompletion problems

Writing this down as a memory refresher as I bump across the issue on a regular basis.

On some projects, autocompletion seems to not work properly. In particular, within the flash package. flash.events.Event, flash.display.Bitmap are nowhere to be seen. If you add them manually, it compiles fine. But if you make any change to your script, then Flex Builder may attempt to reorganize your import statements and the flash.events or flash.display imports disappear most annoying.

DiscoGrid, Pure Actionscript 3 project in FlexBuilder

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

Demo | Source

Avoiding sandbox violation in AIR when using DragManager on locally stored images

For a mini AIR project I had some issue with sandbox security violation warnings that kept coming up any time I was using DragManager on images for which the source had been set to some locally held images (within the User Directory).

To bypass these warning, it is required to load the bytes into a bitmap and to get the image component display the bitmap. Code below.

Simplistic map maker

Expand on the tileset example to provide a map editor

(The download functionality requires flash player 10)

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

Demo | Source

Free to re-use tilesets can be found on the Reiners website. As per Reiners Readme Page "All the graphics and meshes are freeware. Even for commercial Games. I just want my name in the Credits in the commercial case: Reiner "Tiles" Prokein. You can modify my graphics in every needed way to fit it to your needs: size, colour, fileformat, etc., you can reuse the textures ... . "

Further resources are listed on the widged wiki, under game content and game tiles. (Note however that these links were collected 2-5 years ago, some may be broken)

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