Posts filed under 'FLASH / FLEX / Action Script'
Adobe Flash CS5 Makes Native iPhone Apps
At its annual developer conference in Los Angeles on Monday, Adobe secured Flash’s future, at least for the near term.
Adobe said that its forthcoming Flash Professional CS5 will allow to developers “to create rich, interactive applications for the iPhone and iPod Touch.”
But just because those applications were created as Flash applications does not mean they will be allowed to run as Flash applications.
Flash Professional CS5, to be released as a public beta later this year, will allow developers to create Flash applications using the Flash development platform and then export those Flash apps as native iPhone applications.
“We created a new compiler front end that allowed LLVM [Low Level Virtual Machine] to understand ActionScript 3 and used its existing ARM back end to output native ARM assembly code,” explains Adobe senior product manager Aditya Bansod in a blog post. “…When you build your application for the iPhone, there is no interpreted code and no runtime in your final binary. Your application is truly a native iPhone app.”
That means certain Flash capabilities, such as being able to load another another Flash (.SWF) file or to browse Web content from within exported Flash apps, will not be available. Developers using Apple’s tools, however, can browse Web content from within their own apps via the SDK’s UIWebKit component.
Adobe’s announcement does not change the fact that Flash content on the Web is inaccessible through the iPhone’s Safari browser. Flash content on the Web requires Adobe’s Flash Player browser plug-in, which relies on a just-in-time compiler and virtual machine to render Flash content. Apple does not allow interpreted code on the iPhone.
James Anthony, co-founder of iPhone game maker Inedible Software, said in an e-mail that since his company has been developing native iPhone applications, its development process won’t change at all.
“What does make a huge difference is the flood of Flash developers that can now easily port their existing properties to the iPhone, as well as rapidly create new ones,” he said. “Apple made it pretty easy to get up to speed on the SDK, but this makes iPhone programming trivial for the tons of Flash programmers already out there. It’s definitely most well-suited to games, which aren’t expected to use the built-in user interface elements. There have already been lots of successful games that were clones or ports of existing Flash properties, and now the originals can make the leap painlessly.”
A sudden influx of Flash app conversions may not be entirely welcome, however. iPhone developers have been complaining about how difficult it has become to be noticed among the exploding inventory of Apple’s iTunes App Store and more games means more competition.
Apple recently announced that over 85,000 applications are available for the iPhone and that number is likely to pass 100,000 before the end of the year.
Adobe also announced that Google and RIM have joined its Open Screen Project, an initiative make Flash and Adobe AIR available as a consistent runtime environment across a wide variety of devices and platforms. The company said that Flash 10.1 would be available on Google Android, Blackberry, Symbian, Palm webOS and Windows Mobile devices toward the end of the year.
Google’s decision to support Flash may seem to be out of character. Google executives have been proclaiming loudly that the Web is the platform of the future and have been promoting open Web technologies like HTML 5, which duplicate some Flash functionality. The company’s willingness to look beyond Flash is even more explicit in a recent patent application that describes the company’s ambition to create sophisticated 3D maps “without needing special software such as a Flash plug-in or the like.”
However, company insiders are now striking a more conciliatory tone and acknowledging that Flash may be a better tool for certain jobs than Web technologies and that a lot of developers want to use Flash.
In a blog post, Google SVP of engineering Bill Coughran explains, “We’ve always believed that open platforms lead to greater innovation on the Web and we see participating in the Open Screen Project as another step in that direction.”
Although Adobe appears to have dispelled many doubts about Flash’s future at a time when so many are moving toward open Web technologies, the continued absence of the Flash player on the iPhone will become all the more glaring if Apple, as expected, releases an iTunes-dependent tablet device next year. An Apple tablet could be a showcase device for rich media content, and Adobe will want to make certain that its Flash technology plays a staring role.
Add comment December 9, 2009
Adobe Prepping Flash For Smartphones
Adobe introduced Flash Player 10.1 Monday and the latest version of the software places a stronger emphasis on extending the technology to smartphones.
Flash technology is nearly ubiquitous around the Web and it is used by popular sites such as YouTube, Hulu, and MLB.com. But one of the main criticisms of Flash on smartphones is that it is too resource-intensive and can slow down a device or drain its battery.
Adobe has released Flash Lite on a variety of smartphones and feature phones, but it offer limited functionality.
Acknowledging performance issues, Adobe is using graphical hardware acceleration to ease mobile processing demands for the full version of Flash. The company said this has increased rendering performance on mobile over 87%, and it has reduced memory consumption on mobile over 55%. The latest version for mobile has strong device integration which allows Flash developers to use device-specific features such as multi-touch gestures, virtual keyboards, and accelerometers.
Adobe will be releasing a public developer beta for Windows Mobile, Palm webOS, Windows, Macintosh, and Linux later this year. The company also said public betas for Android, BlackBerry, and Symbian mobile devices will hit in early 2010. Adobe expects mobile devices to be released with full Flash support in the first half of next year.
The only major smartphone platform missing from Adobe’s roadmap is the iPhone. Apple CEO Steve Jobs has said Flash is not good enough for the touch-screen device because of its resource requirements. Additionally, Flash on the iPhone potentially represents a threat to the popular App Store because it enables developers to bypass Apple’s software development kit and just create content with Adobe’s technology. Apple appears to be backing HTML 5 for its mobile platform, which can provide some Flash-like abilities such as video streaming.
Add comment December 9, 2009
_root versus root
You may have heard you should avoid using the global _root variable in prior versions of ActionScript. That’s because the value of the variable was subject to change. Before ActionScript 3.0, the _root variable referred to the timeline of the original host SWF no
matter how many SWFs got loaded.
_root was the equivalent of an absolute address, like referring to an image in a web site as http://www.yourdomain.com/image, or a file on your computer as C:\directory\file, instead of a more flexible relative address such as “image” (or “../image,” for example, if you needed to traverse directories first).
Because _root was an absolute address, if the file in which you used the global variable was loaded into another file, the variable was redefined to become the timeline doing the loading, rather than your original file. This was often not initially intended and would break many object path references that originated with _root.
In ActionScript 3.0, the display list changed that prevailing logic. root is now an instance variable of the display object, and doesn’t always refer to the main timeline. It’s relevant to the context in which it’s used so it behaves more like a relative address and no longer changes just because your SWF is loaded into another SWF. The root of a movie clip in SWF A, is the same if it stands alone or is loaded into SWF B. The same goes for the root in SWF B, whether it stands alone or is loaded into SWF C, and so on.
Add comment October 19, 2009
How to paginate data in a Datagrid
The pagination is an important feature which is required in most of the applications and in a flex application we find it difficult to implement as it is some what different from other technologies. You can use the below solution provide as an example to be used in your applications.
In Flex, by default a DataGrid will display all rows in the data provider. If you have many rows of data then displaying few rows at a time to the user will give a good experience to the user.
The solution may be to make DataGrid display all rows in the data provider and you can split the data and update the data provider with required rows.
Explanation
DataGrid displays all rows in the data provider provided. If you have many rows of data then displaying few rows at a time to the user will give a good experience to the user.
As the DataGrid will display all the rows in the data provider, you can split the data and set the data provider of the DataGrid with only the required rows. To achieve this you will have to do simple calculation and split the data from the full data.
Please look at a good example on how to achieve this and blogged about it. Please find the source code and the sample implementation at the URL below.
http://gurufaction.blogspot.com/2007/02/flex-datagrid-paging-example-with.html
Add comment July 30, 2009
Top 10 – Flex Tools and Resources
When developing Flex and/or AIR applications there are a handful of tools that really make the difference between a good project and a great project. They are all very valuable and provide stability and clarity for the RIA development process; or at least they have for me. From Unit Testing to SVN utilities to frameworks and libraries I’ve found the following ten items to be very useful and helpful. I’d even go so far as to say these are critical for quality Flex RIA development; but as Les says: “It’s just a matter of opinion.” ![]()
Cairngorm
Cairngorm is the lightweight micro-architecture for Rich Internet Applications built in Flex or AIR. A collaboration of recognized design patterns, Cairngorm exemplifies and encourages best-practices for RIA development advocated by Adobe Consulting, encourages best-practice leverage of the underlying Flex framework, while making it easier for medium to large teams of software engineers deliver medium to large scale, mission-critical Rich Internet Applications.
http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm
Download: http://download.macromedia.com/pub/opensource/cairngorm/cairngorm2_2_1-bin.zip
Flex Unit
FlexUnit is a unit testing framework for Flex and ActionScript 3.0 applications and libraries. It mimics the functionality of JUnit, a Java unit testing framework, and comes with a graphical test runner.
http://opensource.adobe.com/wiki/display/flexunit/FlexUnit
Download: http://download.macromedia.com/pub/opensource/flexunit/flexunit0_9.zip
Subclipse
Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE. The software is released under the Eclipse Public License (EPL) 1.0 open source license.
http://subclipse.tigris.org/
Eclipse update site URL: http://subclipse.tigris.org/update_1.6.x
Eclipse
Eclipse is a multi-language software development platform comprising an IDE and a plug-in system to extend it. It is written primarily in Java and is used to develop applications in this language and, by means of the various plug-ins, in other languages as well – C, C++, COBOL, Python, Perl, PHP and more.
http://www.eclipse.org
Download: http://www.eclipse.org/downloads/
ASDoc
ASDoc is a command-line tool that you can use to create API language reference documentation as HTML pages from the classes in your Adobe® Flex® application. The Adobe Flex team uses the ASDoc tool to generate the Adobe Flex Language Reference.
http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_1.html
Flex Ant Tasks
The Adobe® Flex® Ant tasks provide a convenient way to build your Flex projects using an industry-standard build management tool. If you are already using Ant projects to build Flex applications, you can use the Flex Ant tasks to replace your exec or java commands that invoke the mxmlc and compc compilers. If you are not yet using Ant to build your Flex applications, you can take advantage of these custom tasks to quickly and easily set up complex build processes for your Flex applications.
http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html
Installation: http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_2.html#224215
Degrafa
Degrafa is a declarative graphics framework open source licensed under MIT.
http://www.degrafa.org
Download: http://www.degrafa.org/code/
as3corelib
The corelib project is an ActionScript 3 Library that contains a number of classes and utilities for working with ActionScript 3. These include classes for MD5 and SHA 1 hashing, Image encoders, and JSON serialization as well as general String, Number and Date APIs.
http://code.google.com/p/as3corelib/
Download: http://as3corelib.googlecode.com/files/as3corelib-.92.1.zip
Flex SDK coding conventions and best practices
Coding standards for writing open-source Flex framework components in ActionScript 3. Adhering to these standards makes the source code look consistent, well-organized, and professional.
http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions
Flex Language Reference
The Flex 3.3 Language Reference provides syntax and usage information for every element in the ActionScript™ language. It documents all elements in Adobe® Flash® Player and Adobe® AIR™ that are officially supported by Adobe.
http://livedocs.adobe.com/flex/3/langref/
Add comment June 24, 2009


