Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flex and ActionScript. What is Flex? Adobe Flex is a rich Internet application framework built on top of the Flash platform Applications are built using.

Similar presentations


Presentation on theme: "Flex and ActionScript. What is Flex? Adobe Flex is a rich Internet application framework built on top of the Flash platform Applications are built using."— Presentation transcript:

1 Flex and ActionScript

2 What is Flex? Adobe Flex is a rich Internet application framework built on top of the Flash platform Applications are built using MXML and ActionScript Applications are compiled into SWF (Flash) files Whether written in MXML or ActionScript, all Flex components are classes. At compile time, MXML is precompiled to ActionScript classes, which are then compiled into the swf file format.

3 ActionScript Object-Oriented Programming Language Encapsulation Abstraction Inheritance Polymorphism Reusability Similar to JavaScript

4 Properties Each class has pre-defined set of properties Example: Camera properties include bandwidth, height, width mycam=new Camera();//creates new object mycam.height=20;//setting value of property You can define and change the properties of each object (instance) of a Class through ActionScript

5 Methods An action that is performed by an object Example: Camera class has getCamera method Calling a method mycam=new camera();//create an object mycam.getCamera(); //calling method

6 Events Events are actions that occur in response to user’s interaction The technique for specifying certain actions that should be performed in response to particular events is known as event handling Example function eventResponse(event:MouseEvent):void { // Actions performed in response to the event go here } myButton.addEventListener(MouseEvent.CLICK, eventResponse);

7 Functions Defining a function function functionName(){ Statement1; Statement2; } Invoking a function functionName();

8 Flash Media Server and ActionScript Client-side ActionScript compiled to swf Web Server plays swf Server-side ActionScript code is invoked Sever loads application

9 Client-side and server-side objects

10 Connection Flow

11 Calling client-side function from server-side code

12 Calling server-side function from client-side code

13 Client-side calls on the left invoke server-side calls on the right

14 Server-side calls on the left invoke client-side calls on the right


Download ppt "Flex and ActionScript. What is Flex? Adobe Flex is a rich Internet application framework built on top of the Flash platform Applications are built using."

Similar presentations


Ads by Google