Archive for May, 2008

Nokia and Adobe webinar – Flash and Mobile Browsing

There will be Nokia and Adobe webinar on June 5th:

Topic: Flash and Mobile Browsing
Time: 10-11am PST, 5 June 2008
Presenters: Stephen Ellis (Forum Nokia) & Bill Perry (Adobe)

"Description: This one-hour webinar will explore the integration of Flash Lite on mobile devices, give pointers for developing online mobile Flash content, and provide a full question-and-answer session. This webinar is another in a continuing series of joint webinars between Nokia and Adobe to provide developers with information and guidance for creating mobile experiences using Flash technologies."

You can register here.

Adobe Flash Player 10 – Beta

Adobe releases Adobe Flash Player 10 - beta and introduces new expressive features and visual performance improvements that allow interactive designers and developers to build the richest and most immersive Web experiences. These new capabilities also empower the community to extend Flash Player and to take creativity and interactivity to a new level.

Key new features are:
* 3D Effects
* Custom Filters and Effects
* Advanced Text Layout
* Enhanced Drawing API
* Visual Performance Improvements

You have to install new beta to see interactive demos

View live demo here
Read complete details and download Flash Player 10 via adobe lab
Read press release here

Testing KuneriLite plugins part two: Accelerometer plugin

I want to test N95 Accelerometer and I installed Nokia N95 Accelerometer plugin package and made a small test with KuneriLite Accelerometer plugin. After a few test I noticed that getting a new axis values takes around one second. Oh it is ok I think but finally I noticed that all redrawing of the UI is hang also for a second. I have installed a new firmware to my N95 with Flash Lite 3.0 Player, which seems to have XML Socket bug and very slow. You can read more from Forum Nokia thread and Kuneri bloggy.

Like you can see at below picture, calling XML Socket in KuneriLite Accelerometer plugin in Flash Lite 3.0 Player takes about 1 second, and it hang UI drawing also to same time.

True and sad :-(

Edit:
Getting a new axis values:
- Nokia N95 (V 21.0.0.16, Flash Lite 3.0 Player) about 1101 ms. (left)
- Nokia N95 (V 20.0.015, Flash Lite 2.0 Player) about 100 ms. (right)

PTM Accel Pic 1 PTM Accel Pic 2

Sources: PTMAccel.zip (Flash Lite 2.0 Application)
SIS: PTMAccel_3rd_edition_signed.sis (install it to phone memory)

Testing KuneriLite plugins part one: Camera and Upload plugins

Finally I got time to test KunerLite plugins. They have done 11 nice plugins to extend Flash Lite applications. Now I am going to test a few of them and write some lines here in my blog.

My first test is to do Flash Lite application which takes pictures and sends those to server side. This testing application sends pictures to my server http://ptm.fi/temp folder, so check you uploaded photos from there.

PTM Camera pic 1 PTM Camera pic 2 PTM Camera pic 3

Setting up system
I recently reinstalled Windows again, so I have to install Active Perl and Symbian S60 3rd edition SDK Maintenance Release back to my computer to get KuneriLite working. You can find all necessary information’s from KuneriLite Wizard Beginner's Guide (they have done excellent wiki for you which helps setting up KuneriLite to your computer). After Perl and S60 SDK is ready in your computer, you have to install KunerLite, you can download free Basic version from Kuneri’s web site.

Flash Lite application
The idea of application is to take picture and send it to server side. I decided to program Flash Lite 2.0 application because I don’t want to mess with old Flash Lite 1.1 code anymore :-) . All code is written to first frame of timeline, I will describe here only needed lines to understand taking and sending picture to server side. Please see source code for more information.

Initialize application
A few variables are defined to handle picture name and KuneriLite plugin gateway errors. I have made small delays between taking/storing picture, making thumbnail and loading thumbnail because you have to wait a little time to get picture ready to resize or loading. These processes are handled with process and intervalId variables and setIntervals. Pictures and thumbnails are stored in application installation directory.

var picName:String = "";
var klError:Number = -99;
var process:Number = 0;
var intervalId:Number;
var path:String = "\\Data\\Others\\Trusted\\PTMCamera\\";

