PDA

View Full Version : preloader if statement button visible trouble


CoinOperatedBoy
11-11-2004, 06:39 PM
Good day all,

im new, and new to flash and actionscript. i wont pretend i know anything about it, coz to be honest i know next to nothing about actionscript. so heres my problem:

i have a preloader that i want so that when its finished loading it shows a button so the user can continue.
so far i have this code on my preloader movie:


onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
if (percent>99) {
_root.continue_btn._visible = "false");
}


i have it set to make the button invisible but thats just so i can find out when the code is actually working, i need it to make the button visible.

also i need the button to be invisible to start with.

any help would really be appreicated.

thanks.


Coin Operated Boy

Jahepi
11-11-2004, 09:44 PM
Maybe this would help:

onClipEvent (load) {
_root.continue_btn._visible = false;
}
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent = (loading/total)*100;
per = int(percent);
percentage = per+"%";
if (percent>99) {
_root.continue_btn._visible = true;
}
}

CoinOperatedBoy
11-12-2004, 04:21 PM
thanks for you help.

that code was usefull, i also had problems with my instance naming, but its all sorted now, its all great and working.

Thanks.


Coin Operated Boy