PDA

View Full Version : please help me!!! adding a button (continue in a preloader but doesnt work!!!!


Dax7777
01-24-2003, 06:36 PM
Hi, please i need serious help. I have added a preloader with percentage at the begining of my 1 scene which i named preloader. My second scene i named intro and works fine while in test mode. But my serious problem is the button.i have tried everything.

frame one:

loadpercent = "0%";
loadBytes = "0 of " + Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000 + " Kb";

then frame 2:

loadPercent = (Math.floor (_root.getBytesLoaded() / _root.getBytesTotal() * 100) + "%");
loadBytes = (Math.round((_root.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");

if (_root.getBytesLoaded() == _root.getBytesTotal()){ //Check for finished loading
//If loaded, final update to fields
loadPercent = "100%";
loadBytes = (Math.round((_root.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");
gotoAndPlay("mybutton"); //Where to go once your movie is loaded

}

frame three:

gotoAndPlay(2);

and frame 4 which is only a stop();

very important i am using FLASH MX.

i want a button called continue in the last frame to direct the preloader to play the intro. I have tried everything.
in one case i tried to add onpress and onrelease and the script had errors by saying that i could not use mouse events in a button instance. Please let me know if i am doing it right

Dax.

catbert303
01-29-2003, 12:27 AM
I assume frame 4 has the label mybutton on it,

if so in frame 4 you can create a new button, insert > new symbol > button then place a copy of this on the timeline.

next right click on the button, select actions and enter,

on (release) {
_root.gotoAndPlay("intro");
}

finally go to the first frame of your intro scene and add the frame label intro.