
New Project Capuchin tutorial: how to handle external resources
This new tutorial for both Flash Lite™ and Java™ ME developers illustrates how to access external resources and data from Flash using the ExternalResourceHandler class in the Sony Ericsson Project Capuchin API. The tutorial provides step-by-step instructions, screenshots and code snippets on how to create a Thumbnail Viewer project and comes with an accompanying zip file containing the required resource files.
Tutorial introduction
This tutorial outlines how to access external resources and data from Flash using the ExternalResourceHandler class of the Project Capuchin API. Java ME and Adobe® Flash CS3 technologies are used for creating a Thumbnail Viewer and instructions are provided for setting up the working environment.
The ExternalResourceHandler interface is used to load external resources that are referenced within Flash content. The interface has a default implementation, provided by the Project Capuchin API, that handles external files (file:///), Internet resources (http://) and MIDlet resources (res://).
In this tutorial, the default handler is overriden by using a custom implementation of the interface to provide a variety of use cases that can encounter Project Capuchin developers. Thus the method requestResource() is implemented to handle calls for ActionScript loadVars()and loadMovie() functions. The loadVars() function is used to retrieve names of the newest three pictures in the camera album, while loadMovie() calls are used to load thumbnails of each image that has been previously loaded by loadVars().
The Thumbnail Viewer project in two parts – Flash and Java
To build the Thumbnail Viewer, the instructions are presented in two sections:
![]()
The Thumbnail Viewer example in Flash CS3.
About Sony Ericsson's Project Capuchin technology
Sony Ericsson's Project Capuchin allows developers to combine the richness of both Java ME and Flash Lite by encapsulating Flash Lite content in Java ME applications making content created by Adobe Flash technology appear as Java ME applications. Sony Ericsson's Project Capuchin is a set of APIs, a packaging tool, documents and getting-started tutorials, available as separate files to make the SDK as accessible as possible to both Java and Flash Lite developers. Download>> |
![]() |
More information:
Copyright © 2001 - 2009 Sony Ericsson Mobile Communications AB. All Rights Reserved.