professional flash lite mobile development

568 492 0
professional flash lite mobile development

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Jermaine G. Anderson Professional Build Flash Applications for Mobile Devices Flash ® Lite ® Mobile Development Wrox Programmer to Programmer™ Join the discussion @ p2p.wrox.com www.it-ebooks.info Get more out of wrox.com Programmer to Programmer ™ Interact Take an active role online by participating in our P2P forums @ p2p.wrox.com Wrox Online Library Hundreds of our books are available online through Books24x7.com Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble! Join the Community Sign up for our free monthly newsletter at newsletter.wrox.com Browse Ready for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C++, and much more! Contact Us. We always like to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing wrox-partnerwithus@wrox.com www.it-ebooks.info PROFESSIONAL FLASH® LITE® MOBILE DEVELOPMENT INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xvii CHAPTER 1 Flash Is Mobile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 CHAPTER 2 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 CHAPTER 3 Object-Oriented Programming for Flash Lite Development . . . . . . . . . 33 CHAPTER 4 UI Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 CHAPTER 5 PureMVC ActionScript 2.0 Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 107 CHAPTER 6 Creating a TV Listings Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 CHAPTER 7 Creating a Media Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 CHAPTER 8 Creating an Image Viewer Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 CHAPTER 9 Creating a Twitter Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 CHAPTER 10 Using Nokia’s S60 Platform Services API . . . . . . . . . . . . . . . . . . . . . . . . 337 CHAPTER 11 Creating a Weather Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385 CHAPTER 12 Using Sony Ericsson’s Project Capuchin Platform Services API . . . . . 439 CHAPTER 13 Packaging Flash Lite Applications for Distribution . . . . . . . . . . . . . . . . 485 APPENDIX Flash Lite 3.x ActionScript 2.0 Quick Reference: From Array to XMLSocket . . . . . . . . . . . . . . . . . . . . . . . . . . .509 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 www.it-ebooks.info PROFESSIONAL Flash ® Lite ® Mobile Development Jermaine G. Anderson www.it-ebooks.info Professional Flash® Lite® Mobile Development Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-54748-9 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Control Number: 2009939787 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other countries, and may not be used without written permission. Flash Lite is a registered trademark of Adobe Systems Incorporated. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book. www.it-ebooks.info ACQUISITIONS EDITOR Scott Meyers PROJECT EDITOR Kenyon Brown TECHNICAL EDITOR Darren Osadchuk PRODUCTION EDITOR Kathleen Wisor COPY EDITORS Eric Newman Foxxe Editorial Services EDITORIAL DIRECTOR Robyn B. Siesky EDITORIAL MANAGER Mary Beth Wakefi eld MARKETING MANAGER David Mayhew PRODUCTION MANAGER Tim Tate VICE PRESIDENT AND EXECUTIVE GROUP PUBLISHER Richard Swadley VICE PRESIDENT AND EXECUTIVE PUBLISHER Barry Pruett ASSOCIATE PUBLISHER Jim Minatel PROJECT COORDINATOR, COVER Lynsey Stanford PROOFREADER Nate Pritts, Word One INDEXER Robert Swanson COVER DESIGNER Mike Trent COVER IMAGE iStockPhoto CREDITS www.it-ebooks.info ABOUT THE AUTHOR JERMAINE G. ANDERSON has been programming for the past 10 years, specializing in Flash and, more recently, the Flex framework. His work predominantly centers on video streaming, and producing on-demand and live video content for the sports and entertainment industries where he has created web components and rich consumer products using Adobe Flash, Flex, and AIR. In 2004, he became interested in Flash mobile applications; this was intensifi ed after winning the “Best Productivity” category for his mobile TV guide concept in the fi rst ever Macromedia Flash Lite 1.1 contest in 2005. He has since spent time working for UK mobile phone operator T-Mobile, where he created dynamic user interfaces and prototypes using Flash Lite. He has managed an international team of developers and now works for leading entertainment and communications company British Sky Broadcasting. He holds a BSc (Hons) in Chemistry from the University of Birmingham, and an MSc in Computer Studies from Sheffi eld Hallam University. www.it-ebooks.info ACKNOWLEDGMENTS WRITING THIS BOOK WAS TRULY A LABOR OF LOVE during the many days and late nights spent putting it together. Time fl ew, and before I knew it, the days had turned into weeks, and the weeks had turned into months. The end result is something that I am really proud of. None of this would have been possible without the support of everyone at Wiley, who I’d like to give a big thank you! Thank you all for the time and effort spent making things happen. I’d like to give special thanks to Scott Meyers, Acquisitions Editor, and Kenyon Brown, Project Editor, for driving the project. Thank you for the belief, guidance, and words of encouragement that were given throughout. Also, thank you to Darren Osadchuk, Technical Editor, for his technical advice and all important feedback. I’d also like to thank the development team at Sony Ericsson — Velimir Karadzic, Enrique Garcia, and Youness Ghanim — who gave some of their time to review and give feedback. Finally, many thanks to all my family and friends, for the love and support they gave me during the time of writing. I couldn’t have done it without them, especially my darling wife, Joanna. —Jermaine G. Anderson www.it-ebooks.info CONTENTS INTRODUCTION xvii CHAPTER 1: FLASH IS MOBILE Mobile Devices 1 The Mobile Ecosystem 2 Participants 2 Recommended Reading 4 Engaging Experiences That Work on Small Screens 4 What Is Flash Lite? 5 Past, Present, and Future 5 The Open Screen Project 6 Multiple Devices and Platforms 7 OEMs Supporting Flash Lite Player Development 7 Types of Flash Lite Mobile Content 7 Flash Lite Architecture 8 Flash Lite Player 3.x Features 9 Summary 12 CHAPTER 2: GETTING STARTED Developing for Flash Devices 13 What You Will Need 14 Using Device Central 15 What Are Device Sets? 15 Using the Online and Local Libraries 16 Understanding Device Profi les 16 Creating Device Sets 17 Comparing Device Profi le Information 18 Creating New Flash Mobile Documents 21 Creating a “Hello World” Example 23 Using the Emulator in Device Central 26 Memory and Device CPU 27 Testing on Mobile Devices 30 Devices with Flash Lite Pre-Installed 31 Remote Devices 31 Summary 31 www.it-ebooks.info x CONTENTS CHAPTER 3: OBJECT-ORIENTED PROGRAMMING FOR FLASH LITE DEVELOPMENT AS2 Revisited 33 Object-Oriented Programming for Flash Lite 35 Why OOP? 35 An OOP Example for Mobile 35 Mobile Device Considerations 47 Using fscommands to Communicate with the Device 47 Using Device Capabilities 60 System.capabilities 61 Events and Event Listeners 64 Using the EventDispatcher Class 64 Keys, Buttons, and Touch Input 68 Using the Key Class 68 Using the ExtendedKey Class 71 Handling Touch Interaction 72 Summary 74 CHAPTER 4: UI COMPONENTS Sony Ericsson and Forum Nokia Component Libraries 76 Using Text 77 Using Buttons 77 UI Component States 78 Using the Component Inspector 78 Using Soft Keys 82 Using Status Bar 83 Using Title 84 Using Check Boxes 84 Using Radio Buttons 87 Using Lists 90 Creating a Single Row List 90 Using Modal Dialogues 96 Using Visual Indicators 98 The Progress Indicator 98 The Wait Indicator 100 Using Sliders 100 Using Scrollable Areas 102 Using the Scrollable Area Component 102 Using the Scrollable Text Component 103 Using Notifi cation 104 Summary 105 www.it-ebooks.info [...]... experienced mobile developers in Flash and other platforms get the most out of Flash Lite, and also provide those looking to create mobile applications with a solid base and framework concepts, which they can apply to future iterations of the Flash technology WHAT THIS BOOK COVERS Professional Flash Lite Mobile Development introduces advanced topics, covering the key aspects of Flash Lite mobile development: ... Supporting Flash Lite Player Development Device manufacturers Nokia and Sony Ericsson are among a number of OEMs supporting Flash mobile development, and these two in particular have resources that you can utilize in your Flash development One of the very early debates among developers during the early release of Flash Lite was whether Flash Lite or Java Platform, Micro Edition (JME) would prevail as the mobile. .. Ericsson, allowing the reader to extend Flash Lite mobile applications beyond the features of the Flash Lite player ➤ Chapter 13 — Packaging Flash Lite Applications for Distribution: Covers how to package completed Flash Lite mobile applications for consumers, introduces aggregators, and the Sony Ericsson and Nokia content distribution channels ➤ Appendix — Flash Lite 3.x ActionScript 2.0 Quick Reference:... www.it-ebooks.info Flash Lite Architecture ❘ 11 Flash Lite 3.0 allowing for the format to be played directly within the Flash Lite Player The Flash Lite Player for mobile now includes support for H.264, the standard used in high defi nition (HD) televisions, game consoles, and video players Flash Lite also supports video playback of other video formats supported by the majority of mobile devices, including... over their network Flash Lite 1.0 was then superseded by Flash Lite 1.1, a release that had a number of enhancements, including network access and integration with the handset Flash Lite 1.1, allowed existing Flash developers, who created similar content for Web sites, to leverage their skills After a few years of progress with Flash on mobile in the Asia Pacific (APAC) region, the Flash Lite 1.1 player... South America This iteration of the Flash Lite Player signaled the start of a new dawn for Flash on mobile devices, and as the developer community became more established, licensing agreements were made with OEMs to pre-install the Flash Lite Player on mobile handsets allowing consumers to view compatible content Flash Lite 2.x A few years after the release of 1.1, Flash Lite 2.0 was introduced with performance... Wireless) later was given a slightly different implementation of Flash Lite, in Flash Lite 2.1 Flash Lite 3 x Not long ago Flash 3.0 opened up new avenues for Flash on mobile Fueled in part by a “revolution” in Flash video on the Internet, the more evolved features in version 3.0 meant that the player would allow playback of video directly into the Flash Player, another boost for the multimedia capabilities... Programming for Flash Lite Development: This chapter includes an overview of ActionScript 2.0, and common object- oriented programming concepts that can be used in coding Flash Lite applications It also covers language elements specific to Flash Lite mobile development ➤ Chapter 4 — UI Components: This chapter explores the excellent Sony Ericsson UI component library used for developing Flash Lite user interfaces... browser- and desktop-based Flash Player The browser-based versions of the Flash Player have always been out of sync with the mobile version, because of the limitations of the device hardware Flash Lite 1 x Flash had already been introduced to Pocket PC devices by the time Flash Lite fi rst appeared as Flash Lite 1.0 on the Japanese NTT DoCoMo i-mode system, which offered mobile Web sites and content... supporting Flash Lite and Flash- enabled devices ➤ It provides details and best practices on how to package and distribute Flash Lite applications Chapter-by- Chapter Description A description of each chapter follows: ➤ Chapter 1 — Flash Is Mobile: This chapter provides a brief discussion of mobile devices and Flash, as well as its role in the mobile ecosystem, and a look at Flash Lite and what it is It . Supporting Flash Lite Player Development 7 Types of Flash Lite Mobile Content 7 Flash Lite Architecture 8 Flash Lite Player 3.x Features 9 Summary 12 CHAPTER 2: GETTING STARTED Developing for Flash. . . . . 537 www.it-ebooks.info PROFESSIONAL Flash ® Lite ® Mobile Development Jermaine G. Anderson www.it-ebooks.info Professional Flash Lite Mobile Development Published by Wiley Publishing,. Flash Lite mobile applications beyond the features of the Flash Lite player. Chapter 13 — Packaging Flash Lite Applications for Distribution : Covers how to package completed Flash Lite mobile

Ngày đăng: 05/05/2014, 16:34

Từ khóa liên quan

Mục lục

  • Professional Flash Lite Mobile Development

    • About the Author

    • Contents

    • Introduction

    • Chapter 1: Flash Is Mobile

      • MOBILE DEVICES

      • THE MOBILE ECOSYSTEM

      • ENGAGING EXPERIENCES THAT WORK ON SMALL SCREENS

      • FLASH LITE ARCHITECTURE

      • SUMMARY

      • Chapter 2: Getting Started

        • DEVELOPING FOR FLASH DEVICES

        • USING DEVICE CENTRAL

        • CREATING A “HELLO WORLD” EXAMPLE

        • USING THE EMULATOR IN DEVICE CENTRAL

        • TESTING ON MOBILE DEVICES

        • SUMMARY

        • Chapter 3: Object-Oriented Programming for Flash Lite Development

          • AS2 REVISITED

          • OBJECT-ORIENTED PROGRAMMING FOR FLASH LITE

          • MOBILE DEVICE CONSIDERATIONS

          • USING DEVICE CAPABILITIES

          • EVENTS AND EVENT LISTENERS

          • KEYS, BUTTONS, AND TOUCH INPUT

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan