Hello, my code is working fine. I would just like to add a feature that tells my movie to automatically load one of the swf’s when the site is accessed, so right when you enter you see an initial loaded swf.
Any quick help would be much appreciated as I have to finish this tonight!!! I bet it’s probably a simple way to load the movie… but I just don’t know where to put it cause there’s so much other stuff going on in my code. I’m newby-ish.
here is AS I have now:
// your button is in fact a movie clip with 3 frames
// frame 1 is normal state
// frame 2 is over state
// frame 3 is visited state
// name your buttons button1, button2, button3 and so on…
//
total = 60;
// number of buttons
movies_array = [“pic1.swf”, “pic2.swf”, “pic3.swf”, “pic4.swf”, “pic5.swf”, “pic6.swf”, “pic7swf”, “pic8swf”, “pic9.swf”, “pic10.swf”, “pic11.swf”, “pic12.swf”, “pic13.swf”, “pic14.swf”, “pic15.swf”, “pic16.swf”, “pic17.swf”, “pic18.swf”, “pic19.swf”, “pic20.swf”, “pic21.swf”, “pic22.swf”, “pic23.swf”, “pic24.swf”, “pic25.swf”, “pic26.swf”, “pic27.swf”, “pic28.swf”, “pic29.swf”, “pic30.swf”, “pic31.swf”, “pic32.swf”, “pic33.swf”, “pic34.swf”, “pic35.swf”, “pic36.swf”, “pic37swf”, “pic38swf”, “pic39.swf”, “pic40.swf”, “pic41.swf”, “pic42.swf”, “pic43.swf”, “pic44.swf”, “pic45.swf”, “pic46.swf”, “pic47.swf”, “pic48.swf”, “pic49.swf”, “pic50.swf”, “pic51.swf”, “pic52.swf”, “pic53.swf”, “pic54.swf”, “pic55.swf”, “pic56.swf”, “pic57.swf”, “pic58.swf”, “pic59.swf”, “pic60.swf”];
// array containing the movies
this.onEnterFrame = function() {
for (var i = 1; i<=total; i++) {
if (this[“button”+i]._currentframe != 3) {
if (this[“button”+i].hitTest(_root._xmouse, _root._ymouse, false)) {
this[“button”+i].gotoAndStop(2);
} else {
this[“button”+i].gotoAndStop(1);
}
}
}
};
for (var i = 1; i<=total; i++) {
this[“button”+i].temp = i;
this[“button”+i].onPress = function() {
this.gotoAndStop(3);
if (_root.currMovie == undefined) {
_root.currMovie = “pic”+this.temp;
loadMovieNum(movies_array[this.temp-1], 100);
} else if (_root.currMovie != “pic”+this.temp) {
if (_level100._currentframe>=_level100.midframe) {
_root.currMovie = “pic”+this.temp;
_level100.play();
}
}
};
}