PDA

View Full Version : Preloader screws up buttons


K Rice
04-24-2002, 02:16 AM
Hello,

I'm trying to put a preloader on a Flash 5 movie I made. I followed this tutorial:http://www.actionscripts.org/tutorials/intermediate/flash5_preloaders/index.shtml

The buttons in my movie go to and play at 3 different frames. After I add the preloader, they don't work anymore. You can see my movie at: http://www21.brinkster.com/dubmasterkay/jportfolio.htm

This movie shows how the buttons work before I add the preloader. Just click "Design", then click "Ads". The 3 buttons that slide out are the ones that no longer work. What happens is that the left one and the middle one seem to go to and play the same frame, and the one on the right ends up playing the frame that the center button should go to. Weird, huh?

If anyone wants to take a look at the raw file, then I'll send it to you, or whatever. I'm confused, though. I tried adding this preloader twice and it did the same thing to my original movie scene both times...

Thanks for any help.

Jesse
04-24-2002, 06:43 AM
How do the buttons work? Ar ethey calling frames by nu mber, or scene name or label, or what? I can only think that perhaps your frame number order has been changed by adding the preloader frames (or scene) at the beginning... Check that.

K Rice
04-24-2002, 04:28 PM
The buttons go to and play different frames (by number) later in the timeline in the same scene. There are only two scenes in the movie. Mine and the preloader scene.

I figured out exactly when these buttons stop working. It's when I add this code:

total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);

bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 1", 180) {
gotoAndPlay ("Scene 1", 1);
}

I checked the amount of frames in my scene and they are still 180. Strange, huh?

I tried to attach a screenshot of the timeline here. If it didn't work, and you wanna see it, let me know.

I'm sure I'm just doing something wrong. I checked the actual tutorial that I downloaded, and everything seems to be the same in my movie.



Any help is appreciated! ;)

Billy T
04-25-2002, 02:58 AM
if you are using goto frame then flash counts all the frames in your movie, including the ones in your preloader scene

therefore frame 20 in your scene is actually frame 23 or something...

I highly recommend that you use frame labels and put it all (including the preloader) into the 1 scene

cheers

K Rice
04-25-2002, 04:21 PM
Billy T:

Ah, well, that makes sense. I'll try that. I've never used frame labels before. Sounds like the better way to go. I'm still very new at this, and, frankly, I didn't even know you could do it that way.

Anyway, thanks a lot. I'm sure that's going to fix things, once I figure out how to do that.

I'm apprehensive about putting the preloader at the first of my movie. That means that it could screw things up, doesn't it? Seems like I've stuck things in front like that before, and animations and stuff get screwed up. I'm wondering if I just use the frame labels, then maybe I can just leave them as two separate scenes? I'll try both ways, I guess.

Thanks very much to you guys. :)

Billy T
04-26-2002, 12:10 AM
click on the first frame of your main scene and hit f5 a couple of times - this should insert a couple of frames but leave all your animations intact. Of course, all your gotoFrame actions will now be screwed which just highlights why you should use frame labels ;)

Always avoid using scenes, they just cause trouble.

cheers

K Rice
04-28-2002, 07:18 AM
Hey, thanks a lot. I've figured out how to do the frame labels. Very cool. I'll try inserting the frames in front. Thanks!