FLASH CS6怎么用这个脚本制作loading动画
1个回答
2013-08-31
展开全部
使用percentLoaded的值。
////eg..
import flash.display.Shape;
import flash.events.ProgressEvent;
var bg:Shape=new Shape();
addChild(bg);
bg.graphics.lineStyle(0);
bg.graphics.drawRect(0,0,100,20);
bg.graphics.endFill();
var bar:Shape=new Shape();
addChild(bar);
function loadProgress(event:ProgressEvent):void
{
//............
bar.graphics.beginFill(0x00ff00);
bar.graphics.drawRect(0,0,100*(percentLoaded/100),20);
bar.graphics.endFill();
}
////eg..
import flash.display.Shape;
import flash.events.ProgressEvent;
var bg:Shape=new Shape();
addChild(bg);
bg.graphics.lineStyle(0);
bg.graphics.drawRect(0,0,100,20);
bg.graphics.endFill();
var bar:Shape=new Shape();
addChild(bar);
function loadProgress(event:ProgressEvent):void
{
//............
bar.graphics.beginFill(0x00ff00);
bar.graphics.drawRect(0,0,100*(percentLoaded/100),20);
bar.graphics.endFill();
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询