Tag Archive for 'Flash Lite Sources'

S60 Platform Services — Reaching Further with Flash on Nokia Devices

Via Forum Nokia there will be excellent Flash Lite webinar coming in January 28.

"This webinar will look at the new S60 5th Edition Platform Services and how Flash developers can make use of them. Nokia will give an overview of the opportunities on offer and the techniques used to access location, sensor, calendar, contacts, and other functionality in your Flash and web applications. Join us to learn about some practical examples of how you can use S60 Platform Services to extend what Flash Lite can do on Nokia platforms."

January 28
EMEA Session: 10 a.m. London, noon Helsinki
Register »

January 29
Americas Session: 7 a.m. San Francisco, 9 a.m. Dallas, 10 a.m. New York
Register »

Using S60 Platform Services from Flash Lite Application

New S60 Platform Services and the ActionScript Service APIs are available in Forum Nokia. Flash Lite Developer's Library version 1.1 includes very useful information about new Service Object that allows Flash Lite applications to access S60 Platform Services. Before you start to make Flash Lite applications that uses these services, you have to install Nokia-proprietary ActionScript library for S60 Platform Services for your IDE (read this: Using platform services).

Unfortunately I don't have any S60 5th edition phone in my hands right now to do examples. But I will do when I got one.

Flash Lite sessions in MAX 2008 Milan

There are excellent mobile sessions in Milan too - unfortunately I don't have money to participate there too. If you are going you should attend in these sessions:

Flash Monkey Max the Explorer

Flash Lite Programming for Nokia Devices - Technical Session
This session will give you an insight to the latest development opportunities offered by Nokia and touch on new capabilities and devices. Nokia will give you a practical overview on security, packaging and distribution. From Flash, to Web Runtimes, to integrated services - learn how Nokia is making it easier for design and web professionals to create content for mobile markets.

Speakers:        Riku Salminen
When:             Tuesday, December 2, 1:30 pm - 2:30 pm

Nokia Round Table - Open Session
Open round table meeting - a chance to air development issues and to meet and make contact with some of the Nokia team. We are looking to share current technology thinking - and get feedback on our developer support. Book a time at our booth if you wish to have direct meeting.

Speakers:       You & Nokia team
When:            Tuesday, December 2 4:00 pm - 5:30 pm

Flash and the Mobile Browser - General Session
This session explores the commercial opportunities for Flash and web developers. Using the web skills you already have, see how you can easily extend content to better serve a mobile audience and build customer retention. We will give an overview of the technology - and focus on the business opportunities offered by Nokia platforms. All attendees will get a chance to win a Nokia device and other prizes.

Speakers:        Stephen Ellis
When:             Wednesday, December 3, 10:15 am - 11:15 am

Flash Lite news from Adobe Max 2008 SF

A lot of great news was given with Flash Lite in MAX 2008 SF. Big and fast boys have wrote a lot of infos to web already. Look more detailed infos for example here:

- Mobile round-up (biskero)
- Flash Lite 3.1 distributable player announced (biskero)
- Adobe MAX 2008 Announcements for Mobile and Devices (scott)

Great thinks are happening with Flash and devices soon, I can't wait to get more devices in my hands (like tube). Oh one more thing - I took Adobe Flash Lite Mobile Developer exam and scored 100% :-)

Flash Lite Mobile Sertification

Adobe Flash Lite Penetration Forecast for 2008/2009

Great news for all Adobe Flash lite developers via Mark Doherty, "I’m really happy to bring you a new snapshot of the recent Strategy Analytics Flash Lite Forecast. Strategy Analytics have worked extremely hard to provide this data and this time I think its more accurate and detailed than ever."

Flash Lite Devices Shipment 2009

"You can see in the above image that they are forecasting over 922 million devices to have shipped with Flash by the end of the year. In 2009 we will cross the 1 Billion device mark and should ship up to 1.5 Billion by the end of the year. What this shows is that in fact there will be 1 Billion devices in the install base toward the end of next year! Incredible...".

Of course the total numbers are much smaller here in Finland than it is in other Western European Countries, but if we proportion it to the population of Finland then 4/5 has Flash Lite enabled device :-)

"Strategy Analytics also project the penetration of Flash Lite 3 across the install base. In the below image you can see the decline of Flash Lite 1.1 devices and Flash Lite 2.x and 3.x increasing globally."

Same is happening here in Finland too. Nice to see big increasing with Flash Lite 2.1 and 3.0.

Flash Lite Devices Installed 2009

Thanks Mark for sharing this information to community.
Download all pdf material here.

Flash Lite access to phone features in S60 5th edition

Finally there are really excellent news for Flash Lite Developers from Forum Nokia.

"Developers of Flash Lite from Adobe applications benefit from the UI enhancements in S60 5th Edition, with more screen real estate and touch interaction enabling users to more easily and intuitively navigate Flash Lite content and applications. The on-screen keyboard also is available for text and data entry. S60 5th Edition continues to support Flash Lite 3.0, with the addition of ActionScript extensions to take advantage of S60 Platform Services.

These extensions provide access to:
* The application manager
* Calendar records
* Contacts records
* Log information
* SMS and MMS messaging
* The media gallery
* Device location
* Landmarks
* System information
* Sensors

"These new APIs enable Flash Lite developers to access device-application data, such as that held in Calendar and Contacts, as well as information on a device’s location. Together, the UI- and platform-access enhancements will enable Flash Lite developers to create a completely new breed of context-aware applications and services that provide users with information unique to their own experiences."

I have been waiting for this kind of info for years now and finally there are good option to start making real application with Flash Lite to mobile devices.

Execellent! Excellent! :-)

Testing KuneriLite plugins part three: Take, play and send video file from Flash Lite to server

In my earlier Flash Lite article I've tested KuneriLite Camera plugin to take picture (klMode=picture). This time I've it's video support (klMode=video) to record video and store it to mobile phone. I've modified my ActionScript source code a little and it worked very nicely on the Nokia N95. This Flash Lite test application sends videos to my server http://ptm.fi/temp/videos folder, so check you uploaded videos from there.

PTM Video pic 1 PTM Video pic 2 PTM Video pic 3

Setting up system
This time I've tested KuneriLite wizard in Microsoft Vista. I've installed Active Perl and Symbian S60 3rd edition SDK Maintenance Release as I did earlier in my Camera and Upload plugins -article. I had to make small modifications to get KuneriLite Wizard working on vista. You can find these modifications on the KuneriLite Wiki: Microsoft Vista Support.

Flash Lite application
The idea of this application is take video, play it to user and send it to a remote server (if the user wants to send it). All the ActionScript code is written to first frame of timeline. I'll describe here only needed lines to understand how to take, show and send video file to the remote server. Please see the FLA source code for more information.

Initialize application
There is one major bug in my previous example with taking picture, have you noticed it? I haven't thought on the situation where a user start to take picture and then press back when Kuneri Lite Camera plugin is active. The application is trying to make a thumbnail picture, which fails if there is no picture taken. In this video example this situation is handled with Camera plugin Status operation (klStatus).

A few variables are defined to handle video filename and KuneriLite plugin gateway errors.

var vidName:String = "";          // video name
var klError:Number = -99;         // klError number
var klStatus:String = "";         // klStatus string
var process:Number = 0;           // process number
var intervalId:Number;            // interval number
var path:String = "\\Data\\Others\\Trusted\\PTMVideo\\";

Preparing Camera
KuneriLite offers optional prepare command which prepares the camera resource and checks the presence of camera device. I'll check this first and let then user take video.

// check camera condition
process = 1;
intervalId = setInterval(checkProcess,1000);
status_txt.text = "status: preparing camera...";
loadVariables("http://127.0.0.1:1001/Basic/camera?
               klCommand=prepare&klIndex=0","");

Taking video
This stage is very similar to the sending picture example from the previous article. The only visible modification is with Video instance. I’ve added one video symbol to the library and dragged it to the timeline (instance name is video). When a user presses the device’s number one key, KuneriLite uses loadVariables()-function to call Camera plugin in order to take video. Here I just take a full size video with main camera.

//Take video
function takeVideo(){
  // videoname
  vidName = giveDateAndTimeString();
  var command:String = "";
  command += "http://127.0.0.1:1001/Basic/camera?klCommand=start";
  command += "&klMode=video";
  command += "&klPath="+path+vidName+".3gp";
  command += "&klSize=full";
  command += "&klIndex=0";
  status_txt.text = "status: taking video...";
  process = 2;
  klError = -99;
  intervalId = setInterval(checkProcess,1000);
  loadVariables(command,"");
}

Did user take video or not
As I wrote earlier, I didn’t check if the user had taken a picture in my previous example. Here I will do it after the video screen is closed in KuneriLite plugin. I have one function which checks processes to see what had happened in my application. When Kuneri Lite Camera plugin is closed, I’ll start to check if there’s a video file taken or not.

// .. part of my prosess function
// check if video is taken
case 2:
  if (klError == -99) return;
  clearInterval(intervalId);
  if (klError == 0) {
    status_txt.text += "done!";
    intervalId = setInterval(checkVideo,2000);
  }
  process = 0;
  break;
//check is video taken
function checkVideo() {
  clearInterval(intervalId);
  var command:String = "http://127.0.0.1:1001/Basic/camera?klCommand=status";
  status_txt.text = "status: checking video...";
  process = 3;
  klError = -99;
  klStatus = "";
  intervalId = setInterval(checkProcess,1000);
  loadVariables(command,"");
}

If video is available, just start to play it.

// .. part of my prosess function
// is videofile available
case 3:
  if (klError == -99) return;
  clearInterval(intervalId);
  if (klError == 0) {
    status_txt.text += "done!";
    if (klStatus == "complete") {
      intervalId = setInterval(playVideo,2000);
    } else if (klStatus == "exit") {
      status_txt.text = "status: No video!";
    }
  } else {
    status_txt.text = "status: klError = "+klError;
  }
  process = 0;
  break;

Play video
After video is taken, it will be showed to user with video instance.

// Load and play video
function playVideo(){
  clearInterval(intervalId);
  status_txt.text = "status: playing video...";
  video.play(vidName+".3gp");
}

video.onStatus = function(info){
  if (info.code=="completed") status_txt.text += "done!";
}

Sending video file to remot server
Sending is handled the same way I used in my photo example. I added upload status checking to this example. First video will be sent to server and uploading is checked with own made checking function

function checkUploading() {
  clearInterval(intervalId);
  var command:String = "http://127.0.0.1:1001/Basic/uldl?klCommand=status";
  command += "&klTrId=1234";
  process = 5;
  klError = -99;
  klStatus = "";
  intervalId = setInterval(checkProcess,1000);
  loadVariables(command,"");
}

and process function is checking what is going on with uploading. KuneriLite sends a few different status, I used only two of them: complete if uploading is successfully completed or failed if there where some problems.

case 5:
  if (klError == -99) return;
    clearInterval(intervalId);
    if (klError == 0) {
      status_txt.text = "status:" +klStatus;
      if (klStatus == "complete" || klStatus == "failed") {
        process = 0;
      } else {
        intervalId = setInterval(checkUploading,1000);
      }
    } else {
      status_txt.text = "status(5): klError = "+klError;
      process = 0;
    }
  break;

Source and SIS files
This application is designed to run 240×320 screens and for testing purposes only. It uses KuneriLite’s default generated SIS package, so if you have my other examples installed you have to remove these first.

Sources: PTMVideo.zip (Flash Lite 2.0 Application)
SIS: PTMVideo_3rd_edition_signed.sis (install it to memory card!)

Feel free to try this example and send video greetings to me with Flash Lite!

Note! I have 20MB upload limit per file with PHP at my server, so dont take too long videos!

First KuneriLite video advert

I think you really want to see this - hand drawn N95 8GB using Microsoft Paint and a mouse, yes with Microsoft Paint!

Really nice work! If you liked, digg it!

kuneri N95 8GB

Live Video from Linux to Flash Lite 3.0

You can't use Flash Media Encoder 2 in Linux, so you have to make your own publisher with Flash. Idea is to make own Flash application which connects to webcam and send/publish this live video to Flash Media Server 3 and then clients can connect to Flash Media Server 3 and start to view this live broadcast. Here are simple default instructions to send live video from Linux to Flash Lite 3.0 application.

Install Linux and Flash Media Server 3:

  • Install some Linux distribution (I installed Fedora Core 8 )
  • Download and install Flash Media Server 3 (you might have to use -platformWarnOnly)
  • go to your fms directory: cd /opt/adobe/fms
  • start Flash Media Server 3: ./fmsmgr server fms start

You can use command: "ps aux | grep fms" to see list of fms processes running. There should be following processes listed: fmscore, fmsedge, fmsmaster and fmsadmin. If not, there are some problems :-) in your configuration and maybe you want to read this: Flash Media Server does not start after successful installation on RedHat Linux

Creating own publisher with Flash is quite simple. Open NetConnection to Flash Media Server 3. After you get NetConnection.Connect.Success, you can start connection to your webcam and publish stream to Flash Media Server 3.

Publisher:

import flash.net.NetConnection;
import flash.net.NetStream;
import flash.net.ObjectEncoding;
import flash.media.Video;
import flash.media.Camera;
import flash.events.NetStatusEvent;
import flash.events.AsyncErrorEvent;

var nc:NetConnection;
var ns:NetStream;
var video:Video;
var camera:Camera;

// create NetConnection-object
nc = new NetConnection();
nc.objectEncoding = flash.net.ObjectEncoding.AMF0;
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);

// connect FMS 3 default live application
nc.connect("rtmp://localhost/live");

// error handling
function asyncErrorHandler(event:AsyncErrorEvent):void {
  trace(event.text);
}

// if connected, start publishing
function netStatusHandler(event:NetStatusEvent):void {
  if (event.info.code == "NetConnection.Connect.Success") {
    startPublishing();
  }
}

// publish webcam's live to server
function startPublishing():void {
  ns = new NetStream(nc);
  ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
  camera = Camera.getCamera();
  if (camera != null){
     video = new Video();
     video.attachCamera(camera);
     ns.attachCamera(camera);
     // show video in publisher also
     addChild(video);
     ns.publish("livestream", "live");
  } else {
     trace("Please check your camera and microphone");
  }
}

Publish your live video publisher in Flash and upload it (swf, html, js) to your web server. Open your publisher in Web browser and you should see your live video in publisher. Start Flash Media Server Admin console and you should see one live application running and publishing live video.

fms admin

Next you have to make Flash Lite 3.0 application to connect your FMS 3 server and play your live stream. Create Video-object in screen and type following code in first frame in Flash.

Client:

import flash.net.ObjectEncoding;

var video:Video;
var ns:NetStream;
var nc:NetConnection = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;

nc.onStatus = function(info:Object):Void {
  if (info.code == "NetConnection.Connect.Success") {
    startStreaming();
  }
}

function startStreaming() {
  ns = new NetStream(nc);
  ns.setBufferTime(2);
  video.attachVideo(ns);
  ns.play("livestream",-1,-1,true);
}

status_txt.text = "Status : Connect....";
nc.connect("rtmp://your.server.ip.here:1935/live");

Note!
You might have some issues with Linux firewalls, then you must edit /etc/sysconfig/iptables to allow connect FMS ports. Add following lines to iptables to allow ports: 1111 and 1935 access from remote and restart your iptables with command: /etc/rc.d/init.d/iptables restart

# flash media server 3
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1111 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1935 -j ACCEPT

Download sources: all

2007 Flash Lite Game Contest Results published

The results of the 2007 Flash Lite Game Contest are available now in mobilecontest site. But where are my games :-( I don't know maybe graphics are so weak in those or something else. But I have to think this hard, maybe some of jury members will write some comments (or you developer) here and I can make my games better later time. Thanks.

EMEA
1) Mondo Under by Fabricio
2) StoreKeeper by Virgilio Ragazzi
2) Toy Cars by CreativeSource
2) Top Tris by CreativeSource
3) Fuseo Arcade by Romeo Kollar
4) Empty Space by Francisco de Toro Prieto
5) The bee Game by Lluis Fons

America
1) Bog Frog by Emilia Ciardi
2) Sketch Mini by Chung Santoki
2) I love pizza by Emilia Ciardi
3) Mr. Shooti by Roozbeh Roozbeh
4) Think Fast by Afzainizam Zahari
5) Mutilator by Christian Gonzales

Apac
1) UFO Catcher by Carlos Nazareno
2) Crossroads by Samir Dash
3) Chain Reaction by Samir Dash
4) Fill Board by Samir Dash
5) Odd Spots by Samir Dash

Congratulations to all winners!



Get Adobe Flash playerPlugin by wpburn.com wordpress themes