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*

pigyun25元/月,香港云服务器仅起;韩国云服务器,美国CUVIP

pigyun怎么样?PIGYun成立于2019年,2021是PIGYun为用户提供稳定服务的第三年,期待我们携手共进、互利共赢。PIGYun为您提供:香港CN2线路、韩国CN2线路、美西CUVIP-9929线路优质IaaS服务。月付另有通用循环优惠码:PIGYun,获取8折循环优惠(永久有效)。目前,PIGYun提供的香港cn2云服务器仅29元/月起;韩国cn2云服务器仅22元/月起;美国CUVI...

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

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

快云科技,免云服务器75折优惠服务器快云21元/月

近日快云科技发布了最新的夏季优惠促销活动,主要针对旗下的香港CN2 GIA系列的VPS云服务器产品推送的最新的75折优惠码,国内回程三网CN2 GIA,平均延迟50ms以下,硬件配置方面采用E5 2696v2、E5 2696V4 铂金Platinum等,基于KVM虚拟架构,采用SSD硬盘存储,RAID10阵列保障数据安全,有需要香港免备案CN2服务器的朋友可以关注一下。快云科技怎么样?快云科技好不...

nokia s60为你推荐
解压程序下RAR那个解压软件拂晓雅阁推荐一些好玩的贴图论坛自助建站自助建站哪个平台最好?办公协同软件求一款国内知名的OA办公软件,谁知道有哪些呢?安装迅雷看看播放器怎样安装迅雷看看播放器商标注册查询官网如何在网上查询商标是否注册?iphone6上市时间iphone6什么时候上市,价格是多少?虚拟专用网拨号网络与虚拟专用网的区别电子商务网站模板电子商务网站策划书电子商务网站模板电子商务网站模板哪个好?电子商务网站模板免费建站怎么样?
域名网 重庆服务器租用 香港服务器租用99idc 重庆服务器托管 踢楼 香港机房 cloudstack parseerror 长沙服务器 炎黄盛世 合租空间 服务器维护方案 免费cdn gtt 电信主机 银盘服务是什么 创建邮箱 lamp什么意思 江苏徐州移动 镇江高防服务器 更多