|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SOA World Conference
Virtualization Conference $50 Savings Expire June 24, 2008... – Register Today!
SYS-CON.TV SYS-CON.TV WEBCASTS |
MXDJ TOP LINKS YOU MUST CLICK ON ! Mobile
Web and Mobile Convergence Sharing Data Between Flex 2 and Flash Lite
Developing a blog aggregator
By: Marco Casario
Nov. 5, 2006 03:00 PM
Digg This!
Page 2 of 2
« previous page
The HTTPService request waits for a parameter that represents the URL of the post selected by the user in the datagrid control. These saved values are stored into the database and will be requested by the Flash Lite application. So that all the news bookmarked will be available via a Flash Lite enabled mobile phone. For our purposes, this is enough, but you could go further in extending the Flex application. You should use the StringValidator tag to validate the data inserted by the user into the Text Inputs so that you avoid errors on the business tier. Or, you could add some styles or customizations to the user interface using Cascading Style Sheets (CSS).
The Mobile Application: Creating a Flash Lite XML Parser You can try it by launching the URL, http://88.149.156.198/develop/rssToDb/rssmobile.php. However, you will see that another limitation occurs because the Flash Lite 1.1 player cannot parse XML directly. It can load dynamic data via the loadVariables function, using the name/value pair data structure. Using this method, you can load almost any data within Flash Lite 1.1 content. We were inspired by a ready-to-use PHP RSS parser written by Alessandro Pace who explained in an article for Adobe Developer Center (www.adobe.com/devnet/devices/articles/flashlitell_rss.html) how to create a Flash Lite 1.1 RSS (Really Simple Syndication) reader using a server-side PHP RSS parser. With the following PHP 5 XML parser, a RSS 2.0 feed will be read to extract the <title> and <description> tags contents for each <item> block, and then the content will be customized so it can be loaded into the Flash Lite 1.1 RSS reader on the mobile phone, as shown in Listing 5. The values returned by the echo will produce the following output: &title1=Tips for Developing Flash Games for the iRiver U10&description1=New article on DevNet at Adobe: Tips for Developing Flash Games for the iRiver U10. It includes two samples available for download. The article is written by Sung-Hee Park of MiniGate. Alessandro The code is pretty simple and well commented but if you want further explanation, you can read the "Analyze the Code" section of the tutorial (www.adobe.com/devnet/devices/articles/flashlite11_rss_02.html). It's now the turn of the Flash Lite user interface. You can download the complete application on the Adobe Devnet : Flashlite11_rss_samples.zip (http://download.macromedia.com/pub/developer/flashlite11_rss_samples.zip). Opening the Flash file, you'll see the application is made up of 5 frames and 3 layers. The most important part of code is contained in frame two, where the call to the server is made using the loadVariable function: loadVariable (http, ""); The "http" variable points to the server-side PHP file's URL, and it's definied on frame one: http = "http://88.149.156.198/develop/rssToDb/mobileparser.php"; The loadVariable function reads data from an external file, such as a text file or text generated by server-side script (Coldfusion, PHP ...), and sets the values for variables in a target movie clip. The text at the specified URL must be in the standard MIME format application/x-www-form-urlencoded (a standard format used by CGI scripts):
&title1=more on apollo&description1=news from apollo&title2=flex url kit&description2= All the navigation features are hidden on frame five inside the hidden button used to select the variables title and description and to scroll the dynamic text contained in the description variable, as shown in Listing 6.
Conclusion Page 2 of 2 « previous page
LATEST FLEX STORIES & POSTS
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||