packagernokia

nokia s60  时间:2021-02-28  阅读:()
AdvancEDFlashonDevicesMobileDevelopmentwithFlashLiteandFlash10EladElrom,ScottJanousek,ThomasJoosLeadEditorsClayAndres,TomWelshTechnicalReviewerandContributorNancyNicolaisenEditorialBoardClayAndres,SteveAnglin,MarkBeckner,EwanBuckingham,TonyCampbell,GaryCornell,JonathanGennick,MichelleLowman,MatthewMoodie,JeffreyPepper,FrankPohlmann,BenRenow-Clarke,DominicShakeshaft,MattWade,TomWelshSeniorProjectManagerSofiaMarchantCopyEditorHeatherLang,LizWelchAssociateProductionDirectorKariBrooks-CoponySeniorProductionEditorLauraCheuCompositorMollySharp,LynnL'HeureuxProofreaderAprilEddyIndexerBrendaMillerArtistAprilMilneCoverImageDesignerBruceTangInteriorandCoverDesignerKurtKramesManufacturingDirectorTomDebolskiAdvancEDFlashonDevices:MobileDevelopmentwithFlashLiteandFlash10Copyright2009byEladElrom,ScottJanousek,ThomasJoosAllrightsreserved.
Nopartofthisworkmaybereproducedortransmittedinanyformorbyanymeans,electronicormechanical,includingphotocopying,recording,orbyanyinformationstorageorretrievalsystem,withoutthepriorwrittenpermissionofthecopyrightownerandthepublisher.
ISBN-13(pbk):978-1-4302-1904-0ISBN-13(electronic):978-1-4302-1905-7PrintedandboundintheUnitedStatesofAmerica987654321Trademarkednamesmayappearinthisbook.
Ratherthanuseatrademarksymbolwitheveryoccurrenceofatrademarkedname,weusethenamesonlyinaneditorialfashionandtothebenefitofthetrademarkowner,withnointentionofinfringementofthetrademark.
DistributedtothebooktradeworldwidebySpringer-VerlagNewYork,Inc.
,233SpringStreet,6thFloor,NewYork,NY10013.
Phone1-800-SPRINGER,fax201-348-4505,e-mailkn`ano)juForinformationontranslations,pleasecontactApressdirectlyat2855TelegraphAvenue,Suite600,Berkeley,CA94705.
Phone510-549-5930,fax510-549-5939,e-mailejbk<]lnaoo*_ki,orvisitsss*]lnaoo*_ki.
ApressandfriendsofEDbooksmaybepurchasedinbulkforacademic,corporate,orpromotionaluse.
eBookversionsandlicensesarealsoavailableformosttitles.
Formoreinformation,referenceourSpecialBulkSales–eBookLicensingwebpageatdppl6++sss*]lnaoo*_ki+ejbk+^qhgo]hao.
Theinformationinthisbookisdistributedonan"asis"basis,withoutwarranty.
Althougheveryprecautionhasbeentakeninthepreparationofthiswork,neithertheauthor(s)norApressshallhaveanyliabilitytoanypersonorentitywithrespecttoanylossordamagecausedorallegedtobecauseddirectlyorindirectlybytheinformationcontainedinthiswork.
Thesourcecodeforthisbookisfreelyavailabletoreadersatsss*bneaj`okba`*_kiintheDownloadssection.
CreditsIwouldliketodedicatethisbooktomywifeJordana,whomotivated,inspired,andaccommodatedme—whiletak-ingcareofourseventeen-month-oldbabygirl—asIworkedlongnightstocreatethisbook.
IalsowouldliketodedicatethebooktomymotherElenaandbrotherLior;Iamluckytohavetheminmylifeandtoreceivetheirloveandsupport.
—EladElromThisbookisdedicatedtomymotherandfather,whotakeaninterestinmylifeeventhoughtheymightnotalwaysunderstandallthetechnologyandgeekystuff.
Iloveyou.
ThanksalsotomyolderbrothersJeffandPaulforalwaysgivinggood,sound,real-lifeadvicetoayoungersibling.
—ScottJanousekIwouldliketodedicatethisbooktomyparents,whoarealwaysthereforme—whetherI'mplayinginasoccergameorwritinganerdybook.
Thanksforalwaysbelievinginme.
Also,IwouldliketothankmyyoungerbrotherBrecht,whoisdoingagreatjobofbecomingasportsteacher.
Ihopeyoufinishcollegesoon,soyoucangetallthoseyoungpeopleingoodshape.
Iamproudtohaveyoubymyside,togetherwithMomandDad.
Iloveyouall.
—ThomasJoosivForewordxxiAbouttheAuthorsxxiiiAbouttheTechnicalReviewerxxivAbouttheCoverImageDesigner.
xxvAcknowledgmentsxxviIntroduction.
xxviiiPARTONEMOBILEDEVELOPMENTLANDSCAPEChapter1TheMobileandDeviceLandscape3PARTTWOFLASHLITEPLATFORMOVERVIEWChapter2FlashLitePlatformFundamentals29Chapter3FlashLite3101Chapter4TipsandTricksforDevelopingFlash149MobileApplicationsChapter5MobileandDeviceWidgetPlatformswithFlash173Chapter6FlashLiteUserInterfaceComponents241andFrameworksChapter7ExtendingFlashonMobileandDevices279UsingOEM-BasedSolutionsChapter8PortingFlashLiteApplicationstotheiPhone.
315usingThird-PartyToolsCONTENTSATAGLANCEvPARTTHREEAIRAPPLICATIONSFORMULTIPLESCREENSANDMOBILEINTERNETDEVICESChapter9AdobeIntegratedRuntimeonMobileDevices329Chapter10AdoptingAIRforMobileDevices385Chapter11DevelopingCross-PlatformAirApplications431PARTFOURFLEXAPPLICATIONRUNNINGFLASH10ONMOBILEDEVICESChapter12MobileApplicationsandDevelopmentStrategies483withFlex4andFlashCatalystChapter13AdoptingFlexforMultipleDevices525Chapter14BuildingMobileApplicationsUsing561Test-DrivenDevelopmentChapter15CreatingaCross-PlatformVideoPlayer.
619andOptimizingContentIndex699viiForewordxxiAbouttheAuthorsxxiiiAbouttheTechnicalReviewerxxivAbouttheCoverImageDesigner.
xxvAcknowledgmentsxxviIntroduction.
xxviiiPARTONEMOBILEDEVELOPMENTLANDSCAPEChapter1TheMobileandDeviceLandscape3Addressingfragmentation4Gettingtoknowthedevices6Mobilephones6Navigatingthemobilephonedevelopmentecosystem7Preparingforthefutureinthemobileecosystem8MIDandUMPCdevices9Digitalhomeconsumerelectronics10IntegratingFlashontoIntelchips10IntegratingFlashontoBroadcomchips10ARM-baseddevices10Gettingtoknowtheoperatingsystemsandplatforms11Nativelycompiledvs.
interpreteddevelopmentlanguages11UnderstandingtheFlashplatform12WorkingwithFlashLite12ExtendingFlashLite13UsingtheFlashPlayerandAdobeAIRonsmartphones14UnderstandingtheJavaMEplatform14ExploringtherelationshipbetweenJavaMEandFlash16UnderstandingtheSymbianoperatingsystem16ExploringtherelationshipbetweenSymbianandFlash17UnderstandingWindowsMobile17ExploringtherelationshipbetweenWindowsMobileandFlash17UnderstandingtheAdobeMobilePlatform18UnderstandingBREW19CONTENTSCONTENTSviiiExploringtherelationshipbetweenBREWandFlash20UnderstandingtheiPhoneSDK21ExploringtherelationshipbetweentheiPhoneandFlash22UnderstandingtheAOLOpenMobilePlatform22ExploringtherelationshipbetweentheAOLOpenMobilePlatformandFlash23UsingResearchInMotion(RIM)ontheBlackberry23ExploringtherelationshipbetweentheBlackberryandFlash23UnderstandingAndroid23ExploringtherelationshipbetweenAndroidandFlash24UnderstandingPalmPre24ExploringtherelationshipbetweenPalmPreandFlash24Summary25PARTTWOFLASHLITEPLATFORMOVERVIEWChapter2FlashLitePlatformFundamentals29Realizingmultiscreenuserexperiences29GettinguptospeedwithFlashLite30TheFlashplatform31UnderstandingtheimportanceoftheOpenScreenProject32ExploringtheFlashLiteplatform32FlashLitepenetrationstatistics33EvaluatingFlashLiteplayerprosandcons34FlashLiteplayerarchitecture35IntroducingFlashLiteproducts,tools,andservices36AdobeCreativeSuite3and436FlashCS3andCS437DeviceCentralCS437AdobeCaptivateCS4.
37FlashCast.
37FlashHome38AdobeMobileApplicationBuilder38AdobeMobileApplicationPackager39AdobeFlashLite3.
1DistributablePlayer39WorkingwiththeSWFfileformat39PublishingSWFs40DeployingSWFs41ExploringFlashLitecontenttypes42Primarycontenttypes42OEM-specificcontenttypes44LearningthebuildingblocksofFlash-basedcontent46Symbols46TheFlashtimeline47Frames48Layers48Animatingthetimeline49Animatingtext50Workingwithsound50Workingwithvideo51CONTENTSixUnderstandingtheFlashLiteversions53IntroducingtheFlashLiteruntimeversions53ExploringFlashLite1.
154WorkingwithFlashLite1.
1variables,functionclips,andpseudoarrays54Variables54Functionsandfunctionclips55Pseudoarrays55ReviewingFlashLite1.
1ActionScriptsyntax56Globalvariables56MovieClipproperties57Operators59Keywordsandbuilt-infunctions60Usingthefscommand2API65AccessingtheFlashLite1.
1syntaxreferencesheet66KnowingtheFlashLiteerrorcodes67ExploringFlashLite2.
068Handlingtextandfonts68SupportingcompressedSWFformats68IncorporatingXMLsupport69Loadingandplayingbackdynamicmedia69Persistingdata69Playingdevicevideo69AccessingtheDrawingAPI70Usingthefscommand2additions70IntroducingtheFlashLite2.
0errorcodes71ExploringFlashLite2.
172ExploringFlashLite3.
073ExploringFlashLite3.
174ExploringAdobeMobileClient75ExploringActionScript76UsingActionScript1.
076UsingActionScript2.
076ChoosinganActionScript2.
0editor77Developingviathetimelinevs.
classes79Workingwiththetimeline79Usingfunctionsandproceduralcode80Developingclasses81ExploringtheFlashLiteCDKs82IntroducingtheFlashLiteCDKs82IntroducingtheDeviceCentralCS4SDK82IntroducingFlashLitevisualcomponentsets83PackagingFlashLitecontent84UnderstandingFlashLitepackagingformatsforSWFs84PackagingfileformatsandmethodsforFlashLitecontent86CustomSIS86CustomNFL86SWF2SIS86SWF2GoProfessional87SWF2JAR87Jarpa88CONTENTSxSWFPack.
com88ForumNokiaFlash(andFlashLite)packager89SWF2NFL89AdobeMobilePackager89W'd-get-it91DistributingandmonetizingFlashLitecontent92IntroducingFlashLitecontentaggregatorsandproviders93Zed93ThumbPlay93GetJar93NokiaMOSH94NokiaSoftwareMarketandNokiaDownload!
94VerizonWirelessGetItNow95Smashingcontent95ShockwaveGames(AtomEntertainment)95MoketContentNetwork95Handango95Voeveo96Mobibase96ClickGamer96FunMobility96ChumbyNetworkportal96IguanaMobile97AggregatingcontentforFlash10andAIRapplications97Distributingviadirect-to-customerandconsultationmodels97IntroducingtheOpenScreenProjectFund97JoiningFlashmobileanddevicedevelopmentcommunities98Summary99Chapter3FlashLite3101GettingtoknowFlashLite3.
0102Improvingperformance102Enhancingvideocapabilities103Browsingwebcontent103Localfilesecurity105Managingcontent106GettingtoknowFlashLite3.
1110Enhancingmobileanddevicewebbrowsing110SupportingFlash9(ActionScript2only)110UsingtheLocalConnectionclass111EnhancingHTMLbrowsersupport115UsingthenewHTMLcapabilities117Videoenhancements121MP3streamingsupport122GraphicAPIadditions122ActionScriptenhancements123WorkingwithFlashLite3.
x124Explainingmash-ups125CreatingourFlashLite3videoapplication125CONTENTSxiExploringtheAdobeDistributablePlayerSolution139DownloadingtheFlashLite3.
1DistributablePlayer140UsingAdobeMobilePackager140DownloadingAdobeMobilePackager141AccessingAdobeMobilePackagerdocumentation142AccessingtheFlashLiteDistributablePlayertutorials142IntroducingtheAdobeDeviceCentralCS4SDK143DownloadingtheAdobeDeviceCentralSDK144ExploringtheAdobeDeviceCentralSDK144Installingsampleplug-ins145LeveragingAdobeDeviceCentralCS4plug-ins145Summary146Chapter4TipsandTricksforDeveloping149FlashMobileApplicationsOptimizingyourmobileuserinterface149Keepingitsimple150Visualizinginteraction150Usingsoftkeylabels151Usingarrowvisualization151Highlightingitems151Minimizinginteractionpossibilities151Providingextraexplanation152Minimizingtext152Consideringusability:fourreasonsusercontextisimportant152Light152Time153Applicationawareness153Movement153Optimizingformobiledevices154Managingmemory154Understandingthestaticanddynamicmemoryheaps154Understandingthegarbagecollector154Optimizingforefficientmemoryuse156ImprovingCPUperformance157Renderingbitmapartwork158LoadingXMLdata158UsinggotoAndPlay(158Tweeningobjects158Registeringvariablesanddefiningfunctions158Loopingiterations159Usingevents159Optimizingcalculations159Optimizingaprojectbeforepublishingit159UsingOxygen,theFlashLiteDevelopersKit160Testingusingmobileemulators160AdobeDeviceCentral160Usingdeviceprofiles161Previewingapplicationappearanceandperformance161CONTENTSxiiDeviceAnywhere162Emulatingallmajorworldwidecarriersandtheirnetworks162Previewingapplicationappearance162Workingthroughbestpracticestutorials162Usingpersistentdata162Configuringtheapplication162Checkingexistingdata163LoadinginteractiveSWFfiles164UsinglocalandexternalSWFfiles164LoadingexternalfilestostreamvideoinFlashLite3168Summary170Chapter5MobileandDeviceWidgetPlatformswithFlash173Understandingwidgets174Runningwidgetsonthedesktop174Runningwidgetsonmobileanddevices174DevelopingwidgetswithNokiaWebRuntime175LearningthebasicsofWRT176PreparingtodevelopawidgetforanS60device177Exploringthewidgetfiles178Exploringtheinfo.
plistconfigurationfile181BuildingaFlashLite–basedWRTwidgetusingAptanaStudio182Downloading,installing,andconfiguringAptanaStudio184DownloadingandinstallingtheNokiaWRTplug-in185DevelopingaNokiaWRTwidget187DesigningtheNokiaWRTwidget'sFlashLitecontent191AddingtheFlashLitecontenttoaNokiaWRTwidgetframework194PackagingaNokiaWRTwidget195PackagingFlashLitecontentinawidget196TestingaWRTwidget197TestingwiththeNokiaS60platformSDKemulator197TestingwithNokiaS60handsets198TestingwithAptana199TestingwithRDA200TestingwithAdobeDeviceCentral201DeployinganddistributingWRTwidgets201MOSH201TheOVIStore202NokiaDownload!
202Otherdistributionmethods202InstallingawidgetontoasupportedS60device202DevelopingChumbywidgets203IntroducingtheChumby204Understandingglanceabletechnology204ComparingChumbyandNokiaWRTwidgets204HackingtheChumby206Accessingonlinecommunitysupportresources207GettingholdofaChumby207ExploringtheChumby208CONTENTSxiiiGettingreadyforChumbywidgetdevelopment209FlashwidgetsontheChumby209Deliveringcontentviachannels209UnderstandingChumbyinputmethodsandsensorAPIs210Touchscreen211Accelerometer211Bendswitch212Microphone212Display212UsingChumbyvariables212Widgetparameters213Widgetconfigurationvariables213UsingtheChumbyfscommand2API213DealingwithFlashsecurityontheChumby215Workingwithaudio216Workingwithvideo216Loadingandsavingdata217Remotedata217Persistentdata217Workingwithwidgetconfigurators217PublishingChumbySWFs218Findingtips,tricks,andfurtherresourcesforChumbywidgets219UsingbestpracticesforChumbywidgetdevelopment219BuildingaFlashLitewidgetfortheChumby219DownloadingandinstallingSWFMill220DownloadingandinstallingFlashDevelop221CreatingtheAssetSWF223DevelopingtheFlashLiteChumbywidget224TestingChumbywidgets230TestingwithouttheChumbydevice230TestingontheChumbydevice232DeployingawidgetontheChumbyNetwork234MonetizingChumbyplatformdevelopment238Summary239Chapter6FlashLiteUserInterfaceComponents241andFrameworksFlashLiteuserinterfaces242BenefitsofFlashLitewithuserinterfaces242LeveragingFlashLiteuserinterfaces243On-deviceuserinterfaces243UserinterfacesinFlashLiteapplications244CreatingFlashLiteuserinterfaceswithcomponentsandframeworks244FlashLiteFeatherFramework245DownloadingandexploringtheFeatherFramework245ExaminingtheLitedaysdemoapplication246DownloadingandexploringFeatheruserinterfacecomponents260FlashLiteBlocketPCLayoutManager261FeaturesoftheLayoutManager262CONTENTSxivExploringtheLayoutManagerdemos262ExploringtheLayoutManagerdemo01.
rarexample263ShurikenFlashLite2.
xcomponentframework264DownloadingandinstallingShuriken265ExploringtheShurikencomponents266OxygenToolkit(forNokiadevices)268ExploringtheOxygencomponents268DownloadingandinstallingtheOxygenToolkit269UsingtheOxygencomponents270NokiaFlashLiteIndicatorandListcomponents271ExploringtheNokiaFlashLite2.
xcomponents271DownloadingandinstallingtheNokiaFlashLite2.
xcomponents272UsingtheNokiacomponents273ForumNokiaFlashLitecomponentset274ExploringtheNokiaFlashLitecomponentset274DownloadingandinstallingtheNokiaFlashLitecomponentset274UsingtheNokiaFlashLitecomponentset275AdobeXDFlashLiteuserinterfacecomponentexamples275ExploringtheAdobeXDFlashLiteuserinterfacecomponents275DownloadingtheFlashLiteuserinterfacecomponents277UsingtheFlashLiteuserinterfacecomponents277Summary277Chapter7ExtendingFlashonMobileandDevices279UsingOEM-BasedSolutionsWorkingwithnext-generationmobileanddeviceAPIs280ExtendingFlashLitewithdeviceAPIs280PoweringFlashwithNokiaS60PlatformServices281IntroducingS60PlatformServices281GettingtoknowtheS60PlatformServicesmethods282LeveragingS60PlatformServices284InstallingtheNokiaS60PlatformServiceAPIs284TargetingS60PlatformServices–supporteddevices285WritinganinlineSMSapplication286GettingmoreinformationonS60PlatformServices289ExtendingFlashonSonyEricssondevices290GettingstartedwithFlashonSonyEricssondevices290WorkingwithaccelerometersonSonyEricssondevices291Detectingdevices291Accessingtheaccelerometer292IntroducingProjectCapuchin294Lookingathigh-levelProjectCapuchinarchitecture296ExploringtheusecasesforProjectCapuchin297PassingdatabetweenJavaandFlashLite297UsingDataRequest298UsingExtendedEvents299CONTENTSxvSettingupthedevelopmentenvironmentforProjectCapuchin300CreatingyourfirstProjectCapuchinapplication301Downloading,extracting,andinstallingtheProjectCapuchinexample301WalkingthroughtheJavaMIDlet303WalkingthroughtheFlashLiteuserinterface306PackagingFlashLitecontentwithSWF2JAR307GettingmoreinformationaboutProjectCapuchin311ExtendingActionScriptinFlashLite3.
1311LookingforwardtoFlash10andDeviceAPIs311Summary312Chapter8PortingFlashLiteApplicationstotheiPhone.
315UsingThird-PartyToolsPortingFlashapplicationstotheiPhoneusingb.
Tween316IntroducingeyeGT316UnderstandingtheinnerworkingsofeyeGT317ConvertingFlashapplicationsintonativeiPhoneapplications319GettingtoknowtheMonsterMatchgame319Changingtheinterface319UsingthereAnimatortool320PortingtotheiPhone322Emulatingtherootobject322Gettingreadytodeploy323Flashontouch-screendevices323Touchingthings323Designingatouch-basedUI324Summary324PARTTHREEAIRAPPLICATIONSFORMULTIPLESCREENSANDMOBILEINTERNETDEVICESChapter9AdobeIntegratedRuntimeonMobileDevices329Takingahigh-levelviewoftheAIR1.
5platform330UsingtipsandtricksforFlashPlayer10onmobiledevices333Movingobjectsin3-Dspace334UsingPixelBenderforgraphicsandcalculations337CreatingcustomfilterswithPixelBender337UsingPixelBendertocalculateinformation340UtilizingtheTextLayoutFramework348UsingtheSparkTextArea352Creatingsounddynamically357Improvingvisualperformance359UsingtheenhancedDrawingAPI362Readingandwritinglocalfiles363CONTENTSxviTakingahigh-levelviewofAIR1.
5capabilities368LoadingHTMLandJavaScripttoacontainer368Accessingthelocalfilesystem370EncryptingSQLitedata372UpdatingapplicationsandusingthenotificationAPI375Listeningtonetworkchanges375Changingnativewindowingandchromecontrol377SigningyourAIRapplication379Choosingyourdigitalsigningmethod379SigningyourapplicationwithFlexBuilder380Summary382Chapter10AdoptingAIRforMobileDevices385Implementingplatformandcontextawareness386Detectingsystemcapabilities387Detectingsystemsupport389Detectinguserpresence391Detectingnetworkconnectivitychanges392DetectingHTTPconnectivity392Detectingsocketconnectivity393Detectinglocaldrives393Detectingapplicationwindowmovement394GettingtheAIRruntimeversionandpatchlevel394Adaptingconfigurationandbehavior398Downloadingfilesfromaserver399ImplementingHTTPconnectivityawareness401Usingadatabasetostoreinformation401CreatingaSQLitemanager402Mobiletouchandmultitouchscreenapplications413Understandingthetouchscreen413CreatingaUMPCtouchscreenapplication415Creatingaseamlessinstallationexperience421Enablingbrowserinvocation423Creatingacustombadgeinstaller424InstallingtheBrowserAPI426Summary429Chapter11DevelopingCross-PlatformAirApplications431IntroducingthebasicsofdynamicGUIs432UnderstandingthePassiveMulti-viewdesignpattern433UnderstandingthePassiveViewdesignpattern435UnderstandingtheFactorydesignpattern436Puttingthepatternstogether436ImplementingthePassiveMulti-viewdesignpattern437Creatingtheabstractpassivemainviewclass438Creatingthepassivemainviewclass438Creatingtheabstractpassivesubview439Creatingthepassivesubview439CONTENTSxviiCreatingthefactoryclass440Creatingthepresenterclass441Creatingthecreatorclass442Developingthemusicplayerapplication444BuildingthemusicplayerAPI444CreatingtheIPlayerinterface444CreatingtheAbstractPlayerclass445CreatingthePlayersubclass449CreatingthemusicplayerGUI455CreatingGenericMusicPlayer.
mxml455CreatingaGUIforamusicplayerapplication459Creatingtheloginform459CreatingtheGUI462Creatingthecreatorclass464Creatingtheskincomponents466ImplementingtheAbstractMusicPlayerMainclass472ImplementingtheAbstractMusicPlayerclass473Makingtheapplicationcontextawareandadaptable476Utilizingcontextawarenessformultipleviews476Adaptingtheapplication477Summary478PARTFOURFLEXAPPLICATIONRUNNINGFLASH10ONMOBILEDEVICESChapter12MobileApplicationsandDevelopmentStrategies483withFlex4andFlashCatalystGettingtoknowFlashCatalyst483ExploringthebenefitsofCatalyst484Gettingthetool484SeparatingpresentationfromlogicwithFlashCatalyst484ExploringFlash'snewdevelopmentcycle485GettingstartedwithFlashCatalyst486CreatinganewCatalystproject487CreatingyourfirstfullCatalystapplication489Creatinggraphics489Convertinggraphicstocomponents491Choreographingtheapplication492Addingactionstothebuttonswecreated493Switchingtocodemode493CreatinganapplicationwithFlashCatalystandFlexBuilder496Refactoringthecode497Addingtheuserauthenticationservice497Addingincorrectcredentialandloggedinstates500CreatingamobileapplicationwithCatalystandAIR501CreatingtheFlashCatalystproject502Convertinggraphicstocomponents504CONTENTSxviiiAddingFXGgraphicelements505Addingbuttonstateinteractivity506Creatingthedetailstate507Addinginteractivitybetweenstates508ImportingtheFXPprojectintoFlexBuilder4509ConvertingtheprojecttoanAdobeAIRproject511GettingthelistofYouTubevideos512GettingYouTubefeedswithourutilityclass512ExtractingtheFLVfromtheYouTubeutilityclass514AddinglogictotheFlashCatalystapplication516SigningyourAIRapplication519SigningyourapplicationwithFlexBuilder520DeployingyourAIRapplicationonaUMPC522Summary523Chapter13AdoptingFlexforMultipleDevices525CreatingaFlexGUIfortheNokiaN810browser526CreatingdynamicGUIsusingFlashCatalyst527CreatingaGUIfora320480-pixelscreenwithCatalyst528ImportingtheIllustratorfileintoCatalyst528ImportingartworkintoFlashCatalyst529ConvertinggraphiccomponentstoFlexcomponents530ConvertingtheslidergraphicintoMXMLcomponents532CreatingaGUIfora530520-pixelscreenwithCatalyst533ConvertinggraphiccomponentstoFlexcomponents534ConvertingslidersgraphicsintoMXMLcomponents535ImportingFlashCatalystGUIsintoFlex4SDK536ImportingtheFXPproject537ImplementingthePassiveMultiviewdesignpattern537CreatinglogicforFlashCatalystapplications541Creatingthemainview,MusicPlayerMain.
mxml542CreatingthesubviewsforMusicPlayer.
mxml544SkinningtheFlexcomponents552Summary559Chapter14BuildingMobileApplicationsUsingTest-Driven.
561DevelopmentUnderstandingTDDbasics562CreatingunittestsusingFlexUnit563Creatingyourfirsttestsuiteandtestcase564CreatingtheTestSuiteclass564CreatingtheTestCaseclass564CreatetheTestRunnercomponent565Writingafailedunittest566Writingcodetopassthetest567CONTENTSxixPassingthetest568Refactoringthetest'scode568Repeatingthisprocess569Usingassertionmethods570FlexUnitinFlex4571CreatingatestsuiteandtestcaseinFlex4572Creatingatestsuiteclass572Addingatestcaseclass573Writingafailedunittest575Writingcode578Passingtheunittestassertion579Refactoringourcode579Creatingasecondunittest579Writingasynchronoustests581TestingvisualcomponentswithFlexUnit586TDDwithMVCframeworks590UsingTDDwithCairngorm591Creatingtheusecase591Creatingtheapplicationmodel592CreatingtheMain.
mxmlclass595Creatinginitializationevents598CreatingtheAdobefeedscontainer599Addingtheservicecall602Respondingtouserselectionsofafeed604Creatingtheapplicationtestsuiteandtestcases605UsingTDDwithPureMVC609Creatingthemediatorclass610Creatingtheproxyclass612CreatingthetestsuiteandtestcasetotestPureMVC614Summary616Chapter15CreatingaCross-PlatformVideoPlayer.
619andOptimizingContentInitialstrategychoices:reusingorcreatingvideocontent621Tipsformakinggreatmobiledevicevideocontent622VideoCodec411625PlaybackusingdeviceandFlashvideo626FLV,themostpopularsupportedvideoformat628F4Vformat628H.
264format6283GPformat628Dynamicallydiscoveringadevice'savailablecodecs629DetectingdevicecapabilitiesinFlashLite629EncodingvideoforFlashapplications631CompressingvideofilesusingtheAdobeMediaEncoder631Understandingthedifferencebetweenstreamingandprogressivedownload637Tipsforselectingserversforyourvideos638CONTENTSxxBuildingaprogressivedownloadvideoplayerformobiledevices639CreatingvideoplaybackcomponentsinFlashProfessional639CreatingavideoplayerinFlashLite642CreatingavideoplayerforFlash10646VideoDisplayforFlash10652Detectingconnectionstatus656Astreamingandoptimizingtechniqueformobiledevices658FMSarchitectureoverview658InstallingFMS3.
5onWindows659StreamingvideotoamobiledeviceusingFMS3.
5662Settingasmartbufferpolicy665BandwidthDetection666Dynamicallyswitchingbetweendifferentvideoprofiles676FMS3.
5DVRusingFlashMediaLiveEncoder3.
0677Embeddingvideotechniques677EmbeddingavideofileinaFlashLiteapplication677EmbeddingavideofileinFlash10679AdobeStrobeandOpenVideoPlayer(OVP)initiatives680Dynamicswitchingofvideoprofiles680Enhancingprogressivedownloadseeking688AdobeStrobeframework688Summary697Index699xxiThetechnologylandscapehasneverbeenmoreexciting,andithasalsoneverbeenmorecon-fusing.
Everywhereyoulook,youseeanumberofwaystoconnecttoyourfriendsandconsumedigitalcontent.
Mobiledevices,yourlivingroomconsumerelectronicdevices,PCs,laptops,andnetbooksareallincreasinglyconnectedandcapableofprovidingafullwebexperience.
AllofthisisverygoodnewsforFlashdevelopers.
FlashcontinuestoletdevelopersanddesignerscreaterichInternetapplicationsacrossmultiplescreens.
AtAdobe,wehavebeenworkingveryhardonthenextgenerationoftheFlashPlayerformobiledevicesaswellasforcutting-edgeareas,likethedigitallivingroom.
OneofthecorepromisesoftheFlashPlayerhasalwaysbeentoprovideaconsistentexperi-encefortheuserregardlessoftheoperatingsystemorthebrowser.
Inaworldwherenotonlytheoperatingsystemsbutthehardwareandscreensizesarealldifferent,thatpromiseisevenmoreimportant.
Youhavetobeabletoreachyourcustomersonwhateverdevicethey'reusing,whilestillprovidingtherichuserexperiencethatusersnowexpect.
ThereisnobetterormoreefficientplatformforcreatingrichcontentthatwillruneverywherethanFlash.
Upuntilnow,therehasn'tbeenabookthatcoversthewiderangeoftheFlashplatform,sothisbookissorelyneeded.
ThebreadthoftheplatformmeansthatFlashdevelopersareundermoreandmorepressuretodeliveracrossallmultipleenvironments.
ThefactthatFlashaccountsforover85percentofvideostreamedontheWebmeansthatthetraditionalFlashworldiscollid-ingwithothermedia,andtheskilldemandsonaFlashdeveloperhaveneverbeenmorediverse.
Partdesigner,partdeveloper,andpartrich-mediaguru,theFlashdeveloperneedstohavemanytoolsavailable.
Thisbookdoesagreatjobofcoveringthebuddingmobilespace,thebrowserspace,andthedesktopspaceallthewhileprovidingtipsandtrickstousethetoolsandtech-nologiesoftheFlashplatform.
Thisbookcouldn'thaveastrongersetofauthors.
EladElromisarisingstaroftheFlashdevel-opmentworld.
Hebringsafreshperspective,astrongbackground,andaninherentknackforthemoresubtleaspectsoftheFlashplatform.
He'sbeeninvolvedveryearlyinanumberofAdobeproducts,providingfeedbackandideastoensurethattheplatformremainscuttingedge.
ScottJanousekneedsnointroductioninmostFlashcircles.
HecameearlytotheworldofFlashmobileandhaswatcheditgothroughmany,manyiterations.
HehasbuiltsomeofthemostcompellingFlashLitedemonstrationsoutthereandhasbeenaconstantresourceforthecommunitywhenitcomestoFlashonmobiledevices.
Havinghimauthorabooklikethis,atatimewhenFlashonmobiledeviceshasneverbeenmoreexciting,isaresoundingendorsementofbothwhat'sinsideandwhat'scomingforFlashdevelopers.
FOREWORDxxiiFOREWORDThemultiscreenexperiencebringsmanychallengesandmanyopportunities.
AsaFlashdevel-oper,you'vegotalegupontherestofyourcompetition.
Thecombinationofgreattools,greatservices,andaformidablerichmediainfrastructuremeansyoucantargetthesedeviceswithnext-generationuserinterfacesandmedia.
ThisbookwillbeagreatresourceasyounavigatethewatersofmultiscreenandmobiledevelopmentwiththeFlashplatform.
RyanStewartxxiiiEladElromisatechnicalwriter,technicallead,andseniorFlashengineer.
Asatechnicalwriter,EladwrotebookscoveringFlashtechnologies.
Hemaintainsanactiveblog(dppl6++sss*ahnki`aoecj*_ki+^hkc)andhasspokenatseveralconferencesregardingtheFlashplat-form.
HehashelpedcompaniesfollowtheXPandScrummethodologiestoimplementpopularframeworks,optimizeandautomatebuiltprocessorsandcodereview,andfollowbestprac-tices.
Eladhasconsultedforavarietyofclientsindifferentfieldsandsizes,fromlargecorpora-tionssuchasViacom,NBCUniversal,andWeightWatcherstostartupssuchasMotionBox.
comandKickApps.
com.
ScottJanousekisatechnicalwriter,softwaredeveloper,traininginstructor,communityevange-list,worldwidespeaker,andCEO.
HeisalsotheownerofHookenMobile,amobiledesignanddevelopmentcompanybasedintheUnitedStates,inthesuburbsofBoston,Massachusetts.
ScottisanAdobeCertifiedFlashDesignerandDeveloperaswellasarecognizedFlashmobileexpert.
InadditiontoworkingwithFlashMobile,heisalsocurrentlycreatingnativeapplicationsfortheiPhone,webOS,andAndroidplatforms.
AsanactiveandcontributingmemberoftheAdobeFlashMobileUserGroup,BostonFlashPlatformUserGroup,MassMobile,andMobileMondayBoston(momoBoston),ScottispassionateaboutmobileanddevicesandworkswiththeFlashplatformacrossallsortsofdevicesandgadgets.
FormoreinformationaboutScottandhislatestmobileanddeviceendeavors,checkouthispersonalblogatdppl6++sss*o_kp)pf]jkqoag*_ki+^hkc+.
ThomasJoosisamobileconsultantwhograduatedwithadegreeinmultimediaandcom-municationtechnologyfromtheTechnicalUniversityWest–Flanders.
Asaresultofhispassionformobile,ThomasspecializedinFlashLitedevelopmentandmobileconceptsanddesign.
InDecember2008,hewonanAdobeMaxAwardforRockWerchterMobile,theonlymobileentrythatmadeitintotheEuropeanfinals.
Thomasisalwaysonthelookoutforanymobileopportunitiesthatcouldaddvaluetoaclient'sonlinecampaign,experience,orcommunica-tionplatform.
Fueledbyhisinterestinmobiledesignandconcepts,combinedwithastrongtechnicalknowledgeinFlashLite,Thomasoffersawidevarietyofmobileconsultation,fromtechnicaltrainingsessionsandworkshopstobrainstormingmeetings,andhe'sconstantlylookingformobileplatformopportunitiesforclientsandtheironlinestrategies.
FormoreinformationaboutThomas,youcancheckhispersonalblogatdppl6++sss*pdki]ofkko*^a.
ABOUTTHEAUTHORSxxivNancyNicolaisenisanauthor,aresearcher,andaformercomputerscienceprofessor,spe-cializinginthedesignanddevelopmentofsmallandembeddedmobile-device–basedsolu-tions.
Herthreeprogrammingbookshavebeenprintedinfivelanguages.
ShewritesfeatureandanalysiscontentforInternet-basedpublishersincludingJupitermedia,CodeGuru,andFaulknerInformationServicesandhaspublishedhundredsoffeaturearticles,columns,andanalysesininternationallycirculatedpublicationsincludingBYTE,PCMagazine,WindowsSources,ComputerShopper,Dr.
Dobb'sJournalofSoftwareEngineering,MicrosoftSystemsJournal,DataBasedAdvisor,andTelecomAdvisor,andforMcGraw-Hill/DATAPROResearchCorporation.
Lookforherfirstconsumer-orientedbook,GettingStartedwithNetbooks,whichwillbepub-lishedbyfriendsofEDin2009.
GettingStartedwithNetbooksisaplain-languageguidetoshoppingforbestfitandvalueinyournewultra-mobilecomputerandlearninghowtogetthemostoutoftheconnectedmobilelifestyleusingcloudcomputingservicesandinnovativeaccessories.
ABOUTTHETECHNICALREVIEWERxxvBruceTangisafreelancewebdesigner,visualprogrammer,andauthorfromHongKong.
HismaincreativeinterestisgeneratingstunningvisualeffectsusingFlashorProcessing.
BrucehasbeenanavidFlashusersinceFlash4,whenhebeganusingFlashtocreategames,websites,andothermultimediacontent.
AfterseveralyearsofActionScripting,hefoundhimselfincreasinglydrawntowardvisualpro-grammingandcomputationalart.
Helikestointegratemathandphysicsintohiswork,simulating3Dandotherreal-lifeexperiencesonscreen.
HisfirstFlashbookwaspublishedinOctober2005.
Bruce'sfolio,featuringFlashandProcessingpieces,canbefoundatsss*^ap]nq_a*_kiandhisblogatsss*^ap]nq_a*_ki+^hkc.
Thecoverimageusesahigh-resolutionHenonphasedia-gramgeneratedbyBrucewithProcessing,whichhefeelsisanidealtoolforsuchexperiments.
Henonisastrangeattractorcreatedbyiteratingthroughsomeequationstocalculatethecoordinatesofmillionsofpoints.
Thepointsarethenplottedwithanassignedcolor.
xn+1=xncos(a)–(yn–xnp)sin(a)yn+1=xnsin(a)+(yn-xnp)cos(a)ABOUTTHECOVERIMAGEDESIGNERxxviThisbook,asyoucanimagine,isthecollectiveeffortofawholeteamoveratfriendsofED,andIwouldliketothankeachandeveryoneofyouforthesuperbteameffortingettingthisbookoutinarelativelyshortamountoftime.
Specifically,IwouldliketothankClayAndresforhelpingmakeanideaintothisbook.
WithoutClaysharingmyenthusiasm,thisbookwouldn'thavebeenpossible.
IwouldalsoliketothankTomWelsh,whomadesuretospeakwhat'sonhismindaboutkeepingreaders'interestandensuringthehighqualityofthisbook.
Also,thankstoNancyNicolaisenforanexcellenttechnicalreviewandthecontributionofthefirstfewpagesinChapter15,aswellasmanyideasinthisbook'schapters.
Also,thankstoSofiaMarchantforensuringthatthisbookstayedontrackandforovercomingobstacles.
IwouldliketothankAdobeevangelistsJasonKnell,RyanStewart,andKevinHoytforhelpingmekeepintouchwithchangesthatweremadeinAdobe'slineofproductsandinspiringmewhilewritingthisbook.
SpecialthanksgototheAdobeStrobeTeam,andinparticulartoChristineYarrowandSumnerPaine,whowerekindenoughtoallowuspublishingandnever-before-seeninformationabouttheframework.
IwouldliketothankmycoauthorsScottJanousekandThomasJoos,whoworkeddayandnighttomakedeadlineswhilejugglingbusyschedulesandpersonallives.
Finally,IwouldliketothankthemobileandFlashcommunitiesforbeingactiveandhelpinginspiremuchofthisbook'smaterial,aswellasforkeepingupwiththefragmentedmobileecosystem.
EladElromManythankstoAlessandroPace,DaleRankine,MarkDoherty,andmanyotherpassionatelead-ersintheworldwideAdobecommunityforthehoursspentevangelizingFlashonmobileanddevicesovertheyears.
TheFlashmobile(andespeciallytheFlashLite)communityisatight-knitgroupofgreatpeoplewhoarealwayswillingtoshareopinions,resources,ideas,andknowl-edge.
Ithasbeenreallygreattobeapartofthecommunityoverthepastfewyears.
Tomycoauthors,EladandThomas,thanks,guys,forhanginginthereasweputinallthoselonghourstomakethisbeastofabookactuallyhappen(finally).
ACKNOWLEDGMENTSxxviiIalsowanttogivebigpropstothefriendsofEDteamformanagingthewholebook'sprocessandgettingitouttoreaders,despitemanyoftheobstacleswe'veencounteredalongtheway.
ThepublishingteamatfriendsofEDrocks!
ScottJanousekIwouldliketothanktheentiremultimediaandcommunicationtechnology(MCT)crewattheTechnicalUniversityofWest–Flandersfordoingafantasticjobprovidinghigh-qualityandnew-media–relatededucation.
GoingforMCTwasoneofthebestdecisionsImadeandreallyhelpedmefindoutwhatIwantedtodo.
SpecialthanksgotoKoenDeWeggheleire,whohasalwaysinspiredandmotivatedmetogetthemostoutofmyprojectsandmygoals.
ManythankstomycoauthorsEladElromandScottJanousek,whoworkedsohardtomakethisbookgreat.
Besidesthat,Iwouldliketothankyoubothfortakingmeunderyourwings.
Eventhoughtherewerelotsoflatenightsandlonghours,itwasawonderfulexperience,andIamveryproudoftheresult.
TotheentirefriendsofEDcrew,thanksformanagingthewholebook'sprocessanddoingagreatjobgettingthisbookouttoreaders.
Itwasarealpleasureworkingwithallofyou.
ThomasJoosxxviiiTheideaofwritingthisbookemergedfromthelastbookEladcoauthoredcalledAdvancEDFlex3.
Inthepreviousbook,Eladwrotean80-pagechapteraboutmobiledevices.
Beforethatbookwasprinted,theteamrealizedthatwritingachaptercoveringFlashLitemaynotbesuit-ableforaFlex3book,andthechapterwasdropped.
AfteraconversationwithClayAndresinManhattanabouttrends,technology,Flex,andmobile,EladandClaydecidedthattheyshoulddotheextraordinaryandcombineFlashLitewithemergingtechnologies,takingintoaccountthereleaseofFlashPlayer10onmobiledevices;theyalsodecidedtoincludethehard-to-keep-up-withchangestoFlashLite.
Shortlyafter,EladwasconnectedwithScottJanousekandThomasJoos,whosharedhisvisionandhelpedcreatethisbook—itincludestheory,relevantreal-lifeexamples,aswellasnever-before-seentutorialsandinformationonhowtodevelopapplicationsformobiledevicesusingtheFlashplatform.
Mobiledevicesarethemostfrequentlyuseddevicesworldwide,andtoday,themobileeco-systemisundergoinganexcitingrevolution.
AmidallthesechangesistheAdobeOpenSourceProject,whichismovingfromanideaintoarealitywiththeavailabilityofFlashPlayer10andAdobeIntegratedRuntime(AIR)formobiledevices.
Theseexcitingchangesopenupnewpos-sibilitiesformobiledevelopersandallowyoutocreatecross-platformapplicationsthatsharecodeacrossthedevices.
Thebookisagoodstartingpointifyou'readeveloperinterestedingettinginvolvedinmobiledevelopmentusingtheFlashplatform,andit'sanequallyagreatresourcefortakingmobiledevelopmenttothenextlevelandmovingtomoreadvancedtopicsandunderstandingwheremobiledevelopmentisgoing.
Thisbookissuitableformanyindividuals,whetheryou'reacur-rentFlashLitedeveloperwhowantstopushthelimitsandbetterunderstandthemobileecosys-temoraFlexdeveloperwho'sbeenreluctanttodevelopapplicationsformobiledevelopmentbecauseyourefusedtowriteyourcodeinActionScript2.
0.
Thisbookisalsosuitableifyou'readeveloperwhohasneverusedtheFlashplatformtodevelopamobileapplicationbutwantstobepartoftheexcitingpossibilities.
Thebookoffersyouunparalleledinsightintothemobiledevelopmentworld,whichisknownforbeingrewarding,aswellascomplex,fragmented,andrapidlychanging.
ThechaptersinthisbookwillcoverdifferentversionsofFlashcontentusingFlashPlayer1.
1,2.
0,2.
1,3.
0,3.
1,9.
0,and10.
0.
TopicscoveredinthisbookincludedesktopandmobiledevelopmentusingAIR,aswellasdifferencesbetweendesktopandwebdevelopment—aswellashowtotakethesedif-ferencesintoconsiderationinmobiledevelopment.
Thisbookincludesinformationregardingexistingplatforms,contentproviders,andaggregatorsthatarepartoftheworldwidemobileecosystem.
Italsotalksaboutthecommunitiesanddesktopandonlinetoolstomakeyourlifeeasier,anditoffersexcitingtutorialsforconceptssuchasdeployingFlashontheiPhoneanddevelopingmobileapplicationsusingFlashCatalyst,Flex,andAIR.
INTRODUCTIONxxixWebelievethatthisbookisagreatresourcebutalsoawindowintothefutureofmobiledevelopment:itaddressesnotonlychallengesthatmobiledevelopersfacetodaybutthenewchallengesdeveloperswillbefacingindevelopingapplicationswithFlashPlayer10andAIRformobiledevices.
Ourhopeisthatthisbookwillinspireyoutostartdevelopingapplicationsformobiledevices.
LayoutconventionsTokeepthisbookasclearandeasytofollowaspossible,thefollowingtextconventionsareusedthroughout.
Codeispresentedinbeta`)se`pdbkjp.
Neworchangedcodeisnormallypresentedin^kh`beta`)se`pdbkjp.
Pseudo-codeandvariableinputarewritteninep]he_beta`)se`pdbkjp.
MenucommandsarewrittenintheformMenuSubmenuSubmenu.
Wherewewanttodrawyourattentiontosomething,we'vehighlighteditlikethis:Ahem,don'tsaywedidn'twarnyou.
Sometimescodewon'tfitonasinglelineinabook.
Wherethishappens,weuseanarrowlikethis:.
Pdeoeo]ranu(ranuhkjcoa_pekjkb_k`apd]podkqh`^asneppaj]hhkjpdao]iahejasepdkqp]^na]g*

hostodo:美国大流量VPS,低至$3,8T流量/月-1.5G内存/1核/25gNVMe/拉斯维加斯+迈阿密

hostodo从2014年年底运作至今一直都是走低价促销侧率运作VPS,在市场上一直都是那种不温不火的品牌知名度,好在坚持了7年都还运作得好好的,站长觉得hostodo还是值得大家在买VPS的时候作为一个候选考虑项的。当前,hostodo有拉斯维加斯和迈阿密两个数据中心的VPS在促销,专门列出了2款VPS给8T流量/月,基于KVM虚拟+NVMe整列,年付送DirectAdmin授权(发ticket...

PQ.hosting:香港HE/乌克兰/俄罗斯/荷兰/摩尔多瓦/德国/斯洛伐克/捷克vps,2核/2GB内存/30GB NVMe空间,€3/月

PQ.hosting怎么样?PQ.hosting是一家俄罗斯商家,正规公司,主要提供KVM VPS和独立服务器,VPS数据中心有香港HE、俄罗斯莫斯科DataPro、乌克兰VOLIA、拉脱维亚、荷兰Serverius、摩尔多瓦Alexhost、德国等。部分配置有变化,同时开通Paypal付款。香港、乌克兰、德国、斯洛伐克、捷克等为NVMe硬盘。香港为HE线路,三网绕美(不太建议香港)。免费支持wi...

趣米云月付460元,香港CN2云服务器VPS月付低至18元

趣米云早期为做技术起家,为3家IDC提供技术服务2年多,目前商家在售的服务有香港vps、香港独立服务器、香港站群服务器等,线路方面都是目前最优质的CN2,直连大陆,延时非常低,适合做站,目前商家正在做七月优惠活动,VPS低至18元,价格算是比较便宜的了。趣米云vps优惠套餐:KVM虚拟架构,香港沙田机房,线路采用三网(电信,联通,移动)回程电信cn2、cn2 gia优质网络,延迟低,速度快。自行封...

nokia s60为你推荐
易pc笔记本电脑好?还是易PC笔记本电脑好?外网和内网内网和外网有什么区别啊?会声会影12下载哪里有会声会影12好看视频素材下载什么是电子邮件 什么是电子邮件申请证书手机申请证书开机滚动条电脑开机有滚动条的画面ios7固件下载iOS的固件有正版盗版之分吗?我看到了蜂威网有iOS7的固件想下载试用一下,那里是测试版是正版吗人人逛街人人都喜欢逛街吗发邮件怎么发怎样发送邮件如何清理ie缓存怎么清除IE缓存
万网域名管理 lamp 西安电信测速 mach5 gateone 贵州电信宽带测速 华为4核 gg广告 百兆独享 tna官网 美国在线代理服务器 中国网通测速 安徽双线服务器 114dns hdroad 新疆服务器 alexa世界排名 标准机柜 远程登录 侦探online 更多