ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:66.81KB ,
资源ID:18168449      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/18168449.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ActionScript3优化Word下载.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

ActionScript3优化Word下载.docx

1、当分析你的程序效能时,始终保证没有其他的Flash程序正在运行,因为它们可能会破坏你的指标。 随着CPU的使用率,预想它超过90的时候动画屏幕就黑屏了例如,如果您切换到另一个浏览器选项卡或向下滚动页面。较低的帧频导致它不会引起CPU密集型任务,但闪存节流下来的帧频无论每当你在看哪里。每当发生这种情况,等待几秒钟后的CPU使用率图,在正常的帧频开始工作后来使恢复到合适的CPU使用率值。 步骤二:这种代码会使我的flash看起来很“肥”吗? 下面是动画影片的源代码,它只有一个类,叫Flames,也是文档类。这个类包含了一些属性来追踪影片内存使用和CPU使用率历史,被用来画一个图表。内存和CPU使用

2、率数据的计算和更新都是在Flames.getStates() 这个函数中,并且图表是由Flames.drawGraph()逐帧绘制的,为了创造火焰效果,Flames.createParticles()这个函数首先每秒生成几百个粒子,粒子都被存储在fireParticles这个数组里。这个数组在Flames.drawParticles()中不断循环,用粒子属性创造效果。 花一点时间研究一下Flames这个类。你已经意识到任何迅速的变化在优化程序上还有很长的路要走吗?1. Packagecom.pjtops 2. Importflash.display.MovieClip; 3. Importfl

3、ash.events.Event;4. Importfl.motion.Color;5. Importflash.geom.Point;6. Importflash.geom.Rectangle;7. Importflash.text.TextField;8. Importflash.system.System;9. Importflash.utils.getTimer;10. 11. PublicclassFlamesextendsMovieClip 12. 13. PrivatevarmemoryLog=newArray();/storesSystem.totalMemoryvaluesf

4、ordisplayinthegraph14. Max0;highestvalueofrecordedsofar 15. Minlowest16. Color;colorusedbytextdisplayinginfo 17. 18. tickscountsnumbertimesgetStats()iscalledbeforenextframerateset 19. frameRate/theoriginalassetAdobeFlash 20. cpuLogcpugraph 21. cpuMax22. cpuMin23. cpuColor;cpu 24. cpu;currentcalculat

5、eduse25. 26. lastUpdatelasttimeframeratewascalculated 27. sampleSize30;lengthmemoryLog&cpuLog 28. graphHeight;29. graphWidth;30. 31. fireParticlesnewArray();allactiveflameparticles 32. fireMCMovieClip();canvasdrawingflames 33. paletteavailablecolors34. anchorshorizontalpointsalongwhichactlikemagnets

6、to35. frame;movieclipsboundingbox 36. 37. constructor.Setupevents,timersandobjects 38. PublicfunctionFlames() 39. addChildAt(fireMC,1);40. Rectangle(2,stage.stageWidth-stage.stageHeight2);41. 42. colWidthMath.floor(frame.width/10);43. for(i103. cpucpuMax104. cpuMaxTF.textcpuTF.text;105. 106. |=0) 10

7、7. cpucpuMin108. cpuMinTF.text109. 110. 111. 1000000;112. memoryLog.push(113. memoryTF.textString(memory.toFixed(1)mb114. memoryMax115. memorymemoryMaxmemory;116. memoryMaxTF.textmemoryTF.text;117. 118. memoryMin119. memorymemoryMin120. memoryMinTF.text121. 122. 123. 124. /rendersonscreen,thatshowst

8、rendsapplicationsconsumption 125. drawGraph(126. graphMC.graphics.clear();127. ypoint,xpoint;128. logSizememoryLog.length;129. 130. 131. memoryLog.shift();132. cpuLog.shift();133. sampleSize;134. 135. widthRatiographMC.widthlogSize;136. 137. graphMC.graphics.lineStyle(3,memoryColor,0.9);138. memoryR

9、angememoryMin;139. 140. ypoint(memoryLogi141. xpoint(isampleSize)142. 143. graphMC.graphics.moveTo(xpoint,-ypoint144. continue;145. 146. graphMC.graphics.lineTo(147. 148. 149. cpuColor,150. jcpuLog.length;j+151. cpuLogj100*152. 153. 154. 155. 156. 157. 158. 159. 160. 161. /renderseachparticleupdatesitvalues 162. drawParticles(163. createParticles(20);164. 165. fireMC.graphics.clear();166. variinfireParticles167. varparticlefireParticlesi;168. 169. if(particle.life0)170. delete(firePar

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1