Thursday, August 25, 2005

Flash Lite [ 1 ] How to start

Macromedia use Flash Lite in the Mobile device, especially for the mobile phone. Currently, it only allow to use the ActionScript before Flash 4. It's difficult for me in the begin, because I start use from Flash 5.

For using the Flash Lite to create the MMI (Man Mechine Interface) in the mobile phone. I need to go back to study the old programming method. Flash Lite didn't support array, function, and need to use tellTarget to control the MovieClip.

Let's go to start using Flash MX 2004 to create a content for the Flash Lite. Suggest you create a template, it will save your time to change the settings, and avoid you forgot something.


Before you save a template, you need to set:
- File size: 176x220 (base on your device's resolution)
- Player: choose Flash Lite 1.1
- Frame rate: 20 ftp


Becuase most of mobile phones use the keys to control, and you will need a "Button" to get the key's event. Suggest you can create one in your template, that will be more convenice for you.

There are lots of ActionScripts used most often, introduce two fist,
fscommand2("FullScreen", boolean);
//This ActionScript will set your content fullscreen or not, but not all devices could be display as fullscreen. So you need to test it in your device. (currently, Nokia support, but SonyEcrisson didn't)

fscommand2("SetSoftkeys", "left", "right");
//This is very important for the mobile phone, most of all have these buttons. Usually, each phone has two and they put beside the 4 way navigation keys/joystick, We call "Softkeys", it means could use software to change the function for the hardware button. Others hardware buttons usuallly have their major function, but the "Softkey" will change dynamically, base on the state. You can choose Flash Lite 1.1>FSCommand2>SetSoftkeys to add this code.

0 Comments:

Post a Comment

<< Home