PDA

View Full Version : Preload Make wather reflection


hsoares
02-07-2006, 03:49 PM
Hello friends.

i am making a preload with a mask that works fine.

Now i want to make the exactly object reflect, at the same time it load's.

It is possible?

Were it is the preload.as

var preloader:MovieClip;
// The Movieclip
var numero:Number = new Number(0);
// Var numero that begins with zero
function Init() {
// Func Init
_root.stop();
// Stop de Movive
onEnterFrame = function () {
// Exe. the function
var bl:Number = _root.getBytesLoaded();
// bl recives the loaded bytes
var bt:Number = _root.getBytesTotal();
// bt recives the total butes
if (bl>4 && bt>4 && bl>=bt) {
// If the bytes loaded > then 4 and the total bytes > then 4 and loaded bytes > total bytes
// Se os bytes carregados forem maior que 4 e os bytes totais forem maior que 4 e bytes carregados forem maior que bytes totais
delete onEnterFrame;
// delete the envent EnterFrame
//_root.nextFrame();
_root.gotoAndStop(4);
// goto do Frame 4 and Stop
preloader.unloadMovie();
// Clear Movieclip from the cash
} else {
//
numero = Math.round(bl/bt*100);
//the var numero recives de round loaded bytes divided by the total bytes and * by 100
// A variável numero vai receber o arredondamento dos bytes carregados divididos pelos bytes total multiplicados por 100
preloader.pct = numero+'%';
// in the fiel "pct" recives de var numero and %
// O campo dinâmico vai receber a variável numero mais o caracter %
preloader.barra._yscale = bl*.18;
//first bar that is masked by a three
preloader.barra2._yscale = bl*.18 ;
//Second bar the reflex

//trace(numero);
//trace(getBytesLoaded)
// The size of the bar will be the numero value
// O tamanho da barra será o valor da variável número
}
};
}
Init();