Android Flash Development
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Android Flash Development

  • 12,616 views
Uploaded on

Android Flash Development presentation given at Silicon Valley Code Camp 2010.

Android Flash Development presentation given at Silicon Valley Code Camp 2010.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
12,616
On Slideshare
9,180
From Embeds
3,436
Number of Embeds
6

Actions

Shares
Downloads
95
Comments
0
Likes
3

Embeds 3,436

http://javafree.uol.com.br 1,624
http://steveonjava.com 1,059
http://flash.steveonjava.com 741
http://translate.googleusercontent.com 10
http://localhost:2715 1
http://www.linkedin.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Android Flash Development
    An Introduction to Flash and AIR Development on Android
    Oswald Campesato
    Twitter: @ocampesato
    http://book2-web.com/
    Stephen Chin
    Twitter: @steveonjava
    http://steveonjava.com/
  • 2. About the Presenters
    Stephen
    Chin
    Oswald
    Campesato
    +
    =
    ?
  • 3. DISCLAIMERBleeding Edge Development
    WE ARE NOT AFFILIATED WITH ADOBE CORPORATION AND DO NOT REPRESENT THEIR OFFICIAL PRODUCT STATEMENTS. THE TECHNOLOGIES REPRESENTED WITHIN ARE NOT FINAL AND MAY BE SUBJECT TO CHANGE. WE ARE NOT RESPONSIBLE FOR OUTBREAKS OF SPONTANEOUS ANDROID FLASH HACKING.
    HACK RESPONSIBLY!
  • 4. Flash and AIR on Android
    • Available on Android Phones Today
    • 5. Works in the Browser
    • 6. Limited Access to Device APIs
    Adobe Flash
    • In Pre-release Today
    • 7. Deploys as an Android Market Application
    • 8. Gives Full Access to Device APIs
    Adobe AIR
    Update: Now Available in the Android Market!
  • 9. Flash Tooling
  • 10. Flash Professional CS5
  • 11. Flash Capability Reporter
    import flash.system.Capabilities;
    import flash.ui.Multitouch;
     
    capabilityScroller.capabilities.text =
    "Manufacturer: " + Capabilities.manufacturer + " " +
    "OS: " + Capabilities.os + " " +
    "Pixel Aspect Ratio: " + Capabilities.pixelAspectRatio + " " +
    "Player Type: " + Capabilities.playerType + " " +
    "Screen Color: " + Capabilities.screenColor + " " +
    "Screen DPI: " + Capabilities.screenDPI + " " +
    "Screen Resolution: " + Capabilities.screenResolutionX + "x" + Capabilities.screenResolutionY + " " +
    "Touch Screen Type: " + Capabilities.touchscreenType + " " +
    "Version: " + Capabilities.version + " " +
    "Supports Gesture Events: " + Multitouch.supportsGestureEvents + " " +
    "Supports Touch Events: " + Multitouch.supportsTouchEvents + " " +
    "Input Mode: " + Multitouch.inputMode + " " +
    "Max Touch Points: " + Multitouch.maxTouchPoints + " " +
    "Supported Gestures: " + Multitouch.supportedGestures;
  • 12. Flash Professional CS5
  • 13. Flash Capability Reporter
  • 14. Android Devices
  • 15. Device Screen Characteristics
  • 16. Screen Resolution vs. Density
  • 17. Flash/AIR Mobile APIs
    Screen Orientation *
    Multitouch *
    Gestures
    Accelerometer
    Camera
    GPS
    * APIs we will show examples of today
  • 18. Screen Orientation
    Stage Event Listener
    stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, <function callback>);
    StageOrientation Values
    DEFAULT
    ROTATED_LEFT
    ROTATED_RIGHT
    UPSIDE_DOWN
    UNKNOWN
  • 19. Screen Orientation Example
    import flash.display.StageOrientation;
    import flash.events.StageOrientationEvent;
    stop();
    stage.addEventListener(
    StageOrientationEvent.ORIENTATION_CHANGE, onChanged);
    function onChanged(event:StageOrientationEvent):void {
    play();
    }
  • 20. Portrait/Landscape Switching
  • 21. Portrait/Landscape Switching
  • 22. Mulititouch
    Gestures
    Two Finger Tap
    Press and Tap
    Pan
    Rotate
    Swipe
    Zoom
    Illustrations provided by Gestureworks (www.gestureworks.com)
  • 23. Android Scrapbook Example
    package com.proandroidflash {
    import flash.events.TransformGestureEvent;
    import flash.ui.Multitouch;
    import flash.ui.MultitouchInputMode;
    import mx.controls.Image;
    public class MultiTouchImage extends Image {
    public function MultiTouchImage() {
    addEventListener(TransformGestureEvent.GESTURE_ROTATE, rotateListener);
    addEventListener(TransformGestureEvent.GESTURE_ZOOM, zoomListener);
    Multitouch.inputMode = MultitouchInputMode.GESTURE;
    }
    public function rotateListener(e:TransformGestureEvent):void {
    rotation += e.rotation;
    }
    public function zoomListener(e:TransformGestureEvent):void {
    scaleX *= e.scaleX;
    scaleY *= e.scaleY;
    }
    }
    }
  • 24. Android Scrapbook Example
    <?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"
    xmlns:mx="library://ns.adobe.com/flex/mx“
    xmlns:proandroidflash="com.proandroidflash.*"
    backgroundColor="#333333">
    <s:layout>
    <s:VerticalLayout horizontalAlign="center" paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"/>
    </s:layout>
    <fx:Declarations>
    <fx:Array id="images">
    <fx:Object>
    [@Embed(source='images/cassandra1.jpg')]
    </fx:Object>
    </fx:Array>
    </fx:Declarations>
    <s:Label text="Android Scrapbook" fontSize="32" color="white"/>
    <s:Label text="Drag, Rotate, and Zoom with your fingers." fontSize="14" color="#aaaaaa"/>
    <s:BorderContainer backgroundColor="#cccccc" borderColor="#555555" rotation="5" width="110%" height="110%">
    <s:filters>
    <s:DropShadowFilter alpha="0.5"/>
    </s:filters>
    <proandroidflash:MultiTouchImage source="@Embed(source='images/cassandra1.jpg')" y="20" x="10" width="350" rotation="-3"/>
    <proandroidflash:MultiTouchImage source="@Embed(source='images/cassandra2.jpg')" y="200" x="40" width="350" rotation="13"/>
    <proandroidflash:MultiTouchImage source="@Embed(source='images/cassandra3.jpg')" y="460" x="5" width="350" rotation="-8"/>
    </s:BorderContainer>
    </s:Application>
  • 25. Android Scrapbook Example
  • 26. AIR APIs not on Mobile (1 of 2)
  • 27. AIR APIs not on Mobile (2 of 2)
  • 28. Flex Mobile - Hero
    Coming 2011
    For more info see: http://opensource.adobe.com/wiki/display/flexsdk/Hero
  • 36. Future Device Support
    Android Tablets
    iPhone/iPad
    Television
  • 37. SDK Links
    Android SDK (2.2 or later)
    http://developer.android.com/sdk/index.html
    AIR Prerelease
    http://labs.adobe.com/technologies/air2/android/
    Flex Mobile (Hero)
    http://opensource.adobe.com/wiki/display/flexsdk/Hero
  • 38. Blogs to Read
    James Ward
    http://www.jamesward.com/
    Christian Cantrell
    http://blogs.adobe.com/cantrell/
    Christophe Coenraets
    http://coenraets.org/blog/
    Serge Jespers
    http://www.webkitchen.be/
    Lee Brimelow (The Flash Blog)
    http://blog.theflashblog.com/
    Mark Doherty (FlashMobileBlog)
    http://www.flashmobileblog.com/
  • 39. Local Meetups
    San Flashcisco
    BAADUG
    SilvaFUG
    SilvaFUG presents Flash On…
    Flash Gaming on Android
    Stephen Chin and James Young
    November 9th (SF) and 11th (SJ)
  • 40. Pro Android Flash
    Stephen Chin, Oswald Campesato, and Dean Iverson
    Will Include:
    • UI Controls
    • 41. Media Support
    • 42. Mobile Flex APIs
    • 43. Android Market Deployment
    • 44. Extensive Examples
    Coming in April 2011