Haiat
28.01.2008, 22:54
Как только прелоадер начинает показывать почекму то сбрасываются форматы текста.Что нужно каждый кадр его снова ставиьт?так же не должно быть.Скажите пожалуйста
function preloader() {
var format:TextFormat = new TextFormat();
format.size = 20;
format.font = "Verdana";
format.align = "center";
_root.createTextField("preloader_txt", _root.getNextHighestDepth(), Stage.width/2, Stage.height/2, 0, 0);
_root.preloader_txt.setTextFormat(format);
_root.preloader_txt.text = "LOADING "+0+"%";
_root.preloader_txt.autoSize = true;
_root.preloader_txt._x = Stage.width/2-_root.preloader_txt._width/2;
_root.preloader_txt._y = Stage.height/2-_root.preloader_txt._height/2;
_root.onResize = function() {
_root.preloader_txt._x = Stage.width/2-_root.preloader_txt._width/2;
_root.preloader_txt._y = Stage.height/2-_root.preloader_txt._height/2;
};
Stage.addListener(_root);
_root.createEmptyMovieClip("a1", _root.getNextHighestDepth());
_root.onEnterFrame = function() {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
delete _root.onEnterFrame;
_root.preloader_txt.removeTextField();
} else {
_root.preloader_txt.text ="LOADING "+Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%";
}
};
}
function preloader() {
var format:TextFormat = new TextFormat();
format.size = 20;
format.font = "Verdana";
format.align = "center";
_root.createTextField("preloader_txt", _root.getNextHighestDepth(), Stage.width/2, Stage.height/2, 0, 0);
_root.preloader_txt.setTextFormat(format);
_root.preloader_txt.text = "LOADING "+0+"%";
_root.preloader_txt.autoSize = true;
_root.preloader_txt._x = Stage.width/2-_root.preloader_txt._width/2;
_root.preloader_txt._y = Stage.height/2-_root.preloader_txt._height/2;
_root.onResize = function() {
_root.preloader_txt._x = Stage.width/2-_root.preloader_txt._width/2;
_root.preloader_txt._y = Stage.height/2-_root.preloader_txt._height/2;
};
Stage.addListener(_root);
_root.createEmptyMovieClip("a1", _root.getNextHighestDepth());
_root.onEnterFrame = function() {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
delete _root.onEnterFrame;
_root.preloader_txt.removeTextField();
} else {
_root.preloader_txt.text ="LOADING "+Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%";
}
};
}