一篇計(jì)算機(jī)論文翻譯_第1頁(yè)
一篇計(jì)算機(jī)論文翻譯_第2頁(yè)
一篇計(jì)算機(jī)論文翻譯_第3頁(yè)
一篇計(jì)算機(jī)論文翻譯_第4頁(yè)
一篇計(jì)算機(jī)論文翻譯_第5頁(yè)
已閱讀5頁(yè),還剩16頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

Catalogabstract: 2chapter1Introduction 31.1Flashsoftwaredescription 31.2Flashpoint 31.3Flashgame 41.4FlashThedirectionofthegamedevelopment 4chapter2Thegamedesign 62.1Gameframework 62.2Thegame. 62.3Conversionbetweenthescenarios 6chapter3FlashTherealizationofthefunctionofthegame 73.1Themainscene 73.2Thefirstframe 83.3Thesecondframe 83.4Thethirdframe 9chapter4Summary 10

Abstract:Flashgameisanewformofthegame,thegameissimple,easytooperate,green,noneedtoinstalltheadvantagesofsmallsize,filenowgraduallybythemajorityofuserslove.Flashgamecalledflashsmallgame,becausethegameonflashismainlyappliedtosomeinteresting,smallgame,tofullyplayitsadvantagesbasedonvectormap.FlashgamebecauseofflashCS3andActionScript3,rapiddevelopmentinrecentyears,manyyoungpeopletojointhem,andplayanimportantroleinthewholeflashindustry.Flashplayeraccountedfor90%ofallInternetusersofthebrowser,sothedevelopmentofspaceisverylarge,withpromisingfuture.Keywords:flash,game,vector