Taking picture
When user press mobile phones number one key, a new mc is created to store and show picture’s thumbnail. KuneriLite uses loadVariables()-function to call Camera plugin to take picture. You can find more information about Camera plugin from their web site. Here I just take full size picture with main camera.

/* take picture */
function takePicture(){
  // create new mc to display new image
  if (image_mc != undefined) {
    removeMovieClip(image_mc);
    picture_txt.text = "";
  }
  this.createEmptyMovieClip("image_mc",this.getNextHighestDepth());
  image_mc._x = 40; image_mc._y = 105;
  picName = giveDateAndTimeString();
  var command:String = "";
  command += "http://127.0.0.1:1001/Basic/camera?klCommand=start";
  command += "&klMode=picture";
  command += "&klPath="+path+picName+".jpg";
  command += "&klSize=full";
  command += "&klIndex=0";
  status_txt.text = "status: taking picture...";
  bottom_mc.image_txt.text = "";
  process = 1; klError = -99;
  loadVariables(command,"");
}

Making thumbnail and show it to user
After picture is taken it will be resized and loaded to Flash Lite application. You can resize pictures with KuneriLite Camera plugin and load pictures with MovieClipLoader.

/* make thumbnail */
function resizePicture() {
  clearInterval(intervalId);
  var command:String = "";
  command += "http://127.0.0.1:1001/Basic/camera?klCommand=resize";
  command += "&klPath="+path+picName+".jpg";
  command += "&klSize=160*120";
  command += "&klTargetFile="+path+picName+"_thumb.jpg";
  status_txt.text = "status: resizing picture...";
  process = 2; klError = -99;
  loadVariables(command,"");
}

/* load picture */
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
function loadPicture(){
  clearInterval(intervalId);
  status_txt.text = "status: loading thumbnail...";
  mcLoader.loadClip(picName+"_thumb.jpg",image_mc);
  picture_txt.text = picName+".jpg";
}

function onLoadError(mc:MovieClip) {
  status_txt.text = "status: error loading thumbnail!";
}

function onLoadComplete(mc:MovieClip) {
  status_txt.text += "done!";
}

Sending original picture to server side
Sending is very similar process, just call KuneriLite Upload plugin and it sends picture to server. In server side you have to use for example PHP to get and store picture (you can find example PHP code from Kuneri’s web site). Remember give write permission to folder where images will be uploaded.

/* send picture */
function sendPicture(){
  var command:String = "";
  command += "http://127.0.0.1:1001/Basic/uldl?klCommand=upload";
  command += "&klTrId=1234";
  command += "&klUrl=http://www.ptm.fi/flashlite/kuneri/getImage.php";
  command += "&klFile="+path+picName+".jpg";
  command += "&klType=image/jpeg";
  status_txt.text = "status: sending picture...";
  process = 3; klError = -99;
  loadVariables(command,"");
}

There are also function which handles user interactivity with mobile keys and function which just check processes what is happening in Flash Lite application and updates dynamic status textfield. Please see those in source codes.

Creating SIS-file
You can create SIS file with KuneriLite Wizard. It is very easy process – create project, select plugins, add files to your project and finally create SIS file. I have made own cer and key files with makekeys command. More info to sign SIS files can be found for example from Adobes site.

Creating SIS file

Source and SIS files
This application is designed to run 240x320 screens and for testing purposes only. It uses KuneriLite’s default generated UID in SIS package.

Sources: PTMCamera.zip (Flash Lite 2.0 Application)
SIS: PTMCamera_3rd_edition_signed.sis (install it to phone memory)

It is amazing easy to do this kind of application with KuneriLite plugin’s, thanks to all KuneriLite team members!

Adobe Developer Week 2008 materials available

Adobe Developer Week 2008 showcased Adobe end-to-end web development tool suites and solutions on March 24, 2008. Speakers for that week-long event delivered 20 eSeminars on the latest topics and trends in the developer community, covering Adobe AIR, Flex, Flash, Mobile, ColdFusion, and Dreamweaver technologies.

If you missed those, each session is available for viewing as an OnDemand recording at Adobe Developer Connection.



Get Adobe Flash playerPlugin by wpburn.com wordpress themes