Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rich Internet Applications and Flex - 2

322 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Rich Internet Applications and Flex - 2

  1. 1. Rich Internet Applications and Flex Vijay Kalangi
  2. 2. MVC• Isolate domain logic from UI• Model - Manages data. Model also notifies observers.• View - Renders the model, multiple views!• Controller -accepts input and instructs model and view
  3. 3. Exercise 3 Next ...• How to load images at runtime with the Image control• How to display blocks of text• How to link simple controls to an underlying data structure with data binding• How to build user forms with a minimum of effort using the Form container
  4. 4. Simple controls• Few controls• Label, TextInput and Datagrid etc.,
  5. 5. • Events • Loosely coupled applications, not flow based • System events, user events • Event dispatcher • Event listener
  6. 6. <fx:Script><![CDATA[private function clickHandler(event:MouseEvent):void{trace(event.type);}]]></fx:Script><s:Label id=”myL”/><s:Button id=”myButton”label=”Click Me”click=”clickHandler(event)”/>
  7. 7. • Inspecting the Event Object• system events, example • creationComplete - instantiated and knows its size and position and is dispatched after creationComplete of all its children.
  8. 8. • Event propagation in detail • 3 phases - capture, target, bubble• Example • Stage > SystemManager > EventPropagation > blueBox > redBox > button
  9. 9. • Enable capture • this.addEventListener( MouseEvent.CLICK, onClick, true );

×