• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Discover The Unknown Flex 4.5 (MAX 2011)
 

Discover The Unknown Flex 4.5 (MAX 2011)

on

  • 20,097 views

Slides from "Discover The Unknown Flex 4.5" session presented at MAX 2011 by Piotr Walczyszyn.

Slides from "Discover The Unknown Flex 4.5" session presented at MAX 2011 by Piotr Walczyszyn.

Statistics

Views

Total Views
20,097
Views on SlideShare
3,715
Embed Views
16,382

Actions

Likes
12
Downloads
0
Comments
3

31 Embeds 16,382

http://www.riaspace.com 10781
http://www.riaspace.net 3572
http://riaspace.net 1028
http://d.hatena.ne.jp 636
http://updater.riaspace.com 120
http://ns.riaspace.com 93
http://abtasty.com 41
http://feeds.feedburner.com 30
http://konkurs.riaspace.net 22
http://localhost 8
http://webcache.googleusercontent.com 8
http://iml.isobarkorea.co.kr 6
http://translate.googleusercontent.com 4
http://flerry.riaspace.com 4
http://www.365dailyjournal.com 3
http://www.hraps.pl 3
http://paper.li 3
http://cache.yahoofs.jp 2
http://www.video.riaspace.com 2
http://nowlab.isobarkorea.co.kr 2
http://prlog.ru 2
http://127.0.0.1 2
http://www.travel.riaspace.com 2
http://feeds2.feedburner.com 1
http://www.lcds.riaspace.com 1
http://a0.twimg.com 1
http://www.riaspace.net. 1
http://video.riaspace.com 1
http://alexamg.castellan.de 1
http://riaspace.com. 1
http://riaspace.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Please, enable download. I'd like to have an offline version.
    Are you sure you want to
    Your message goes here
    Processing…
  • the unknown flex4.5
    Are you sure you want to
    Your message goes here
    Processing…
  • i like,hehe
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • Other types can be thrown also\n
  • An arguments object is used to store and access a function's arguments. Within a function's body, you can access its arguments object by using the local arguments variable.\n
  • Assigns expression1 the value of expression1 || expression2.\n\nhttp://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html\n
  • You can also do this: Class(getDefinitionByName(getQualifiedClassName(obj)))\n
  • Inspired by Christian Cantrells post: http://blogs.adobe.com/cantrell/archives/2009/12/labels_in_actionscript_3.html\n
  • \n
  • \n
  • \n
  • \n
  • Inspired by Mihai Corlan: http://corlan.org/flex-for-php-developers/#c7\n
  • Inspired by Mihai Corlan: http://corlan.org/flex-for-php-developers/#c7\n
  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Proxy.html\n
  • \n
  • http://help.adobe.com/pl_PL/FlashPlatform/reference/actionscript/3/mx/utils/ObjectProxy.html\n\nDynamic ObjectProxy (by Andrea Bresolin) - http://www.devahead.com/blog/2009/12/dynamic-objectproxy/\n\nExtending model objects with ObjectProxy class: http://www.riaspace.com/2010/11/extending-model-objects-with-objectproxy-class/\n
  • http://help.adobe.com/pl_PL/FlashPlatform/reference/actionscript/3/mx/utils/ObjectProxy.html\n\nDynamic ObjectProxy (by Andrea Bresolin) - http://www.devahead.com/blog/2009/12/dynamic-objectproxy/\n\nExtending model objects with ObjectProxy class: http://www.riaspace.com/2010/11/extending-model-objects-with-objectproxy-class/\n
  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mxml/definition.html\nhttp://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mxml/library.html\n
  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mxml/private.html\n
  • \n
  • \n
  • http://www.rictus.com/muchado/wp-content/uploads/2011/04/multiscreen-dev-with-flex-360flex-2011.pptx.pdf\n
  • \n
  • \n
  • \n
  • \n
  • http://blogs.adobe.com/flexdoc/files/flexdoc/conditionalcompilation.pdf\n
  • \n
  • \n
  • http://www.adobe.com/devnet/flash-builder/articles/tips-tricks.html\n\nCode proposal cycling - Press Ctrl+Space multiple times to filter the list of suggestions that Content Assist provides, and show only properties, events, effects, and so on.\n
  • http://www.adobe.com/devnet/flash-builder/articles/tips-tricks.html\n\nCode proposal cycling - Press Ctrl+Space multiple times to filter the list of suggestions that Content Assist provides, and show only properties, events, effects, and so on.\n
  • http://www.adobe.com/devnet/flash-builder/articles/tips-tricks.html\n\nCode proposal cycling - Press Ctrl+Space multiple times to filter the list of suggestions that Content Assist provides, and show only properties, events, effects, and so on.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Discover The Unknown Flex 4.5 (MAX 2011) Discover The Unknown Flex 4.5 (MAX 2011) Presentation Transcript

  • Discover the Unknown Flex 4.5 Piotr Walczyszyn | Adobe Enterprise Evangelist Blog: riaspace.com Twitter: @pwalczyszyn©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • ls -al AS3 secrets Flex secrets Flash Builder secrets 2©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • ** ******** **** **** **////// */// * **//** /** / /* ** //** /********* *** **********////////** /// * /**//////** /** * /* /** /** ******** / **** // // //////// //// 3©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: Short conditional statements var someVar:Number; if (someVar)      doSomething(); 4©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: Short constructors var point:Point = new Point; 5©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: Throwing objects try { throw 1; }  catch (n:Number) { trace(n); // outputs 1 } 6©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: arguments class dispatcher.addEventListener( SomeEvent.TYPE, function(event:SomeEvent):void { EventDispatcher(event.target). removeEventListener( event.type, arguments.callee ); }); 7©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: ||= logical or assignment (by Sönke Rohde) var num:Number; num ||= 10; trace(num); // outputs 10 num = 5; trace(num); // outputs 5 num ||= 10; trace(num); // outputs 5 8©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: Getting object class type var clazz:Class = Object(obj).constructor; 9©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: Labels & continue (by Christian Cantrell) outerLoop: for (var i:uint = 0; i < outerArray.length; ++i) { var foo:String = outerArray[i]; innerLoop: for (var j:uint = 0; j < innerArray.length; ++j) { var bar:String = innerArray[j]; if (foo == bar) { continue outerLoop; } } trace(foo); } 10©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: Label & break (by Christian Cantrell) dateCheck: { trace("Good morning."); var today:Date = new Date(); if (today.month == 11 && today.date == 24) // Christmas! { break dateCheck; } trace("Time for work!"); } 11©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: with statement function polar(r:Number):void { var a:Number, x:Number, y:Number; with (Math) { a = PI * pow(r, 2); x = r * cos(PI); y = r * sin(PI / 2); } trace("area = " + a); trace("x = " + x); trace("y = " + y); } polar(3); 12©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: global functions // globalFunction.as file package { public function globalFunction(text:String):void { trace(text); } } 13©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: internal functions protected function someFunction():void { var internalFunction:Function = function(text:String):void { trace(text); }; internalFunction("Hello World!"); } 14©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: custom namespaces (by Mihai Corlan) // online.as file package org.corlan { public namespace online = "http://corlan.org/apps/online"; } // offline.as file package org.corlan { public namespace offline = "http://corlan.org/apps/offline"; } 15©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: custom namespaces (by Mihai Corlan) online function save(object:Object):void { //save the object back to server trace("online"); } offline function save(object:Object):void { //save the object locally trace("offline"); } ... online::save(obj); offline::save(obj); 16©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • AS3: Proxy class dynamic class MyProxy extends Proxy { flash_proxy override function callProperty(name:*, ...rest):* { // function call proxy } flash_proxy override function getProperty(name:*):* { // getter call proxy } flash_proxy override function setProperty(name:*, value:*):void { // setter call proxy } } 17©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • ******** /**///// /** ** ** /******* //** ** /**//// //*** /** **/** /** ** //** // // // 18©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: ObjectProxy class warning: unable to bind to property propName on class Object (class is not an IEventDispatcher) 19©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: ObjectProxy class warning: unable to bind to property propName on class Object (class is not an IEventDispatcher) 19©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: ObjectProxy class warning: unable to bind to property propName on class Object (class is not an IEventDispatcher) var obj:Object = {propName : “prop value”}; var objProxy:ObjectProxy = new ObjectProxy(obj); ... <s:Label text=”{objProxy.propName}” /> 19©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: <fx:Library> & <fx:Definition> <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Library> <fx:Definition name="MySquare"> <s:Group> <s:Rect width="100%" height="100%"> <s:stroke> <s:SolidColorStroke color="red"/> </s:stroke> </s:Rect> </s:Group> </fx:Definition> </fx:Library> <fx:MySquare x="0" y="0" height="20" width="20"/> </s:Application> 20©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: <fx:Private> <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Declarations> </fx:Declarations> <!-- has to be last tag in MXML doc --> <fx:Private> <!-- content must be in XML format --> <Date>10/22/2008</Date> <Author>Nick Danger</Author> </fx:Private> </s:Application> 21©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: <fx:Reparent> <s:states> <s:State name="portrait" /> <s:State name="landscape" /> </s:states> <s:VGroup includeIn="portrait" width="100%" height="100%"> <s:Rect id="redRect" includeIn="portrait" width="100%" height="100%"> <s:fill> <s:SolidColor color="#FF0000" /> </s:fill> </s:Rect> <s:Rect id="blackRect" includeIn="portrait" width="100%" height="100%"> <s:fill> <s:SolidColor color="#000000" /> </s:fill> </s:Rect> </s:VGroup> <s:HGroup includeIn="landscape" width="100%" height="100%"> <fx:Reparent target="redRect" includeIn="landscape" /> <fx:Reparent target="blackRect" includeIn="landscape" /> </s:HGroup> 22©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: states (by Steve Hartley) <s:states> <s:State name="portrait" /> <s:State name="landscape" /> </s:states> <s:Group width="100%" height="100%"> <s:layout.portrait> <s:VerticalLayout /> </s:layout.portrait> <s:layout.landscape> <s:HorizontalLayout /> </s:layout.landscape> <fx:RedRectangle width="100%" height="100%" /> <fx:BlackRectangle width="100%" height="100%" /> </s:Group> 23©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: state groups (by Narciso (nj) Jaramillo) <s:states> <s:State name="portraitPhone" stateGroups="portrait,phone" /> <s:State name="landscapePhone" stateGroups="landscape,phone" /> <s:State name="portraitTablet" stateGroups="portrait,tablet" /> <s:State name="landscapeTablet" stateGroups="landscape,tablet" /> </s:states> <s:ViewNavigator id="mainNavigator" left="0" left.landscapeTablet="{LIST_WIDTH}" top="0" top.portraitTablet="{ACTIONBAR_HEIGHT + LIST_HEIGHT}" right="0" bottom="0" firstView="views.SummaryView" firstView.tablet="views.DetailView” /> 24©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: IMXMLObject package { import mx.core.IMXMLObject; public class MyMXMLObject implements IMXMLObject { public function initialized(document:Object, id:String):void { trace("Added to:", document, "with id:", id); } } } ... <fx:Declarations> <local:MyMXMLObject id="myMXMLObject" /> </fx:Declarations> 25©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: FlexGlobals.topApplication <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Declarations> <fx:String id="myString">Hello World?!</fx:String> </fx:Declarations> </s:Application> 26©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: FlexGlobals.topApplication <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="FlexGlobals" xmlns:local="*" creationComplete="view_creationCompleteHandler(event)"> <fx:Script> <![CDATA[ import mx.core.FlexGlobals; import mx.events.FlexEvent; protected function view_creationCompleteHandler(event:FlexEvent):void { lbl.text = FlexGlobals.topLevelApplication.myString; } ]]> </fx:Script> <s:Label id="lbl" verticalCenter="0" horizontalCenter="0" /> </s:View> 27©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: conditional compilation CONFIG::android protected function view_creationCompleteHandler(event:FlexEvent):void { lbl.text = "Android: " + FlexGlobals.topLevelApplication.myString; } CONFIG::ios protected function view_creationCompleteHandler(event:FlexEvent):void { lbl.text = "iOS: " + FlexGlobals.topLevelApplication.myString; } 28©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • Fx: conditional compilation 29©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: keeping generated ActionScript 30©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • ******** ****** /**///// /*////** /** /* /** /******* /****** /**//// /*//// ** /** /* /** /** /******* // /////// 31©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Press Ctrl+Space to invoke Content Assist. 32©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Metadata code completion 33©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Code completion when using states 34©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Camel-case code hinting 35©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Quick Assist - Press Cmd/Ctrl+1 * Rename in file * Rename in workspace * Generate getter/setter * Convert local variable to field * Assign to variable * Split variable declaration * Organize imports 36©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Quick Outline - Press Cmd/Ctrl+O 37©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Code templates 38©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Organize imports Place your cursor on an import statement, press Cmd/Ctrl+1, and select Organize Imports. To sort the import statements alphabetically by package name, press Cmd/Ctrl+Shift+O. 39©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: Call Hierarchy (Cmd/Ctrl+Alt+H) 40©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • FB: other shortcuts Cmd/Ctrl+I - Fixing indentation Cmd/Ctrl+Shift+C - Code commenting Cmd/Ctrl+Shift+D - Adding CDATA blocks (<![CDATA[ ]]>) Cmd/Ctrl+Shift+F - Format MXML documents - Block selection and edit mode Cmd/Ctrl+Shift+L - Complete list of shortcuts 41©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • ©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.