View Full Version : Dilemna with the notorious PRELOADER
02-04-2003, 07:17 PM
I think the problem is I don't know how to use the properly yet... I was wondering if someone with experience could lend me a hand here :)
I've made a pretty large scene spanning 25 frames all accounting for movieclips in the animation, and I make a preloader in frame 1 and move all the other layers to start from frame 2. Everything goes fine, the loader displays correct "get.Loadbytes" and loads the page, but once the 25 frames of the main scene are done playing, it goes back to play the preloader again. What sort of scipt must I use to make the loop not contain frame 1 (preloader) also?
Many thanks in advance!
02-04-2003, 07:34 PM
stop() if you want to stop the animation, gotoAndPlay(2) if you want to replay the animation starting at frame 2
02-04-2003, 10:09 PM
Well, that did the trick almost, the thing is it isnt right for it to loop these frames because I have a scripted animation that looks wrong if it loops because it resets to the original position.
More specifically, as you can see in the screenshot, I have all layers stretched to span 25 frames but there is actually no animation in the main scene, only inside the Movie Clips themselves and so on. I have a menu element that moves around according to mouse position and if these 25 frames are looped it resets the location when it reaches frame 25. Everything works fine if I dont have the preloader frame before it... isnt there anything else I can do?
i think you missed part of what was said. if you don't want it to loop put a keyframe and stop action on your last frame, if there's no stop action flash will automatically loop back to frame 1. question tho, why so many frames if its all movie clips? they're operating independently of the timeline so they could all be on the same frame. just a thought.
02-04-2003, 10:47 PM
Yeah, thats he weird thing. I don't recall right now if I stretched all the frames to 25 but I don't think so. All animation is made within the movie clips and somehow how it "auto-stretched" to the longest of the animations... maybe I should try building the scene again? :shrug:
you can probably just delete all those frames from twenty-whatever back to frame 2, put a stop action on frame 2 and be good to go.
02-04-2003, 10:56 PM
Arghh! I was leaving the "()" of "stop()" out!!! :scream: I didnt think it was necessary as it was the last frame and whatnot... man, scripting is hard! I better start getting used to it. I hope you'll understand me, we all stumbled whilst learning to script, huh? :thumbsup:
So do the parenthesis actually mean anything or has it got to do with script rigourosity only?
Thanx to everyone!
glad to help. and the parenetheses do serve a purpose, just not so much with the stop action. in general that's where whatever parameters you're using with an action are, such as:
where 5 is the frame number. you might also pass values for stop and start boundaries if you've got a drag action on an item, a level number for loading a movieclip into, etc.
actionscripting stars off as complicated, but it really does get easier as you get more into it. check out the 'flash to the core' book by josh davis if you're looking for a good one to get more into it.
02-05-2003, 03:07 PM
Thats great! I'll most certainly check that book out! Now I have to find out how to add sound. The process seems simple and theorically I am doing everything right but I haven't got it yet... Ah, well... I'll report back here if I have anymore questions ;)
01-14-2006, 09:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.