Session Presented at 1st IndicThreads.com Conference On Mobile Application Development held on 19-20 November 2010 in Pune, India
WEB: http://M10.IndicThreads.com
------------
Speaker: Hemanth Sharma
Abstract:
Write one code, ActionScript, and publish your application to multiple mobile devices, web, and desktops. Learn the aspects of multiscreen coding using Adobe Flex, Flash Builder, Flash Professional and emulate your content in Adobe Device Central. This session will cover ActionScript coding & designing for multi-screen and deployment across multiple devices making use of device specific features such as accelerometer, multitouch gestures, geolocation, etc..
6. 6
Multiscreen User Interface / Layout
FLUID / FLEXIBLE LAYOUT
Common / Re-usable UI Elements
Common Code
Easy Bug Fixes
Easy to manage
Generally 1 Project
Heavy File Size
Non-shareable Project File
FIXED LAYOUT
Less File Size
Less Compromises
Can still manage Common Code
Screen-specific Multiple Projects
Layout-specific UI Elements
Difficult Bug Fixes
15. 15
Hardware Keys
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true);
function onKeyDown(event:KeyboardEvent):void {
//Back Key
if (event.keyCode == 94) {
event.preventDefault(); // to kill event from running default behavior
//do your own back stuff
}
//Menu Key
if (event.keyCode == 95) {
event.preventDefault(); // to kill event from running default behavior
//do your own back stuff
}
}
22. 22
What’s new in Flash Builder (Burrito) & Adobe Flex?
New Flex SDK “Hero”
Multiscreen Flex development
Optimized Mobile Flex components based on Spark
More Spark components
27. 27
Content Optimization & Tips
Bitmaps for Performance Vs Vectors for Less Memory
Keep bitmaps as small as possible
Reduce number of nodes for Vectors
Use opaque background for texts
Experiment with Anti-aliasing options for text
Use only if absolutely necessary (for Mobile Content) –
Filters
Blend Modes
Transparency
Perspective Distortion
28. 28
Content Optimization & Tips
Set Frame Rate as low as possible
Adjust Frame Rate dynamically
Combine Event Handlers functions wherever possible
Use EnterFrame over Timers
Use Event.RESIZE over
StageOrientationEvent.ORIENTATION_CHANGE
Place text/graphics on whole pixels (Pixel Boundaries)
Avoid object creation inside loops
Instantiate one Library Bitmap and re-use the BitmapData
Use Loader.unloadAndStop(); - Sounds, Listeners, Timers, HW, etc.
29. 29
Video Player Optimization Tips
Minimize redraw region during Video playback
Reduce frquency of non-video updates (Playhead, etc.)
Avoid overlapping graphics / transparent overlays
Avoid rotation, skew and perspective projections
Do not CacheAsBitmap
Avoid filters, ScrollRect, .z
Avoid color transforms, alpha
Stop EnterFrame handlers and Timers
Stop all timelines