Adobe took an important step in merging desktop and Internet applications upon announcing the availability of AIR 1.0, a run-time module that provides a way of running "rich Internet applications" (RIAs) on the desktop. Since the release of the beta version of AIR, several organizations already adopted the technology; among them, NASDAQ Stock Market Inc, AOL, EBay and many others. I agree with most developers, that AIR will reduce download time due to the fact that the desktop is constantly being updated while connected to the Internet. …
ActionScript is a scripting language (Developed by Macromedia,now owned by Adobe ) based on ECMAScript (Also referred as JavaScript or Jscript), used primarily for the development of websites and software using the Adobe Flash Player platform. The latest ActionScript 3.0 introduced last June (2006) with Adobe Flex 2.0 and Flash player 9.0. This ActionScript is completely different than any of its predecessor since it uses an entirely different virtual machine. ActionScript 3.0 provides significant enhancement in performance, as well as more robust programming model that lends itself to complex Rich Internet Application development. You can say that’s the reason Flex is so kick ass RIA builder. How ActionScript work? The way ActionScript work is very simple like any other scripting you have known. Generally ActionScript is executed by the ActionScript Virtual Machine (AVM), which is part of Flash Player. ActionScript code is typically compiled into bytecode format by a compiler, such Flex Builder, or that is available in the Flex SDK and the Flex Data Services. The bytecode is embedded in SWF files, which are executed by the Flash Player, the run-time environment. Pretty simple and straight forward isn’t it? Why ActionScript 3.0? As you already know since Flex 2, all flex version use ActionScript 3.0, but what are the advantages of this? This goes beyond the scripting capabilities of previous versions of ActionScript. It is designed to facilitate the creation of highly complex applications (RIAs) with large data sets and object-oriented, reusable code bases. While ActionScript 3.0 is not required for content that runs in Adobe Flash Player 9, it assists to performance improvements that are only available with the AVM2, the new virtual machine. ActionScript 3.0 code can execute up to ten times faster than legacy ActionScript code. You must know Flash Player 9 still do support the older version of ActionScript Virtual Machine, AVM1 for backward compatibility with existing and legacy content. Apart from the above mentioned advantages ActionScript also poses features like- ECMAScript for XML, native support for regular expressions, a method closure for better event handling, sealed classes for improved memory usage and run-time exception for handle errors robustly. Usage There are two methods for using ActionScript in a Flex application- <mx:Script> tag, which lets you insert ActionScript code as if it was typed directly within the <mx:Script> tag.If you want smarter way to organize your code than the best method is always storing your code in an ActionScript file. An ActionScript source file is just a text files with the .as extension, just like CSS file. You can call this in MXML using these methods- Using <mx:Script> tag which lets you specify a source attribute that identifies an external ActionScript file to be loaded at a specific point in the application. For example- <mx:Script source=”example.as” /> In this method you have to use the import statement to specify the full name of the class (Case sensitive), so the ActionScript compiler knows where to find it. For example, if you want to use the FlexExam class in ActionScript, you first need to import that class using its full name, including package and class: import flash.tutor.FlexExam; Through code which specifically refers to the class name. It works very simple, by referring to another class name in ActionScript code; you tell the compiler to load the definition of that class. For example, given an external class called Exx, this statement causes a new instance of the Exx class to be created: var sqr:Exx = new Exx(40,20);
This is the second session in the flex tutorial series. In “Flex 101: Knowing Flex” we just get to know Flex a bit closely. In this session we will focus on MXML basics, which is the key to any Flex application development.
As you already know, MXML is a kind of XML markup language, which only used in Flex especially for layout user interface components.
MXML vs. HTML
Though for a new bi it may be hard to grasp, but honestly MXML isn’t so different than HTML. Just like HTML, MXML provides tags that define user interfaces. But MXML provides a much richer tag set, such as-data grids, data binding, trees, tab navigators, accordions, menus, animation effects etc. Not only that you will be even able to extend MXML with custom components (MXML + ActionScript) that you reference as MXML tags. The biggest difference between HTML and MXML is the outcome, the MXML defined applications are compiled into SWF (Flash file) files and rendered by Flash Player which you got to admit much more rich and dynamic than HTML.
MXML coding
You are a developer or not, you should know by now, every markup language follow their own coding standard, MXML isn’t different at all. Since it is a variant of XML markup language, you will find a lot of similarities. So let’s start with a simple MXML file and explaining the parts of it.
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”>
<mx:Label text=”Hello World!” fontWeight=”bold” fontSize=”24″ />
</mx:Application>
This is an example of simple MXML file, to display “Hello World”Â. Note that the first line of the MXML file specifies an optional declaration of the XML version.
<?xml version=”1.0″ encoding=”utf-8″?>
There are plenty of Flex tutorials out there, still why another one? Simple in my opinion most of the Flex tutorial I came across with goes too deep/complex without creating a base of understanding. Flex isn’t HTML that you can just learn it through so called -Dumb guide to Flex. To be able to use full potential of Flex you should be known to one or more of these- PHP, ASP,JSP, CSS, XML etc. No need to be master of those but at least familiar with them makes Flex application …
I have been always a profound believer of open sourcing software for expanding the boundaries of progressive development. The examples of open source success is all around us, Java, MySQL, Linux, Firefox, Thunderbird, WordPress, Drupal is just a name a few. Looks like Adobe got the idea of open source advantage. Adobe just today unveiled a new version of its Flex SDK development tool set, code-named Moxie, along with plans to provide its code to the open-source community.
Flex is a tool to build rich Internet applications — Web applications that include the rich features of desktop applications but the ease …







