Bouncy N Crazy & Flash Lite 4

I was very much busy in university exams and also working on a number of projects in parallel. However, few weeks back i completed one of my game name as “Bouncy N Crazy”. Lets jump into its review,statistics at OVI and then a discussion on the game from developer’s point of view.

Description :

Bouncy N Crazy is a cartoonic graphics side-scrolling Symbian^3 game in which your objective is to take Mr. Bouncy to the end of level by controlling him through motion sensor of phone and jumping through the obstacles. This game features 25 levels of FUN, 3 themes and high-scores to compete with others.

Screenshots :

Download Bouncy N Crazy :

http://store.ovi.com/content/109934

Statistics @ OVI Store:

The game started well and its 26 days since i published the game at OVI store and i earned 56 Euros out of it. I must say that these statistics are good as compared to the previous year. Moreover, this game is only available for Symbian^3 phones.

Development Experience with Flash Lite 4 on S^3:

Well! Let me start this topic by admiring Flash Lite 4.

-Flash is such an easy to develop platform

– Flash Lite 4 is very fast as compared to Flash Lite 3.x.

– AS 3 support allows you to write optimized contents with high performance and may allow you to use available AS 3 classes/compontents with little or no modification.

But there are some issues with Flash Lite 4 which are a negative factor for creating good quiality games  :

– No GPU support.

– Sounds cant even get synchronized correctly i.e if you like to play a background music and play an event sound (like popping a baloon) then just forget that event sound plays correctly (in time).

– There are Accelerometer APIs in AS 3 but no way to lock the screen in it. Thus, for motion sensor (accelerometer) based games you have to embed your Flash Content in WRT and if you embed your Flash Content in WRT then Accelerometer APIs will not work. Therefore, the only combination work for creating Accelerometer based contents for Flash Lite 4 is :

WRT+Flash Content->ExternalInterface->PlatformServices(Accelerometer APIs)

But then you will face buffering issues as Platform Services push data with more frequency then that of the Flash Content (FPS). Thus, you have to create a mechanism to avoid overwhelming of data at Flash Lite Content side. I will write an article to explain that mechanism for beginners.

I also participated in Calling All Innovators with this game . Wish you have a great day 😉

Best Regards,

Sajid Ali Anjum

Flowella – Create design prototypes,without writing a line of code

I just give a try to this great looking tool and the results are great. Input to this tool are images and output is a design prototype which can be exported in form of Flash Lite or WRT prototype. If this tool keeps growing then m sure it will be a great tool to use for designs.

Description
Flowella is an easy to use tool that enables designers and developers to create design prototypes — without writing a line of code.
Prototypes are built using images of screen mock-ups and defining links between the screens. This information is then used to create an Adobe Flash Lite 3.0 application or Web Runtime (WRT) widget. These applications can then be run on one of over seventy Nokia devices or in a simulator supplied with Flowella, enabling the application interaction to be assessed.

Key features

  • Create interactive prototypes in minutes using a WYSIWYG interface.
  • Compatible with computers running Apple Mac OS X and Microsoft Windows computers.
  • Export prototypes to Adobe Flash Lite applications and Web Runtime widgets.
  • Prototype application compatible with over seventy compatible Nokia devices.
  • Ideal for testing of visual and interaction design.

Download

To download Flowella, please visit :

Flowella Download Page @ Forum Nokia

Best Regards,

Sajid Ali Anjum (SajiSoft)


Forum Nokia Online Flash Lite Packager is back!

For all the coders who want to concentrate on Flash Lite coding only and dont want to learn Symbian C++ just to make a Flash Lite stub can use this online flash lite packager (swf->sis) :

Online Flash Lite Packager

Just a note, if u use to work on a computer which doesnt have an internet connection or u just want to work offline than u can give a try to Helisso Packager :

Helisso Packager

Best Regards,

Sajid Ali Anjum (SajiSoft)

Flash Lite stub doesnt launch from memory card (System Error) (FIXED)

Problem:

Flash Lite stub doesnt start from memory(SD) card correctly & gives a SYSTEM ERROR when launched but the same stub works fine when installed in phone memory. This problem occurs in some 5800 (yes i m able to reproduce this error in my 5800) , N97 & 5230 phones.

Fix :

First, we should know the problem behind it. According to my observation, this error occurs due to the inappropriate compeletion of path by this API :

_LIT(KStubFlashContent, "\\private\\EE001122\\stub.swf");

FlashUIConfig config;

config.iContentFileName.Copy(KStubFlashContent);

Therefore, one of the easiest fix to this problem is to complete the path by ourselves. It is not a big deal , we just need to find out our application’s installed path & then we extract the first 2 characters from it (i.e the drive letter) and then we append the path of our swf to this drive letter to complete the path ourselves. Let me write the code for it :

 

_LIT(KStubFlashContent, "\\private\\EE001122\\stub.swf"); //our swf incomplete path

 

