本站首页    管理页面    写新日志    退出


«September 2025»
123456
78910111213
14151617181920
21222324252627
282930


公告
================

注会练习软件
http://www.cpasoft.com.cn
我的注会软件官网

http://blog.163.com/abc7105@126/

 

 


哈哈,热爱快“过气”的DELPHI


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:注册会计师(注会)练习软件
日志总数:398
评论数量:116
留言数量:27
访问次数:3269931
建立时间:2005年6月6日




一段flash 代码研究
软件技术

吕向阳 发表于 2005/10/30 22:36:58

以下代码摘自 flash模板生成的flash文件,有些值得借鉴 function updateFrame (inc) { // send slides to new frame newFrame = _root._currentFrame + inc; _root.gotoAndStop(newFrame);  updateStatus(); //**************************自己的注释 //prevbtn为一个动画剪辑中嵌套的一个影片剪辑,且这个影片剪辑还在其下嵌套有一个按钮,这个按钮有两种不同的状态在不同的影格里.  prevBtn.gotoAndStop(2);就是指跳到它的第二格. //_currentframe为当前影帧 比较符号== 赋值= //_root为根,_parent为上一级 //比较典型的精巧的结构化编程,这些代码出现在主动画的第一帧 //**********************************  if (_root._currentFrame == 1) {  prevBtn.gotoAndStop(2); } else {  prevBtn.gotoAndStop(1); } if (_root._currentFrame == _root._totalFrames) {  nextBtn.gotoAndStop(2); } else {  nextBtn.gotoAndStop(1); }} function updateStatus () { _root.statusField = _root._currentFrame + " of " + _root._totalFrames;} function autoplayInit () { startTime = getTimer(); hideControls(); updateStatus();} function autoplay () { if (autoplayStatus != 0) {  // get the current time and elapsed time  curTime = getTimer();  elapsedTime = curTime-startTime;   // update timer indicator  indicatorFrame = int(4/(delay/(elapsedTime/1000)));  indicator.gotoAndStop(indicatorFrame+1);   // if delay time if met, goto next photo  if (elapsedTime >= (delay*1000)) {   if (_root._currentframe == _root._totalframes) {    _root.gotoAndStop(1);   } else {    _root.nextFrame();   }   autoplayInit();  } }} function hideControls () { nextBtn.gotoAndStop(2); prevBtn.gotoAndStop(2);} updateFrame();autoplayStatus = 0;


阅读全文(1414) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.231 second(s), page refreshed 144769797 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号