PDA

View Full Version : A little help on the practical use of this script.



dynastyjp
October 1st, 2003, 04:13 PM
(MX)
on (release) {
_root.gotoAndPlay ("home");

function doneDelay(){
_root.contents.loadMovie("lance.swf");
clearInterval(delay);
}
delay = setInterval(doneDelay, 1000);
}

The above script works great, but how exactly do I apply this to all of my buttons so that each one functions in the same purpose. Example: I have button 1..obviously theres no need for the script as long as this button is clicked at first..but obviously most users don't go in order. So how is that I can apply this script to have my movie function the way I want it to. (fear's he's not making sense). What Im trying to do is have a transition for certain content to come in and a transition for the content to leave when a different is button is clicked..which loads an external .swf. Which is what the code above is for. But obviously there's a problem with this code if the user goes out ot order. And you can't apply more than one loadmovie function per button. So what is a trick to get around this problem..I dont think I'm making sense but I'm trying. Thanks in advance.

dynastyjp
October 1st, 2003, 04:54 PM
b1.onRelease = function() {
if (_root.section != "profile.swf") {
_root.section = "profile.swf";
_root.transition.gotoAndPlay("closing");
}
};
b2.onRelease = function() {
if (_root.section != "gallery.swf") {
_root.section = "gallery.swf";
_root.transition.gotoAndPlay("closing");
}
};
b3.onRelease = function() {
if (_root.section != "photos.swf") {
_root.section = "photos.swf";
_root.transition.gotoAndPlay("closing");
}
};


I got this script from a tutorial and I'm about to try it, is this something that I can use to solve my problem?