RProcess self; //an instace of RProcess
TBuf<200> myPath;
/*Now, copy the first 2 characters of our app complete path i.e drive letter*/
myPath.Copy(self.FileName().Left(2));
/*Append the incomplete path to the drive letter*/
myPath.Append(KStubFlashContent);
/*Now,we have a complete path, just copy it  iContentFileName*/
FlashUIConfig config;

config.iContentFileName.Copy(myPath);

 

NOTE: I only mention the parts of modification but not the complete code for the creation of a stub. For the complete code, go to this wiki article .

I request all the developers (who are distributing there applications via Flash Lite Stub or creating packing tools) that please, implement this code in your Stub,otherwise, u may think that ur application will works fine with all 5th edition phones but it will not. Thanks for your time 😉

Best Regards,

Sajid Ali Anjum (SajiSoft)

How To Start Flash Lite Content In Background !

If u want to throw the Flash Lite Content in Background just when u start it from the phone’s menu in 5th edition phones , then i write small snippet for u to achieve this task :

import com.nokia.lib.Service;
var appManager = new Service("Service.AppManager", "IAppManager");
var inParams = {ApplicationID:"s60uid://0x102750F0"}; //Homescreen UID same for all 5th & 3rd fp2 phones
appManager.LaunchApp(inParams, onApplaunch);
function onApplaunch(transactionID:Number, eventID:String, outParam:Object) {
  var errorId = outParam.ErrorCode;
}

The above snippet just send ur flash content to background by calling the HomeScreen UID. Now, a question may arise that what the advantage of sending ur Flash Content as we already know that the flash content just get paused when we send it to background. But my previous statement is not true after the release of Flash Lite 3.1because in Flash Lite 3.1 u can atleast resume Platform services in background.

Btw, i dont recommend to use Flash Lite content as a Console Application 😀

Best Regards,

Sajid Ali Anjum

Review of “Cut The Angle” Multi-Touch Game in Upcoming Adobe Device Central

I am one of the lucky persons who got a chance to be a part of Adobe Device Central pre-release program and thanks goes to Mark Doherty who invited me to this program .

Introduction:

Most of us already know that the upcoming Flash Lite 4.0 & Flash Player 10.1 have multi-touch feature. Now, a question may arise in ones mind that if we are going to have this feature on device then do we have an emulator to test it on PC? The answer is YES! and we have Device Central for that. Now, lets jump to the review :

Description :

Cut The Angle is a multi-touch mathematics game in which your fingers are transformed into a compass and you have to draw a given angle using that compass. It also provides a multi-touch ruler which helps you to draw angles by measuring length to some accuracy. If you are not getting what I am talking about then read here and you will get a flash back of your secondary school mathematics .  🙂

NOTE:I created this game in a couple of days and it is just a demonstration in which I concentrate more on action script then the user interface.

Screen-cast :

Here is a video of this game on upcoming device central:

Actionscript :

Those who are interested in knowing that what kind of Actionscript is used to develop this game then go and take a look at Flash Lite 4 documentation :

MultiTouch Class

SourceCode?

I developed this project with pre-release Adobe Flash. For those who are a part of this program can get the source code from the user-forum of this program.

Hope u like the demonstration .If u have any questions/comments, then just post them here.

Best Regards,

Sajid Ali Anjum (SajiSoft)

–Forum Nokia Champion

 

wledge

ISSUE : HTTP Request from Flash Lite 3.x Client, Hangs UI

Another issue is in highlights which needs to be fixed. When u send a http request via loadVariables or sendAndLoad apis from Flash Lite Client to a Local HTTP or XML Socket Server,it hangs Flash Lite UI for 1 to 1.5 secs which makes all methods of extending Flash Lite via HTTP Server less practical. This issue only arises with Flash Lite 3.0 and 3. For more details , one can take a look on this post of Forum Nokia.

Best Regards,

SajiSoft

API Bridge – More Platform Services For Flash Lite & WRT

I just give API Bridge a try & thinks to share it with other developers. After Platform services API , it is a new tool which provides some other Platform Services. Btw, I like to write my article in form of questions .

What is API Bridge ?

API Bridges is actually a Symbian Server which provides http interface for communication between Server  (API Bridge) & Client (Flash Lite/WRT App). In short, it is a http server which enrich its clients (Flash Lite/WRT app) with different services like accessing camera & taking photos , uploading files , accessing call logs etc.

How a single API Bridge works for both Flash Lite & WRT ?

As we already discussed that API Bridge is actually a local http server. It provide services to all those clients which can send them http requests (ofcourse, only those requests which API Bridge accepts) .  Therefore , it will works for both Flash Lite & WRT .

How to get started with API Bridge for Flash Lite?

Just follow these steps :

1- Unlike Platform Services API, you have to install API Bridge sis package on your phone first . You can find the sis package inside the zip file provided here :

API Bridge

Just send the swf files to your phone and test them .If they are working fine then ur API Bridge is successfully installed.

2- Install the APIBridge sis package in your phone.

3- After installing APIBridge , now u r ready to go to test API Bridge samples. You can find API Bridge samples here :

APIBridge_FlashLiteCode.zip

