Best practices for Flash applications on mobile devices
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Best practices for Flash applications on mobile devices

on

  • 7,148 views

I presented best practices for mobile development with the Flash platform at the FFK10 conference in Germany

I presented best practices for mobile development with the Flash platform at the FFK10 conference in Germany

Statistics

Views

Total Views
7,148
Views on SlideShare
5,588
Embed Views
1,560

Actions

Likes
17
Downloads
361
Comments
1

14 Embeds 1,560

http://www.riagora.com 713
http://blog.i2fly.com 696
http://flashmobile.scottjanousek.com 71
http://www.slideshare.net 58
http://www.techgig.com 5
http://www.proyectomono.cl 5
http://translate.googleusercontent.com 2
http://www.google.com 2
http://www.latrintxera.com 2
http://aqm-educaoeinternet.blogspot.com 2
http://127.0.0.1:51235 1
http://aqm-educaoeinternet.blogspot.pt 1
http://static.slideshare.net 1
http://wildfire.gigya.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

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
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Makes me think that apple can talk BIG about not supporting flash on iphone & Ipad but that in fact the future can still be bright for Flash technology.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Best practices for Flash applications on mobile devices Presentation Transcript

  • 1. Best practices for mobile development with the Flash Platform Mark Doherty | Flash Platform Evangelist ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 2. Before starting... 3 questions ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 2
  • 3. Why Mark looks so French today? ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 3
  • 4. Ok then... who are you ? Michaël Chaize Flash Platform Evangelist My blog: www.RIAgora.com @mchaize ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 4
  • 5. Best-practices for mobile development ? “Hopefully everyone understands that Michael Chaize commenting on mobile development is equivalent to Tiger Woods commenting on PaperVision 3D” Lee Brimelow ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 5
  • 6. Menu du jour Flash and screens Design considerations Flash best practices Flex on mobile ? AIR on mobile devices Resources ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 6
  • 7. Flash and screens ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 7
  • 8. Applications are beginning adapt to context > > RIA Cloud Devices ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. Adobe Systems Inc.| FOTB2009
  • 9. Digital Explosion Across Multiple Screens Consumer Electronics Mobile Phones Personal Computers ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 9
  • 10. Flash Platform - A complete system for web innovation ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 11. Flash Player 10.1  e only consistent browser-based runtime for connected devices  Targeting desktops, mobile phones, netbooks, tablets, and the Digital Home  On track for delivery to consumers in rst half of 2010  Runtimes will be available over-the-air through marketplaces and Adobe.com © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 12. Flash Player 10.1  Brings full Flash Player feature set to devices  New Features:  Multi-touch & gestures  Accelerometer  Screen orientation  Mobile text input  Device capabilities discovery  Globalization support (GSLib)  Mobile se ings manager  Global error handling © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 13. Flash Player 10.1 API and testing ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 13
  • 14. Design considerations ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 14
  • 15. Context ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 15
  • 16. Screens 800px 480px 480px 320px ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 16
  • 17. Finger 7mm 44px ≠ ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 17
  • 18. Usually, a nger comes with a hand ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 18 Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe con dential.
  • 19. Native keyboard ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 19
  • 20. Flash best practices ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 21. Graphical optimizations 10% 90% rendering pure algorithm ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 22. Understand its behavior Avoid high-rate timers Keep FPS as low as possible Set dynamic FPS FPS and enterFrame events ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 23. Memory optimizations and the getSize() method Display Objects Primitive types trace(getSize(new Shape())); var a:Number; // output: 236 trace(getSize(a)); // output: 8 trace(getSize(new Sprite())); var b:int; // output: 412 trace(getSize(b)); // output: 4 trace(getSize(new MovieClip())); var name:String; // output: 440 trace(getSize(name)); // output: 4 name = ""; trace(getSize(name)); // output: 24 ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 24. Reusing objects ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 25. Freeing memory var mySprite:Sprite = new Sprite(); mySprite = null; Remember that when an object is set to null, it is not necessarily removed from memory. Sometimes the garbage collector does not run, if available memory is not considered low enough. Garbage collection is not predictable. Object pooling ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 26. Freeing MovieClips Text Rectangle ? Alpha ? RemoveChild ? Visible ? runningBoy.addEventListener(Event.ADDED_TO_STAGE,activate); runningBoy.addEventListener(Event.REMOVED_FROM_STAGE,deactivate); function activate(e:Event):void { e.currentTarget.addEventListener(Event.ENTER_FRAME,handleMovement); } function deactivate(e:Event):void { e.currentTarget.removeEventListener(Event.ENTER_FRAME,handleMovement); e.currentTarget.stop(); } ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 27. Bitmaps Consider bitmaps vs. vectors. Avoid filters and blend modes. Transparency is very expensive. Keep bitmaps as small as possible. cacheAsBitmap is not that easy ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 28. Text Feel the transparency > opaqueBackground Avoid TLF Test different anti-aliasing technics (lisibility, animation...) Test your animations with different qualities of Stage ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 29. Video H264 ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 30. Flex on mobile ? ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 31. Slider : Flex Mobile Framework  Flex applications run on Flash Player 10.1, but...  Challenges: Performance of the SDK, Different screen sizes and densities.  Based on the Flex 4 codebase, Slider will include signi cant changes to optimize both the performance and user experience on more constrained device environments.  Slider will include new capabilities speci cally designed for mobile development, such as a new construct for managing application “screens”. Resolution-independent layout.  A new set of user interface components will be added which are designed for mobile form factors and input methods. © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 31
  • 32. AIR on mobile devices ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 33. Adobe AIR for smartphones (and tablets)  Adobe AIR allows developers to build standalone applications using Flash technology  Public support from RIM and Motorola  First mobile operating system to be supported is Android  Provides Flash developers access to app stores  AIR applications can be repackaged for the iPhone © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 33
  • 34. AIR Packaging & Distribution Work ow .air .exe .air (swf, jpg, mp3) .dmg .ipa .apk © 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 35. Resources ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 36. Resources ■ Slides and samples on my blog: h p://www.RIAgora.com ■ Adobe TV ■ Optimization guides: ■ Flash Player optimization for mobile devices ■ Optimization for the iPhone ■ AIR best practices for mobile devices ■ Ads optimization ■ Technical articles: ■ h p://www.adobe.com/devnet/ ashplayer/articles/ fplayer10.1_hardware_acceleration.html ■ h p://www. ashmobileblog.com/ ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 36
  • 37. Fight ! ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 38. ? Questions ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 39. Remember... slide ve... “Hopefully everyone understands that Michael Chaize commenting on mobile development is equivalent to Tiger Woods commenting on PaperVision 3D” Lee Brimelow ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 39