做一个100桢的MC动画;可以包含一个text的动态文本区。
把该MC拖入主场景的首桢,并在首桢添加Stop,在该MC上加上如下代码:
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}