© 2011 Adobe Systems Incorporated.
Getting Started with Flash Mobile DevelopmentMihai Corlan | WW Developer Evangelist | http://corlan.org
© 2011 Adobe Systems Incorporated.
About Me
Adobe World Wide Developer Evangelist (since 2008)
Flash Builder Engineer 2006-2008
Web Developer 98’ - 2006
Blog: http://corlan.org
Twitter: http://twitter.com/mcorlan
Email: [email protected]
2
© 2011 Adobe Systems Incorporated.
Live Coding – a simple Twitter Client
© 2011 Adobe Systems Incorporated.
Flex Support for Screen Metaphor
Application First Screen Second Screen
© 2011 Adobe Systems Incorporated.
Flex Mobile Components - ViewNavigator
Using Flex’s s:MobileApplication or s:TabbedMobileApplication you get screen management for free
navigator.push(NewScreen, data) - add new screen
navigator.popView() - go to previous screen
navigator. popToFirstView() - go to first view
navigator.activeView - retrieve active view
© 2011 Adobe Systems Incorporated.
Action Bar
Navigation / Title / Action
Hide the bar actionBarVisible = false
Overlay the bar overlayControls = false
<s:navigationContent>
<s:Button label="Home"/>
</s:navigationContent>
<s:titleContent>
<s:TextInput prompt="search" width="100%"/>
</s:titleContent>
<s:actionContent>
<s:Button label="Go"/>
</s:actionContent>
© 2011 Adobe Systems Incorporated.
View Lifecycle
View AnotherView
Created CreatedDestroyed
DestroyedCreated
Data
?
Destroyed
data = yourData;destructionPolicy =”none"
© 2011 Adobe Systems Incorporated.
Integration with Phone/SMS/Mail/Web Browser Apps
<s:Button label="Phone" click="navigateToURL(new URLRequest('tel:08383838'))"/>
<s:Button label="SMS" click="navigateToURL(new URLRequest('sms:08383838'))"/>
<s:Button label="Email" click="navigateToURL(new URLRequest('mailto:[email protected]'))"/>
<s:Button label="Web" click="navigateToURL(new URLRequest('http://corlan.org'))"/>
© 2011 Adobe Systems Incorporated.
Camera Access
Access to Camera Roll
Access to Camera Native app (for video and photo)
cameraUI = new CameraUI();
cameraUI.addEventListener(MediaEvent.COMPLETE, onCameraUIComplete);
cameraUI.launch(MediaType.IMAGE);//photo
//cameraUI.launch(MediaType.VIDEO);//video
private function onCameraUIComplete(e:MediaEvent):void {
var mediaPromise:MediaPromise = e.data;
// do something with the image:
mediaPromise.file.url;
}
© 2011 Adobe Systems Incorporated.
Microphone Access
if (Microphone.isSupported) {
mic = Microphone.getMicrophone();
soundBytes = new ByteArray();
mic.addEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler);
}
private function micSampleDataHandler(event:SampleDataEvent):void {
while (event.data.bytesAvailable) {
var sample:Number = event.data.readFloat();
soundBytes.writeFloat(sample);
}
}
© 2011 Adobe Systems Incorporated.
Storing Data
AIR has support for SQLite. You can create new databases/tables, read/write records
You can write files to device storage
© 2011 Adobe Systems Incorporated.
Thank You!
Download tutorial and projects for mobile development:
http://corlan.org/downloads/dt/mobile.zip
I will upload the slides to my blog today.
http://corlan.org
http://twitter.com/mcorlan
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
© 2011 Adobe Systems Incorporated.
Adobe, the Adobe logo, Adobe AIR, the Adobe AIR logo, the Adobe PDF logo, AIR, ColdFusion, ColdFusion Builder, Flash, Flash Builder, the Flash logo, Flex, LiveCycle, and Reader are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. All other trademarks are the property of their respective owners.© 2010 Adobe Systems Incorporated. All rights reserved. Printed in the USA. 9102xxxx 3/10
Adobe, the Adobe logo, Adobe AIR, the Adobe AIR logo, ActionScript, AIR, Flash, Flash Builder, Flash Catalyst, the Flash logo, Flex, and LiveCycle are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.Printed in the USA. 91023957 3/10
© 2011 Adobe Systems Incorporated.
The Flash Platform
Adobe® Flash® Player
Adobe® Flex ® Adobe® Flash® Media Server
Family
Tools to Design and Develop Clients ServersFramework
Adobe® AIR®
Adobe® Flash® CS5 Professional
Adobe® Flash®
Catalyst™
Adobe® Flash® Builder™
Adobe® LiveCycle®
Data Services
Applications, Content and Video
Services
Adobe® Flash®
Platform Services
Integrating withthe Flash Platform
Creative Suite 5
ColdFusion Builder
“Panini”
“Hero” 2.6
10.2
“Burrito”
Adobe® LiveCycle®
Collaboration Service