Chapter1IntroductionFlashSoftwaredescriptionFlashwaslaunchedbyMacromedia'sinteractivevectorgraphicsandWebanimationstandards.WebpagedesignersuseFlashtocreatebeautifulandcanchangethesizeofthenavigationinterfaceandotherstrangeeffect.Flashisamemorychip,throughspecificprogramcanmodifythedata.Flashisanauthoringtool,designersanddeveloperscanuseittocreatepresentations,applicationsandothercontenttoallowuserinteraction.Flashcanincludesimpleanimation,videocontent,complexpresentations,applications,andanythinginbetween.EspeciallysuitableforcreatingFlashcontentavailablethroughInternet,becauseitsfilesareverysmall.Flashisthroughtheextensiveuseofvectorgraphicsdoit.Comparedwiththebitmapgraphics,vectorgraphicsneedsalotofmemoryandstoragespace,becausetheyarebasedonmathematicalformulasinsteadoflargedatasetstorepresent.Bitmapgraphicsarebigger,becauseeachpixelintheimageneedsaseparatesetofdatatorepresent.InFlashcontentcreation,needtoworkinaFlashdocumentfile.ExtendedFlashdocumentfilenameis.Fla.TheFlashdocumenthasfourmainparts:Thestageisdisplaygraphics,video,buttonsandothercontentduringplaybackposition.DothedetailedintroductiontothestageattheFlashfoundation.ThetimeaxisisusedtotelltheFlashtodisplaygraphicsandotherprojectsoftheelements,canalsousethetimelinespecifiedstagehierarchicalorderofeachgraph.Thehigherlayerislocatedabovethegraphicisdisplayedinthelowerlayergraph.ThelibrarypanelisFlashtodisplayalistofmediaelementsinanFlashdocumentlocation.ActionScriptcodecanbeusedtoaddinteractivecontenttomediaelementsinthedocument.Forexample,youcanaddcodetotheusertodisplayanewimageattheclickofabutton,youcanalsouseActionScripttoaddthelogictoapplication.Thelogicenabletheapplicationaccordingtotheuser'soperationandothercircumstancesofdifferentwaysofworking.FlashincludestwoversionsoftheActionScript,whichcanmeetthedifferentneedsofcreators.1.2ThecharacteristicsofFlashUsevectorgraphicsandstreamingtechnology.Andbitmapgraphics,vectorgraphicscanbescaledarbitrarilywithoutaffectingthesizeofgraphics;streamingtechnologymakesanimationwhileplayingwhiledownloading,therebyalleviatingWebpagebrowsersanxiouslywaitingforthemood.Throughtheuseofkeyframesandoperatormakesgeneratedanimation(.Swf)fileisverysmall,afewKbytesofanimationfilescanrealizemanypeopleHeartbeatanimationeffects,usedinWebpagedesigncannotonlymakeWebpagemorevivid,butlittleanddaintydownloadquickly,sothattheanimationcanbeplayedontheopenWebpageshorttime.Themusic,animation,soundeffects,interactivewaytogether,moreandmorepeoplehaveFlashasthepreferredtoolWebpageanimationdesign,andcansupportMP3musicformat,whichmakesaddingmusicanimationfilescanmaintainthecabinet'figure'.Stronganimationeditingfunctionsthatdesignerscandesignahigh-qualityanimation,throughtheACTIONandFSCOMMANDcanachieveinteractive,sothatFlashhasagreaterdegreeofdesignfreedom,inaddition,itisthemostpopularWebpagedesigntoolDreamweaverwithatacitagreement,canbedirectlyembeddedinanypositionWebpage,veryconvenient.1.3FlashGameFlashgameintheformsandtraditionalgame,basicallythesame,butmainlyexistinthenetwork,becauseofitssmallsize,fastspread,screenappearance,somuchtoreplacethetraditionalwebnettrendsbothathomeandabroad,nowFlashonlinegamesfornoreasonhasbecomeatrend,aslongasthebrowserinstalledADOBEFlashplayer,youcanplayalltheflashgames,thisisbetterthanthetraditionalwebnetswimstheprogressofmanyinformationgathering,requirementanalysisForFlashgames,comparedtothesameperiodcapacityistheminimum,andoccupiedaveryshorttime,canplayarelaxingentertainment,leisurephysicalandmentalfunction,whichhastheadvantagesofsmallvolume,goodcontent,NaiWan,entertaining,noagelevel,canmodifythedifficulty,goodphysicalandmentalhealth,thenumberofnewfeatures,gameplayrich.1.4ThedevelopmentdirectionofFlashgamesFlashisknownas"themostflexiblefront".Becauseofitsuniqueandtimesegmentsegmentation(TimeLine)andrecombinant(nestedMC)technology,combinedwiththeActionScitpobjectandprocesscontrol.Thedesignofinterfacedesignandanimationinaflexibleaspossible,buthasnotyetformedasetofinterfacedesigntheoryinflash.Atthesametimeitisalsothemostcompactfront.Flashhasthecharacteristicsofcrossplatform(thisislikeJava),sonomatterwhatplatformyouarein,aslongasyouhavethesupportofflashPlayerinstallation.Youcanensurethattheyshowtheeffectofthefinalagreement.RatherthanasinpreviousWebpagedesignasIEandMozillaordesignaversionoftheNetSpace.AswiththeJava.Itsportabilitystrong.Especiallyinthesmallnetworkofmediumandsmallequipment(ofcourse,alargenetworkhasbeenneedlesstosay),recentlyhasthemobilephonesupportfunctionallowsyoutoyourmobilephonedesignyourfavoritefunction.Ofcourse,youneedtohavesupportforflashmobilephone.Ofcourse,italsocanbeappliedtoPocketPC.UsingtheFLASHdevelopedanumberofcrossplatformnetworkgame,evenaslargeMMOR,afterthearrivalof3Gera,wecanplaytoalargenetworkgameonmobilephonesoon,theexistingFLASHnetworkgame:classSLG(threeblood),sports(blood,classRPG(ball)mortalcomprehension),desktop(Dezhoupoker),TD(defendtheirhomes)andsoon.FLASHgameofthepopularFLASHisthedevelopmentofWebpagerichmediaandinteractivitytechnology,originallyusedtodevelopinteractiveoranimatedwebcomponent,inrecentyearshasmakeaspurtofprogressofdevelopment.AccordingtothestatisticsofAdobe,thePCdesktop,Internetpenetrationratereachedastaggering99%,andJAVA85.1%.Atpresent,FLASHismorevigorouslytoPDAandintelligentmobilephoneterminaldevelopment.FLASHcontainsasetofprogrammablescriptparser,calledActionScript,withtheuseofJavaandJavascriptlikesyntax,cancontroltheFLASHanimation,toachieveavarietyofinteractivefunction.AS3.0alsosupportstheSocketnetworkfunction,whichmakesthedevelopmentoflarge-scaleinteractiveWebpagegamepossible.ByvirtueoftheexcellentperformanceofActionScript2.0andActionScript3.0,FLASHtechnologybecomesthetechnicalbasisofthevastmajorityofsmallgamedevelopment.TheFLASHparser,calledFlashPlayer,averysmallvolume.ItcannotonlysupportthepopularIEbrowser,canalsosupportFirefox,Opera,Safariandavarietyofbrowser,usersdownloadtheinstallationisveryconvenient.OneoftheimportantreasonsforthisisFlashlittlegamepopular.

