梦幻之旅

DEBUG - 天道酬勤

   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  671 随笔 :: 6 文章 :: 256 评论 :: 0 Trackbacks
<2009年9月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

公告

本博客中未注原创的文章均为转载,对转载内容可能做了些修改和增加图片注释,如果侵犯了您的版权,或没有注明原作者,请谅解

常用链接

留言簿(21)

随笔分类(644)

随笔档案(669)

文章档案(6)

最新随笔

积分与排名

最新评论

阅读排行榜

评论排行榜

package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.text.TextField;

    public class MovingText extends Sprite
    
{
        private 
var txt:TextField;
        private 
var info:String;
        private 
var ti:uint;
        
        public 
function MovingText()
        
{
            txt 
= new TextField();
            txt.width 
=100;
            txt.textColor
=0xffff00;
            txt.selectable
=false;
            
            txt.x
=10;
            txt.y
=100;
            
this.addChild(txt);
            
            info
="There is not way that a bee cound bee able to fly";
            info 
+= "Their wings are too small to get it's fat little body off the ground.";
            
            ti
=0;
            
this.stage.frameRate=10;
            
this.addEventListener(Event.ENTER_FRAME,enterFrame);
        }

        
        public 
function enterFrame(e:Event):void
        
{
            txt.text 
= info.substr(++ti,20);
            
if(ti>=info.length)
            
{
                 ti
=0;
            }

        }

    }

}


posted on 2009-09-12 18:55 HUIKK 阅读(233) 评论(0)  编辑  收藏 所属分类: FLASH

只有注册用户登录后才能发表评论。


网站导航: