Topic: Change the preloader color

Hi,

i want to change the preloader color, I check in the graphical element in the .fla and in the Image.as, i fond the function but nothing about the color.

i use the pro version, please help.

Re: Change the preloader color

Code related to the SWF and XML preloader is contained in the FLA. The preloader code is placed on the 'actionscript' layer on the main timeline of the the FLA.

Felix Turner
SimpleViewer Support Team.

Re: Change the preloader color

i saw this code Felix:


var IS_PRO:Boolean = true;

//initialize stage properties
//_quality =  "best"; //defaults to "HIGH"
Stage.align = "TL";
Stage.scaleMode = "noScale";
stop();
   
mcLogo._visible = !IS_PRO;
   
//center preloader
if (_global.AVStageWidth != undefined){
    mcLogo._x = Math.floor((_global.AVStageWidth - mcLogo._width)/2);
    mcLogo._y =  Math.floor((_global.AVStageHeight- mcLogo._height)/2);
}else{
    mcLogo._x =  Math.floor((Stage.width- mcLogo._width)/2);
    mcLogo._y =  Math.floor((Stage.height- mcLogo._height)/2);
}

//initialize preloader
mcLogo.onEnterFrame = function(){
    var fraction = this._parent.getBytesLoaded()/this._parent.getBytesTotal();
    if (fraction == 1) this._parent.gotoAndStop("main");


BUT there is no color code here!

With the FLa source i can change the color aspect of all the button but no the preloader..any idea???

Re: Change the preloader color

Hi,

are you referring to the pie image preloaders? The color for these matches the frameColor option. To change the color, change line 148 in 'Image.as', from this:

mImgLoadStatus_mc.beginFill(mXMLManager.frameColor,95);

to this:

mImgLoadStatus_mc.beginFill(0xFF00FF,95);

where '0xFF00FF' is the color you want.

Felix Turner
SimpleViewer Support Team.