Flash动画外文文献word版本.docx
《Flash动画外文文献word版本.docx》由会员分享,可在线阅读,更多相关《Flash动画外文文献word版本.docx(11页珍藏版)》请在冰点文库上搜索。
Flash动画外文文献word版本
Flash动画外文文献
Flashanimation
Inthemodernteaching,thetraditionalteachinghasalreadycannotsatisfytherequirementofmodernteaching,theteachingwayandteachersetcareputforwardhigherrequest,sofortheFlashanimationcoursewaredevelopmenthasaveryimportantsignificance.Flashcannotonlymakethelearnerstodeepentheunderstandingoftheknowledge,improvethelearninginterestofthestudentsandteachers'teachingefficiency,alsocanaddvividartisticeffectcourseware,conducetotheacademicknowledgeexpressionandcommunication.Inordertoprovidestudentswithintuitiveexperimentalprocess,improvetheirlearningefficiencyandflashanimationintheteachingapplicationisnecessary.Thispapertomakeproteinsdialysisanimationasanexample,introducedsimplyhavestrongabilityanduniqueinteractiveFlash8.0,discusseshowtousetheFlash8.0makeproteindialysisexperimentalanimationwholeprocessandrelatedmatters.
WhatisFlash
Flashisanauthoringtoolthatletsdesignersanddeveloperscreatepresentations,applications,andothercontentthatenablesuserinteraction.Flashprojectscanincludesimpleanimations,videocontent,complexpresentations,applications,andeverythinginbetween.Ingeneral,individualpiecesofcontentmadewithFlasharecalledapplications,eventhoughtheymightonlybeabasicanimation.Youcanmakemedia-richFlashapplicationsbyincludingpictures,sound,video,andspecialeffects.
FlashisextremelywellsuitedtocreatingcontentfordeliveryovertheInternetbecauseitsfilesareverysmall.Flashachievesthisthroughitsextensiveuseofvectorgraphics.Vectorgraphicsrequiresignificantlylessmemoryandstoragespacethanbitmapgraphicsbecausetheyarerepresentedbymathematicalformulasinsteadoflargedatasets.Bitmapgraphicsarelargerbecauseeachindividualpixelintheimagerequiresaseparatepieceofdatatorepresentit.
TobuildanapplicationinFlash,youcreategraphicswiththeFlashdrawingtoolsandimportadditionalmediaelementsintoyourFlashdocument.Next,youdefinehowandwhenyouwanttouseeachofthoseelementstocreatetheapplicationyouhaveinmind.
WhenyouauthorcontentinFlash,youworkinaFlashdocumentfile.Flashdocumentshavethefileextension.fla.AFlashdocumenthasfourmainparts:
TheStageiswhereyourgraphics,video,buttons,andsoonappearduringplayback.
TheTimelineiswhereyoutellFlashwhenyouwantthegraphicsandotherelementsofyourprojecttoappear.YoualsousetheTimelinetospecifythelayeringorderofgraphicsontheStage.Graphicsinhigherlayersappearontopofgraphicsinlowerlayers.
TheLibrarypaneliswhereFlashdisplaysalistofthemediaelementsinyourFlashdocument.
ActionScriptcodeallowsyoutoaddinteractivitytothemediaelementsinyourdocument.Forexample,youcanaddcodethatcausesabuttontodisplayanewimagewhentheuserclicksit.YoucanalsouseActionScripttoaddlogictoyourapplications.Logicenablesyourapplicationtobehaveindifferentwaysdependingontheuser’sactionsorotherconditions.FlashincludestwoversionsofActionScript,eachsuitedtoanauthor’sspecificneeds.FormoreinformationaboutwritingActionScript,seeLearningActionScript2.0inFlashintheHelppanel.
Flashincludesmanyfeaturesthatmakeitpowerfulbuteasytouse,suchasprebuiltdrag-and-dropuserinterfacecomponents,built-inbehaviorsthatletyoueasilyaddActionScripttoyourdocument,andspecialeffectsthatyoucanaddtomediaobjects.
WhenyouhavefinishedauthoringyourFlashdocument,youpublishitusingtheFile>Publishcommand.Thiscreatesacompressedversionofyourfilewiththeextension.swf.YoucanthenplaytheSWFfileinawebbrowserorasastand-aloneapplicationusingFlashPlayer.
WhatyoucandowithFlash
WiththewidearrayoffeaturesinFlash,youcancreatemanytypesofapplications.ThefollowingaresomeexamplesofthekindsofapplicationsFlashiscapableofgenerating:
AnimationsTheseincludebannerads,onlinegreetingcards,cartoons,andsoon.ManyothertypesofFlashapplicationsincludeanimationelementsaswell.
GamesManygamesarebuiltwithFlash.GamesusuallycombinetheanimationcapabilitiesofFlashwiththelogiccapabilitiesofActionScript.
UserinterfacesManywebsitedesignersuseFlashtodesignuserinterfaces.Theseincludesimplenavigationbarsaswellasmuchmorecomplexinterfaces.
FlexiblemessagingareasTheseareareasinwebpagesthatdesignersusefordisplayinginformationthatmaychangeovertime.Aflexiblemessagingarea(FMA)onarestaurantwebsitemightdisplayinformationabouteachday’smenuspecials.
RichInternetapplications
TheseincludeawidespectrumofapplicationsthatprovidearichuserinterfacefordisplayingandmanipulatingremotelystoreddataovertheInternet.ArichInternetapplicationcouldbeacalendarapplication,aprice-findingapplication,ashoppingcatalog,aneducationandtestingapplication,oranyotherapplicationthatpresentsremotedatawithagraphicallyrichinterface.
Dependingonyourprojectandyourworkingstyle,youmayusethesestepsinadifferentorder.AsyoubecomefamiliarwithFlashanditsworkflows,youwilldiscoverastyleofworkingthatsuitsyoubest.
AboutActionScriptandevents
InMacromediaFlashBasic8andMacromediaFlashProfessional8,ActionScriptcodeisexecutedwhenaneventoccurs:
forexample,whenamovieclipisloaded,whenakeyframeontheTimelineisentered,orwhentheuserclicksabutton.Eventscanbetriggeredeitherbytheuserorbythesystem.Usersclickmousebuttonsandpresskeys;thesystemtriggerseventswhenspecificconditionsaremetorprocessescompleted(themovieloads,theTimelinereachesacertainframe,agraphicfinishesdownloading,andsoon).
Whenaneventoccurs,youwriteaneventhandlertorespondtotheeventwithanaction.Understandingwhenandwhereeventsoccurwillhelpyoutodeterminehowandwhereyouwillrespondtotheeventwithanaction,andwhichActionScripttoolsshouldbeusedineachcase.
Eventscanbegroupedintoanumberofcategories:
mouseandkeyboardevents,whichoccurwhenauserinteractswithyourFlashapplicationviathemouseandkeyboard;clipevents,whichoccurwithinmovieclips;andframeevents,whichoccurwithinframesontheTimeline.
Mouseandkeyboardevents
AuserinteractingwithyourFlashmovieorapplicationtriggersmouseandkeyboardevents.Forexample,whentheuserrollsoverabutton,theon(rollOver)eventoccurs;whenabuttonisclicked,theon(press)eventoccurs;ifakeyonthekeyboardispressed,theon(keyPress)eventoccurs.Youcanattachscriptstohandletheseeventsandaddalltheinteractivityyoudesire.
Clipevents
Withinamovieclip,youmayreacttoanumberofclipeventsthataretriggeredwhentheuserentersorexitsthesceneorinteractswiththesceneusingthemouseorkeyboard.Youmight,forexample,loadanexternalSWFfileorJPGimageintothemovieclipwhentheuserentersthescene,orallowtheuser’smousemovementstorepositionelementsinthescene.
Frameevents
OnamainormovieclipTimeline,asystemeventoccurswhentheplayheadentersakeyframe—thisisknownasaframeevent.Frameeventsareusefulfortriggeringactionsbasedonthepassageoftime(movingthroughtheTimeline)orforinteractingwithelementsthatarecurrentlyvisibleonthestage.Whenyouaddascripttoakeyframe,itisexecutedwhenthekeyframeisreachedduringplayback.Ascriptattachedtoaframeiscalledaframescript.
Oneofthemostcommonusesofframescriptsistostoptheplaybackwhenacertainkeyframeisreached.Thisisdonewiththestop()function.Youselectakeyframeandthenaddthestop()functionasascriptelementintheActionspanel.
Onceyou’vestoppedthemovieatacertainkeyframe,youneedtotakesomeaction.Youcould,forexample,useaframescripttodynamicallyupdatethevalueofalabel,tomanagetheinteractionofelementsonthestage,andsoon.Formoreinformation,seeChapter5,“HandlingEvents,”onpage#.
OrganizingActionScriptcode
Youmayattachscriptstokeyframesandtoobjectinstances(movieclips,buttons,andothersymbols).However,ifyourActionScriptcodeisscatteredovermanykeyframesandobjectinstances,debuggingyourapplicationwillbemuchmoredifficult.ItwillalsobeimpossibletoshareyourcodebetweendifferentFlashapplications.Therefore,it’simportanttofollowbestpracticesforcodingwhenyoucreateActionScriptinFlash.
Ratherthanattachingyourscriptstoelementslikekeyframes,movieclips,andbuttons,youshouldrespondtoeventsbycallingfunctionsthatresideinacentrallocation.OnemethodistoattachembeddedActionScripttothefirstorsecondframeoftheTimelinewheneverpossiblesoyoudon’thavetosearchthroughtheFLAfiletofindallyourcode.AcommonpracticeistocreatealayercalledactionsandplaceyourActionScriptcodethere.
Whenyouattachallyourscriptstoindividualelements,you’reembeddingallyourcodeintheFLAfile.IfsharingyourcodebetweenotherFlashapplicationsisimportanttoyou,usetheScriptwindoworyourfavoritetexteditortocreateanexternalActionScript(AS)file.
Bycreatinganexternalfile,youmakeyourcodemoremodularandwellorganized.Asyourprojectgrows,thisconveniencebecomesmuchmoreusefulthanyoumightimagine.Anexternalfileaidsdebuggingandalsosourcecontrolmanagementifyou’reworkingonaprojectwithotherdevelopers.
TousetheActionScriptcodecontainedinanexternalASfile,youcreateascriptwithintheFLAfile