Comunidad de diseño web y desarrollo en internet online

ayuda con un progressbar

Citar            
MensajeEscrito el 31 Ene 2009 09:45 pm
señores ayuda por favor ayuda esk necesito hacer k un texto k marca el porcentaje siga a la barra de progressbar y ya tengo todo pero el texto no sigue al progressbar si alguien me puediera ayudar por favor estes es el codigo k estoy manejando

pd: no estoy haciendo el progressbar con frames sino con action script

function startLoading(movie)
{
_mc.loadMovie(movie);
onEnterFrame = function ()
{
infoLoaded = _mc.getBytesLoaded();
infoTotal = _mc.getBytesTotal();
percentage = Math.floor(infoLoaded / infoTotal * 100);
_loader._bar.Wpos = percentage;
_loader._text = Math.round(_loader._bar._width) + "%";
if (Math.round(_loader._bar._width) >= 100)
{
delete this.onEnterFrame;
_loader._visible = false;
_mc._alpha = 100;
_mc.gotoAndPlay(2);
} // end if
};
} // End of the function
Stage.scaleMode = "noScale";
Stage.align = "TL";
setStage = function ()
{
sw = Stage.width;
sh = Stage.height;
_loader._x = Math.round(sw / 2);
_loader._y = Math.round(sh / 2);
};
var stageListener = new Object();
Stage.addListener(stageListener);
stageListener.onResize = setStage;
setStage();
_loader._visible = true;
_mc._lockroot = true;
_mc._alpha = 0;
movie = "index.swf";
startLoading(movie);


kiero k el texto de porcentaje "_text" siga al progresbar porfavor ayuda

Por tjmysteri

Claber

138 de clabLevel



 

msie7
Citar            
MensajeEscrito el 03 Feb 2009 04:50 am
prueba con:

Código ActionScript :

 _loader._text = Math.floor( percentage ) + "%";
Suerte.

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.