资源描述:
《计算机科学与技术外文翻译》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、毕业设计(论文)外文资料原文及译文专业计算机科学与技术班级学号姓名高芸芸指导教师吴敏毕业设计(论文)外文资料原文原文出处:Flash8ActionScriptBible,JoeyLottandRobertReinhardt,PublishedbyWileyPublishing,Inc.Flash8ActionScriptBibleJoeyLottandRobertReinhardtUnderstandingDatatypesWhenwetalkaboutdata,we’retalkingaboutinformati
2、onorvalues.Thesevaluescanbeofmanytypes.Forexample,eveninaverysimplemovieyoumightstillhaveanumber,sometext,andaMovieClipinstance.Allthreeoftheseexamplesaredataofdifferenttypes—whatActionScriptcallsdatatypes.Flashisactuallycapableofperformingdatatypeconversionsw
3、hennecessary.However,thiscanleadtosomepoorcodingpracticesonthepartofActionScriptdevelopers.Forthisreason,theActionScript2.0standardsrequirethatyoupaycloserattentiontothedatatypesyouareusing.InActionScript,you’llworkwithmanydifferentdatatypes.However,forthesake
4、ofunderstandinghowthesedatatypeswork,youcanconsiderthemintwobasiccategories:primitivetypesandreferencetypes.Theprimitivetypesarecalledprimitivebecausetheyarethebasicfoundationaldatatypes,notbecausetheylackimportance.Thereferencedatatypesarecalledreferencetypes
5、becausetheyreferencetheprimitivetypes.Primitivedatatypesincludestrings,numbers,Booleans,undefined,andnull.We’llexamineeachoftheseprimitivedatatypesalittlemorecloselyinthischapter.Referencedatatypesareallobjects,whichisthesubjectofmuchoftherestofthisbook,sowe’l
6、ldeferthemajorityofthediscussionofreferencedatatypestothoselaterchapters.WorkingwithStringsStringsarecharactersorwords.Stringvaluesmustalwaysbeenclosedineithersinglequotesordoublequotes.Hereareafewexamplesofstrings:“a”‘b’“1”“Joey”‘123’‘abc’“****”Stringsareused
7、wheneveryouwanttoworkwithcharactersorwords.Forexample,youcanusestringstopopulatetextfieldsinyourmovie,oryoucanusestringstoprogrammaticallycreatenamesfornewMovieClipinstances.You’vealsoalreadyseenhowstringscanbeused14毕业设计(论文)外文资料原文withactionssuchastrace().Thetr
8、ace()actionrequiresthatyouprovideitwithamessagetodisplayintheOutputpanel.Thatmessagemustevaluatetoastringvalue.trace(“Iknowhim;Marley’sGhost!”);Asalreadymentioned,youcanuseeitherdo