[MX] control the width of preloding bar

Hi every one :slight_smile:

I asked a week ago if i can add a
preloader bar to the transition
in the tutorial (Preloader and Transition
for Dynamic Files) and we did it with Claduio’s
help :).
when i made it i came with idea that require
me to adjast the width of the bar to a specific
points, please open the picture to see the situatuin

thanks in advance

whats the code on the mc???

the code is

[AS]onClipEvent (load) {
this._width = 0;
}[/AS]

Hi again :slight_smile:
this is the Fla and one swf file, the photo button only play :slight_smile:

any one help, please
i need it urgently :slight_smile:

can you just post your actionscript here, i know exactly whats wrong but i need to see what values you have in your actionscript.

you probably have something that looks kinda like this :

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent100;
this.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

so what you probably need to do is adjust the # value in the
"this.loadBar._width = getPercent*100;"
sections of your script.

…see if that helps.

The code is inside the Fla, please open it and see what is the problem

Ok, this is a very very messy file to do something so simple… a lot of this is not needed - its just a lot more confusing than it needs to be.

u can do this in a million ways.

1 problem u have is that your loading bar graphic is bigger than it needs to be… and that is gonna cause u problems.

I was inclined to tidy your code up a bit, but I couldn’t be botherred, so I have just alterred it slightly & fixed it instead.

Its attached.

You can see it here - http://www.Innovati0n.com/tester2

Thanks alot for your help, i will try to play with it :slight_smile:

thank u again :slight_smile: