Question

I’ve asked this before, but it wasn’t the way i wanted it to.

How do you create a preload bar, showing the percentage? Just the number without any % sign after the number.

I want the number to scroll simultaneously at the bottom with the bar.

Jenniferlopez.com has this type of preload. Thanks.

Well there are a lot of tutorials on preloaders, but using this one:
http://www.kirupa.com/developer/mx/percentagepreloader.htm

just change this line:

this.loadText = Math.round(getPercent*100)+"%";

to:

this.loadText = Math.round(getPercent*100)+"%

And that gives you just the number…

And to make it move with the bar, you can make the dynamic textbox into a movieclip, and link their x coordinates…

Hey thanks a lot, but I dont’ know how to link the text. I can’t do any actionscript. could you help me out?

hmm, i’ll havta think about that since i’m not too sure. But try this:

[AS]
this.onEnterFrame = function() {
this._x += this.loadBar._width
}
[/AS]

It might work, most likely not since nothing ever does until i actually try it :P, and i can’t really be stuffed to try it at the moment, so just post the fla after you’ve tried it and i’ll work from there :slight_smile:

oh yea, in the last post, i just noticed both the lines i gave you were the same. You’re suppose to change the line to:

[AS]
this.loadText = Math.round(getPercent*100)
[/AS]

Hmm ok thinking about the first code i gave you again, its definately not going to work :-\

EDIT:
maybe try:

this._x += getpercent*100

that might work but maybe not either :-\

Try this instead:

[AS]this.onEnterFrame = function() {
this._x = this.loadBar._x + widthofloadbar;
}
[/AS]

This should work if the registration point is on the left. If it’s in the middle, add “/2” at the end of widthofloadbar and if the registration point is at the right, delete “+ widthofloadbar”.

Untested though …

oh yeah, yea i think that would work :stuck_out_tongue:

Am I suppose to make the dynamic text into a movie clip?

Then apply this action to the first perload frame, but to the same layer as the loadText?

Yes to all your questions :slight_smile: doesn’t havta be on same layer though, better to put all your actions on a layer called “AS” or “Code” or somethin…

That doesn’t work, it blanks out my preload bar.

can i see yor fla

You got Icq or MSN? Or any IM?

Doesn’t it work on here? tried zippin it?

Don’t want to give it out, that’s all.

Cut out some stuff and resave it, i just can’t be bothered to start everythin from scratch to test the code :stuck_out_tongue:

Actually, here you go… never mind.

.rar?? how do i open this type of file?!

Okay… still old school I see.

eh? old school? i guess :-\

Heres your thing, very nice begining part (but looks a bit like the old 2Advanced :-)…

Thanks a lot, it worked!

Now, that’s solved.

Yah, I’m starting a new one. I hate when I do that. I spent two weeks on that, and I start a new one.