chapter2Thegamedesign2.1GameframeworkThegameisdividedintotitles,thegameinterfaceandgameinterface.Titlesanimationplaybackfinishes,enteredthegameselectionscreen,thegameplayertochoosetoplaythegame.。2.2Thegame1.Titles:themovieimportandinsertthekeyframestomaketitleseffects.2.Themaininterfaceofthegame:autoplaymaininterfaceofthegameaftertheendofthegameinthetitles,themaininterfaceprovidesselectionbuttontoplaythegame.Dividedintotwobigbird,duck.pictureSTYLEREF1\s1SEQ圖\*ARABIC\s11Themaininterfaceofthegame2.3Conversionbetweenthescenarioson(release){ Mouse.show(); delete_root.onEnterFrame;for(i=1;i<100;i++) this["mc"+i].removeMovieClip(); _root.mc.swapDepths(1);removeMovieClip(_root.mc);gotoAndPlay

chapter3TherealizationofthefunctionoftheFlashgame3.1Themainscenefor(i=1;i<=5;i++){_root["face"].duplicateMovieClip("face"+i,i+1000,face);}varscore=0;/stop();onClipEvent(load){functionreset(){if(this._name=="face"){this._visible=false;}else{this._visible=true;}this.dead=0;this.speed=random(4)+5;this._x=600;this._y=random(400);/}this.reset();}onClipEvent(enterFrame){this._x-=this.speed;if(this._x<-100){this.reset();onClipEvent(load){startDrag(this,true);Mouse.hide();this.swapDepths(9999);}onClipEvent(mouseDown)playsounds=newSound(this);playsounds.attachSound("Gun_s");playsounds.start(0,1);//for(i=1;i<=5;i++){if(this.hitTest(_root["face"+i])&&_root["face"+i].dead==0){_root.score+=10;_root["face"+i].gotoAndPlay(2);}}3.2Thefirstframestop();readytime=0;ready=3;timer=0;time=0;_root.onEnterFrame=function(){readytime++;ready=3-int(readytime/5);if(ready==0){gotoAndStop(2);/delete_root.onEnterFrame;}};3.3Thesecondframestop();Mouse.hide();/score=0;functionfirstPos(){_root.bird._x=50+random(450);_root.bird._y=370;dirX=random(5)-random(6);}_root.target.onMouseMove=function(){this._x=_root._xmouse;this._y=_root._ymouse;updateAfterEvent();//};_root.target.onEnterFrame=function(){time++;_root.timer=30-int(time/30);if(_root.timer==0){_root.gotoAndPlay(}};_root.target.onMouseDown=function()/ playsounds=newSound(this);playsounds.attachSound("Gun_s");playsounds.start(0,1);/ _root.tan._x=_root._xmouse; _root.tan._y=_root._ymouse; _root.tan.play();// _root.onEnterFrame=function(){ if(_root.tan._currentframe==10){ hit=_root.tan.hitTest(_root.bird); if(hit){ firstPos(); _root.score++; with(_root.diebird){ _x=_root.tan._x; _y=_root.tan._y; gotoAndPlay(2); }}}};};/_root.bird.onEnterFrame=function(){ if(_root.bird._y<0||_root.bird._x<0||_root.bird._x>550){ firstPos(); }else{ _root.bird._y-=(5+random(2)); _root.bird._x+=dirX; }};3.4Thethirdframestop();_root.replay.onEnterFrame=function(){ if(_root.tan._currentframe==10){ hit2=_root.replay.hitTest(_root.tan); if(hit2){ _root.gotoAndStop(1); } }

chapter4SummaryTomakethreesmallgameIfurtherunderstandthattheFlashspecificfunctions,usingtheconversionfromtheframebyframeelements,fromthescriptcodetousethefunctionstatement,fromthemutualuseofguidinglayerandthelayermask,letmerealizethatmakingagameisnotthekindofsimple,thisduringtheencounteralotofnotknowledge,andthedifficultyofwritingcode,butbytheteacher,thestudents,andhelpthebooknetwork,slowlytosolvethesedifficulties.IntheproductionoftheFlashgame,involvesmanydetailsarealsomanyrequirementshaveaclearideaofeachanimationelementswillbeloadedfromtheproductiontounderstandthescript,tightnessofthefunctionrequirementsofthegame.Everyscene,everygametohittheproductionmusthavethebasicoperationofFlash,buttheknowledgeskillsareemphasizedindifferentareaisdifferent,Ifromthedeepproductionforhisworkexperience,thisismygraduationdesignthedeepestexperience.Throughthegraduationdesign,tounderstandthebasicoperationofFlash,thethreebasicfunctionsofFlashanimationisthebasisforallFlashapplications,infactIonFlashproductioncodeofprofessionalknowledgedonotunderstand,inthedesignofthecodehavemanyarethemostsimpleandcommonlyusedcode,seethesitedesign,Flashmasterinwebdesignideas,relatestothedetailsineach,Ifindalotofrelevantinformation,perhapsdonotgoodenough,butinthefutureIwillworkhard.

目錄摘要: 2第1章緒論 31.1Flash軟件簡(jiǎn)介 31.2Flash的特點(diǎn) 31.3Flash游戲 41.4Flash游戲的發(fā)展方向 4第2章游戲設(shè)計(jì)思路 52.1游戲的框架 52.2游戲的組成 52.3場(chǎng)景間的轉(zhuǎn)換 5第3章Flash游戲的功能實(shí)現(xiàn) 73.1主場(chǎng)景 73.2第一幀 83.3第二幀 83.4第三幀 9第4章總結(jié) 10

摘要:Flash游戲是一種新興起的游戲形式,以游戲簡(jiǎn)單,操作方便,綠色,無(wú)需安裝,文件體積小等優(yōu)點(diǎn)現(xiàn)在漸漸被廣大網(wǎng)友喜愛(ài)。Flash游戲又叫Flash小游戲,因?yàn)镕lash游戲主要應(yīng)用于一些趣味化的、小型的游戲之上,以完全發(fā)揮它基于矢量圖的優(yōu)勢(shì)。Flash游戲因?yàn)镕lashcs3和actionscript3.0的原因,在近年發(fā)展迅速,許多年青人投身其中,并在整個(gè)Flash行業(yè)中發(fā)揮重要作用。Flashplayer占據(jù)了90%互聯(lián)網(wǎng)用戶的瀏覽器,所以發(fā)的發(fā)展空間還十分巨大,前途不可估量。關(guān)鍵詞:Flash,游戲,矢量

緒論Flash軟件簡(jiǎn)介Flash是由macromedia公司推出的交互式矢量圖和Web動(dòng)畫(huà)的標(biāo)準(zhǔn)。網(wǎng)頁(yè)設(shè)計(jì)者使用Flash創(chuàng)作出既漂亮又可改變尺寸的導(dǎo)航界面以及其他奇特的效果。Flash也是存儲(chǔ)芯片的一種,通過(guò)特定的程序可以修改里面的數(shù)據(jù)。Flash是一種創(chuàng)作工具,設(shè)計(jì)人員和開(kāi)發(fā)人員可使用它來(lái)創(chuàng)建演示文稿、應(yīng)用程序和其它允許用戶交互的內(nèi)容。Flash可以包含簡(jiǎn)單的動(dòng)畫(huà)、視頻內(nèi)容、復(fù)雜演示文稿和應(yīng)用程序以及介于它們之間的任何內(nèi)容。Flash特別適用于創(chuàng)建通過(guò)Internet提供的內(nèi)容,因?yàn)樗奈募浅P lash是通過(guò)廣泛使用矢量圖形做到這一點(diǎn)的。與位圖圖形相比,矢量圖形需要的內(nèi)存和存儲(chǔ)空間小很多,因?yàn)樗鼈兪且詳?shù)學(xué)公式而不是大型數(shù)據(jù)集來(lái)表示的。位圖圖形之所以更大,是因?yàn)閳D像中的每個(gè)像素都需要一組單獨(dú)的數(shù)據(jù)來(lái)表示。在Flash中創(chuàng)作內(nèi)容時(shí),需要在Flash文檔文件中工作。Flash文檔的文件擴(kuò)展名為.fla。Flash文檔有四個(gè)主要部分:舞臺(tái)是在回放過(guò)程中顯示圖形、視頻、按鈕等內(nèi)容的位置。在Flash基礎(chǔ)中將對(duì)舞臺(tái)做詳細(xì)介紹。時(shí)間軸用來(lái)通知Flash顯示圖形和其它項(xiàng)目元素的時(shí)間,也可以使用時(shí)間軸指定舞臺(tái)上各圖形的分層順序。位于較高圖層中的圖形顯示在較低圖層中的圖形的上方。庫(kù)面板是Flash顯示Flash文檔中的媒體元素列表的位置。ActionScript代碼可用來(lái)向文檔中的媒體元素添加交互式內(nèi)容。例如,可以添加代碼以便用戶在單擊某按鈕時(shí)顯示一幅新圖像,還可以使用ActionScript向應(yīng)用程序添加邏輯。邏輯使應(yīng)用程序能夠根據(jù)用戶的操作和其它情況采取不同的工作方式。Flash包括兩個(gè)版本的ActionScript,可滿足創(chuàng)作者的不同具體需要。Flash的特點(diǎn)使用矢量圖形和流式播放技術(shù)。與位圖圖形不同的是,矢量圖形可以任意縮放尺寸而不影響圖形的質(zhì)量;流式播放技術(shù)使得動(dòng)畫(huà)可以邊播放邊下載,從而緩解了網(wǎng)頁(yè)瀏覽者焦急等待的情緒。通過(guò)使用關(guān)鍵幀和圖符使得所生成的動(dòng)畫(huà)(.swf)文件非常小,幾K字節(jié)的動(dòng)畫(huà)文件已經(jīng)可以實(shí)現(xiàn)許多令人心動(dòng)的動(dòng)畫(huà)效果,用在網(wǎng)頁(yè)設(shè)計(jì)上不僅可以使網(wǎng)頁(yè)更加生動(dòng),而且小巧玲瓏下載迅速,使得動(dòng)畫(huà)可以在打開(kāi)網(wǎng)頁(yè)很短的時(shí)間里就得以播放。把音樂(lè),動(dòng)畫(huà),聲效互方式融合在一起,越來(lái)越多的人已經(jīng)把Flash作為網(wǎng)頁(yè)動(dòng)畫(huà)設(shè)計(jì)的首選工具,而且可以支持MP3的音樂(lè)格式,這使得加入音樂(lè)的動(dòng)畫(huà)文件也能保持小巧的‘身材’。強(qiáng)大的動(dòng)畫(huà)編輯功能使得設(shè)計(jì)者可以隨心所欲地設(shè)計(jì)出高品質(zhì)的動(dòng)畫(huà),通過(guò)ACTION和FSCOMMAND可以實(shí)現(xiàn)交互性,使Flash具有更大的設(shè)計(jì)自由度,另外,它與當(dāng)今最流行的網(wǎng)頁(yè)設(shè)計(jì)工具Dreamweaver配合默契,可以直接嵌入網(wǎng)頁(yè)的任一位置,非常方便。Flash游戲Flash游戲在游戲形式上的表現(xiàn)與傳統(tǒng)游戲基本無(wú)異,但主要生存于網(wǎng)絡(luò)之上,因?yàn)樗捏w積小、傳播快、畫(huà)面美觀,所以大有取代傳統(tǒng)web網(wǎng)游的趨勢(shì),現(xiàn)在國(guó)內(nèi)外用Flash制作無(wú)端網(wǎng)游已經(jīng)成為一種趨勢(shì),只要瀏覽器安裝了ADOBE的Flashplayer,就可以玩所有的flash游戲了,這比傳統(tǒng)的web網(wǎng)游進(jìn)步許多信息資料收集,需求分析對(duì)于Flash游戲而言,容量同比來(lái)說(shuō)是最小的,而且占用時(shí)間很短,可以起到放松娛樂(lè),休閑身心的作用,其具體有體積小、內(nèi)容好、耐玩、娛樂(lè)性高、無(wú)年齡層次、能修改難度、有益身心健康、數(shù)量多、玩法豐富新穎等特色。Flash游戲的發(fā)展方向Flash被稱為是“最為靈活的前臺(tái)”。由于其獨(dú)特和時(shí)間片段分割(TimeLine)和重組(MC嵌套)技術(shù),結(jié)合ActionScitp的對(duì)象和流程控制。使得在靈活的界面設(shè)計(jì)和動(dòng)畫(huà)設(shè)計(jì)中成為可能,但一直還未形成一套在flash中的界面設(shè)計(jì)理論。同時(shí)它也是最為小巧的前臺(tái)。Flash具有跨平臺(tái)的特性(這點(diǎn)和Java一樣),所以無(wú)論你處于處于何種平臺(tái),只要你安裝有支持的flashPlayer。你就能保證它們的最終顯示效果都一致。而不必像在以前的網(wǎng)頁(yè)設(shè)計(jì)中那樣為IE和Mozilla或NetSpace各設(shè)計(jì)一個(gè)版本。同Java一樣。它的可移植性很強(qiáng)。特別是在小型網(wǎng)絡(luò)中和小型設(shè)備中(當(dāng)然大型網(wǎng)絡(luò)已不用說(shuō)),最近具有的手機(jī)支持功能可以讓你為自已的手機(jī)設(shè)計(jì)你喜愛(ài)的功能。當(dāng)然你必需要有支持flash的手機(jī)。當(dāng)然它還可以應(yīng)用于PocketPC上。目前利用FLASH開(kāi)發(fā)出了許多夸平臺(tái)的網(wǎng)絡(luò)游戲,甚至可以匹敵大型MMOR,在3G時(shí)代到來(lái)以后,我們很快可以在手機(jī)上玩到大型網(wǎng)絡(luò)游戲,現(xiàn)有的FLASH制作網(wǎng)絡(luò)游戲有:SLG類(熱血三國(guó)),體育類(熱血球球),RPG類(凡人修真),桌面(德州撲克),TD類(保衛(wèi)家園)等等.FLASH小游戲的流行FLASH是開(kāi)發(fā)的網(wǎng)頁(yè)富媒體及強(qiáng)交互技術(shù),最初用來(lái)研發(fā)交互式或動(dòng)畫(huà)網(wǎng)站組件,近幾年獲得了突飛猛進(jìn)的發(fā)展。根據(jù)Adobe公司的統(tǒng)計(jì),其互聯(lián)網(wǎng)PC桌面普及率達(dá)到了驚人的99%,而JAVA為85.1%。目前FLASH更在大力向PDA及智能手機(jī)終端發(fā)展。FLASH技術(shù)包含一套可編程腳本解析器,稱為ActionScript,使用與Java及Javascript類似語(yǔ)法,可以控制FLASH動(dòng)畫(huà),實(shí)現(xiàn)多種交互功能。AS3.0更支持了Socket聯(lián)網(wǎng)功能,使得開(kāi)發(fā)大型交互式網(wǎng)頁(yè)游戲成為可能。憑借ActionScript2.0及ActionScript3.0的出色表現(xiàn),F(xiàn)LASH技術(shù)成為了絕大多數(shù)小游戲開(kāi)發(fā)的技術(shù)基礎(chǔ)。FLASH的解析器,稱為FlashPlayer,體積十分小巧。不僅可以支持流行的IE瀏覽器,還可以支持Firefox,Opera,Safari等多款瀏覽器,用戶下載安裝非常方便。這也是Flash小游戲流行的重要原因之一。

