Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to Flex

Intro to Flex

Flex is an open source framework built on top of ActionScript 3 allowing the creation of powerful Rich Internet Applications. This introductory talk will feature many code examples using MXML and ActionScript 3. An overview of the possibilities of the framework will enable you to make an informed decision when picking technologies for your next application.

Anna Filina

October 19, 2011
Tweet

More Decks by Anna Filina

Other Decks in Programming

Transcript

  1. FooLab Anna Filina • PHP Quebec - user group, organizer

    • ConFoo - non for profit Web conference, organizer • FooLab Inc. - IT solutions for businesses, vice- president • I write code 2
  2. FooLab Outline • What is Flex? • Basic principles and

    syntax • Skins, states and transitions • Mobile 3
  3. FooLab What is Flex? • Open source framework • ActionScript

    3 and MXML • Browser, desktop or mobile • Flash Builder or free compiler 4
  4. FooLab Data Binding Example 9 <root> <item title="Ratatouille"></item> <item title="Wall

    E"></item> </root> --------------------------------------------------------------- <s:HTTPService url="http://api.com/movies" id="api" /> <s:List source="{api.lastResult.root.item}" labelField="title" /> api.send();
  5. FooLab 15 JavaScript var foo = "lab"; foo.Lab = function()

    { ... }; this.getBar = function() {}; object.getBar(); ActionScript var foo:String = "lab"; package foo { class Lab {} } function get bar():int {}; object.bar;
  6. FooLab Spark • Component architecture • States (over, disabled, etc.)

    • State can affect behavior and appearance • Skins can be created in Adobe apps • Flash XML Graphics (FXG) 18
  7. FooLab MXML Graphic as Skin 21 <s:Button skinClass="skins.MySkin" label="Click Me"

    /> --------------------------------------------------------------- <s:Rect width="70" height="25" width.over="90">...</s:Rect> <s:Label id="lbl" />
  8. FooLab 28 Navigator Containers <s:TabBar dataProvider="{stack}" /> <mx:ViewStack id="stack"> <s:NavigatorContent

    label="Movie">...</s:NavigatorContent> <s:NavigatorContent label="Cast">...</s:NavigatorContent> </mx:ViewStack>
  9. FooLab 30 Mobile Applications <s:ViewNavigatorApplication firstView="views.HomeView" /> --------------------------------------------------------------- <s:View title="ZendCon

    Speakers"> <s:Button label="Next" click="navigator.pushView(SpeakerView, speaker)" /> </s:View> --------------------------------------------------------------- <s:View title="Speaker"> <s:Label text="{data.name}" /> </s:View>
  10. FooLab Mobile Applications • Tabbed or View-Based • BlackBerry Tablet,

    iOS, Android • Respond to gestures (swipe, rotate, zoom, etc.) 31
  11. FooLab 32 @afilina • Please leave feedback: http://joind.in/3758 (slides will

    be posted here) • Documentation: http://www.adobe.com/devnet/flex/documentation.html • Video Tutorials: http://www.adobe.com/devnet/flex/videotraining.html • Slides and code: http://foolab.ca/conf/zendcon-2011-flexintro.zip