PDA

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


Dax7777
01-24-2003, 10:40 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. Am i adding the actionscript in the right place.

My preloader works exactly as 2advanced.com i wanted to do the same and the continue would work exactly as the enter in the 2advanced.com site.

please help me explain to me like a beginner since i am. thank you.

Dax.

linckx
02-06-2003, 08:50 PM
mouse events shouldn't be used in buttons but on buttons:

select your button, press f9 and then insert your code;

btw: I know you PM-med me once, crossposted 16 times or so, and now you put your request in the wrong place...
I ain't gonna start nagging at you, but things like this should be posted in the 'beginners' section. And ONLY in one section. this will give you a much bigger chance on a decent reply...

robin