4- For creating your own contents with Flash Lite API Bridge,  u need Action Script classes which can be found in the above zip file i.e inside a folder with name “si” .Just copy paste the “si” folder in Flash Library path or in the folder where u r saving ur fla file.

5- Just read this article for more details and a clear view of API Bridge :

http://wiki.forum.nokia.com/index.php/Flash_Lite_API_Bridge_Interface

How to distribute a Flash Lite content which uses API Bridge Services ?

Two ways to distribute these contents :

1 – I want to use Flash Lite Stub using Symbian C++ i.e Kuneri Lite, Online FN Packager , Adobe FL Packager etc

It is a very famous way of distributing Flash Lite contents (also known as swf to sis) . Lets follow steps to explain :

1 – Provide swf file to any of these tools and they give u sis file in return.

2 – Now, u can simply edit the sis file , embeds the API Bridge sis (which can be found inside this zip file  API Bridge ) and self signed it again (because once u modified sis u need to resign ur sis file) .

3 – To acheive step 2 , one can use SISContent , it is GUI application which makes packaging related tasks EASY.

4 – Open your sis file (obtained from any packaing tool) in SISContent . Click Tools>Edit . Click on Contents Icon > Add > Embed Package  & select API Bridge sis (keep the check mark on the statement “Install only when package doesnt exists)  and press ok.Now, Click Edit > sign > key pairs > add your own self signed certificate and sign ur sis . Now, goto file and save this modified sis.

Note : If u dont know how to make ur own self signed certificates .Just read the second last paragraph of this article :

How_to_sign_a_.Sis_file_with_Self-Sign_Certificate

BTW, it is very easy, you just need a makekeys.exe and u have to give command as described in the page .

5- Now , you are ready to distribute .

2 – I want to use Flash Lite Content Embeds into a WRT.

To distibute ur swf using WRT , just read this article :

How_to_Package_A_Flash_Lite_Application_that_uses_the_APIBridge

What is the default port of  API Bridge ?

Its Default Port is 9080 and u can find the port by looking at the text file placed in C:\\inovait\\apibridge\\port.txt (after installing API Bridge SIS).You can try a simple test to check it i.e use this actionscript in swf :

loadVariables(“http://127.0.0.1:9080/newfileservice?fileType=Image&#8221;, _root);

and u  will see camera application launched in phto shoot mode . However, u cannot change API Bridge port by editing the text file . 🙂

Where to read more :

–  http://wiki.forum.nokia.com/index.php/Flash_Lite_API_Bridge_Interface By Robert Burdick

http://dalerankine.com/index.php/2009/11/new-nokia-apibridge-for-extending-flash-lite-applications-on-s60/ By Dale Rankine

http://dalerankine.com/index.php/2009/12/new-training-video-accessing-the-camera-using-nokia-api-bridge/ By Dale Rankine

Wish u easy Flash Programming ……..

Best Regards,

Sajid Ali Anjum (SajiSoft)

Issue – Flash Lite stub does not close on pressing red key (FIXED)

Issue

In few software versions of Nokia 5800, when u run a stub application developed using swfpack.com  (or may be other packaging tools) then it wont get closed on pressing red key. However, there is a work around posted by Risalmin in Forum Nokia .

Fix

Fix of this issue is quite easy i.e listen to red key event in Flash Lite and excecute the fscommand2 for quiting app. Use this AS code , to acheive the task  :

var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if(Key.getCode()=="endcall"){
fscommand2("Quit");
}
}
Key.addListener(keyListener);

 

Best Regards,

Sajid Ali Anjum (SajiSoft)

SWFxME 1.0 – Extend Flash Lite Using J2ME

I was working on a open source project from last 4 months.Today , i released this project under name “SWFxME “.It is designed for the developers who want to give more power to their applications using a hybrid application (Flash Lite + JavaME) .Here are few details :

SWFxME:
SWFxME is an open source project developed to extend Flash Lite with J2ME via HTTP server (written in J2ME code) and to provide more power to the developer by making a hybrid application.
The developers who want to know the difference between Jarpa and SWFxME? Then Jarpa is an XML Socket Server whereas SWFxME is a HTTP Server .Hence, SWFxME is more compatible (i.e from Flash Lite 1.1 to onwards) .

Compatibility :
The minimum requirements for SWFxME :
1 – Flash Lite 1.1
2 – MIDP 2.0
3 – JSR-75 (File Connection API) Support
It should have to work with a phone having these 3 characteristics provided that the platform doesnt
have any restrictions to write files, launching files or listening to a local port.

Built-In Functions :
Current version has 2 built-in functions :
1 – Write File
2 – List Directory

Samples , Documentaion & Source :
Every Thing is available on SWFxME Project Page

Tested :
Currently tested with S60 phones (E50, N78 & 5800) but i love to know about other phones like (S40 and SE etc)

Screenshots of the sample :

As this is the first release, i want other developers to test it on their devices and provide feedback .So, the next releases are much more compatible and samples for different platforms will be available .

Best Regards,

Sajid Ali Anjum