第2章游戲設(shè)計(jì)思路2.1游戲的框架游戲分為片頭,游戲選擇主界面和游戲界面。片頭動(dòng)畫(huà)播放完后,進(jìn)入游戲選擇畫(huà)面,由玩家自主選擇試玩的游戲。如游戲框架所示。2.2游戲的組成1.片頭:利用影片導(dǎo)入和插入關(guān)鍵幀來(lái)制作片頭特效。2.游戲主界面:在片頭結(jié)束之后自動(dòng)播放游戲主界面,游戲主界面提供需要試玩的游戲的選擇按鈕。分為打鳥(niǎo),大鴨子兩種。如REF_Ref312694223\h圖11游戲主界面所示。圖STYLEREF1\s1SEQ圖\*ARABIC\s11游戲主界面游戲一:打鳥(niǎo)。游戲開(kāi)始后,會(huì)有鳥(niǎo)從右側(cè)飛出,玩家控制準(zhǔn)心點(diǎn)擊飛行的鳥(niǎo),將其擊落。此游戲沒(méi)有時(shí)間限制,分?jǐn)?shù)也沒(méi)有上限,直至玩家自行退出,屬于無(wú)聊發(fā)泄型游戲。游戲二:打鴨子。游戲開(kāi)始后,進(jìn)入3秒倒計(jì)時(shí),倒計(jì)時(shí)結(jié)束,在水中游的鴨子就會(huì)起飛,這時(shí)玩家可以控制準(zhǔn)心打擊飛起的鴨子,擊落1只得一分。游戲開(kāi)始后會(huì)進(jìn)入30秒計(jì)時(shí),時(shí)間到則游戲結(jié)束。2.3場(chǎng)景間的轉(zhuǎn)換主要用到gotoAndPlay動(dòng)作。on(release){ Mouse.show();//把玩游戲時(shí)隱藏的鼠標(biāo)再顯示出來(lái) delete_root.onEnterFrame;for(i=1;i<100;i++) this["mc"+i].removeMovieClip();//刪除在游戲里創(chuàng)建的MC _root.mc.swapDepths(1);//交換深度,深度設(shè)為正的才能刪除removeMovieClip(_root.mc);//刪除游戲里創(chuàng)建的MCgotoAndPlay("過(guò)場(chǎng)",1);//跳轉(zhuǎn)到過(guò)場(chǎng)1的第一幀}

第三章Flash游戲的功能實(shí)現(xiàn)3.1主場(chǎng)景在主場(chǎng)景第一幀添加代碼:for(i=1;i<=5;i++){_root["face"].duplicateMovieClip("face"+i,i+1000,face);//復(fù)制face元件}varscore=0;//定義分?jǐn)?shù)從0開(kāi)始stop();將小鳥(niǎo)元件拖入主場(chǎng)景,并添加代碼:onClipEvent(load){functionreset(){if(this._name=="face"){this._visible=false;}else{this._visible=true;}this.dead=0;this.speed=random(4)+5;//小鳥(niǎo)飛行速度this._x=600;this._y=random(400);//定義小鳥(niǎo)隨機(jī)飛行坐標(biāo)}this.reset();}onClipEvent(enterFrame){this._x-=this.speed;if(this._x<-100){this.reset();//小鳥(niǎo)超出屏幕范圍后重置}}將準(zhǔn)心元件拖入主場(chǎng)景,并添加代碼:onClipEvent(load){startDrag(this,true);Mouse.hide();this.swapDepths(9999);//在場(chǎng)景上生成MC,隱藏鼠標(biāo),并定義MC深度}onClipEvent(mouseDown)//鼠標(biāo)按下動(dòng)作{playsounds=newSound(this);playsounds.attachSound("Gun_s");playsounds.start(0,1);//播放槍聲for(i=1;i<=5;i++){if(this.hitTest(_root["face"+i])&&_root["face"+i].dead==0){_root.score+=10;//打中小鳥(niǎo)加分_root["face"+i].gotoAndPlay(2);//繼續(xù)生成小鳥(niǎo)}}}3.2第一幀stop();readytime=0;

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論