| Welcome to Brackenwood. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Hearty Preloader Goodness; Reducing waiting (loading) time | |
|---|---|
| Tweet Topic Started: Apr 5 2006, 08:37 AM (256 Views) | |
| akpaintslinger | Apr 5 2006, 08:37 AM Post #1 |
![]()
Brackenwood Heavyweight
|
Hello everyone! ![]() I've already checked the resources and macromedia exchange in regards to this subject, but to no avail. I'm currently working on a inventory displayer that is around 400kb on average. And for viewers without cable or DSL, it'd take awhile for it to load. The link for an example is right here in case any of you'd like to take a look for reference. So for the past few days I've been searching for a method to reduce waiting time without reducing quality. Here is an example of what I had in mind--- it's just an image gallery that loads each picture as you click on its thumbnail. How would I go about building these sorts of loaders and what code is needed? Any help or advice would be much appreciated. Thanks.
|
![]() |
|
| Jemooky | Apr 5 2006, 09:24 AM Post #2 |
|
Matt
|
I forgot the technicalities, but I can give you a rough idea of what Justin at Cartoon Smart does. You need to create a swf for each you want to load, with the jpeg file inside the swf. Place these image swfs in the same directory as your main swf. To load the images into your Primary swf, use "loadMovie". That's about all the detail I can give you, but I hope it's enough information to put you on the right track. |
![]() |
|
| juggleballz | Apr 5 2006, 10:05 AM Post #3 |
|
I'm loose, full of juice and ready for use!
|
ur basically looking to load in different parts of the movie when needed, rather than it all loading at once? Like Matt said u just need to load in the external movieclips. Make all ur different sections in separate swf files. So say u have 4 swfs. 1.Ur Main swf, into which the others will load 2.Section one.swf (with preloader included) 3.Section Twoswf (with preloader included) 4.SectionThree.swf (with preloader included) SO say u have a button that loads in SectionTwo.swf, and it replaces the entire Main swf, u need to place this code on the button:
or u can add the code to a frame, so a section loads in when a frame is reached in ur main timeline:
Now, you if u notice the word "_root" above, what that means is that the entire Main swf will be replaced with the loaded movieclip. If u want a section to load into a specific area in ur Main swf u will need to set up an invisible Movieclip to act as a stage to which the external movieclip will be loaded. so u have a button an u want ur small external section to load into a specifc area in ur main swf, that area being indicated by an empty Movieclip that u have created. Give the empty movieclip an instance name such as "loadarea" U want ur button to load in sectionTwo.swf to that area, without replacing everything, add this code to the button:
the ".loadarea" indicates where the external movieclip will be loaded into. hope this helps Oh and make sure all ur swfs are in the same folder.
|
![]() |
|
| akpaintslinger | Apr 5 2006, 10:23 AM Post #4 |
![]()
Brackenwood Heavyweight
|
Matt, Juggleballz, you two are the best! Thanks!
|
![]() |
|
| akpaintslinger | Apr 6 2006, 05:34 AM Post #5 |
![]()
Brackenwood Heavyweight
|
New relevant topic: I just installed a preloader using Vector's basic tutorial. (I use MX '04) Fixed the lowercase 'm' to 'M' and that solved the undefined problem. I want movie to play as usual once the loading finishes, so I put play(); at the end. The problem now is that once it loads, the timeline begins plowing from start to finish, and disregards all other actionscript keyframes along the way. (buttons still work) This is the code on the preloader frame:
Were there any other changes made to MX '04 actionscript that would effect this code?
|
![]() |
|
| Mr. Jiggmin | Apr 6 2006, 06:05 AM Post #6 |
|
made of tulips
|
Putting "stop();" on the frames you want it to stop on doesn't work? |
![]() |
|
| akpaintslinger | Apr 6 2006, 06:13 AM Post #7 |
![]()
Brackenwood Heavyweight
|
Exactly.
It just keeps on trucking right through them. |
![]() |
|
| Mr. Jiggmin | Apr 6 2006, 06:36 AM Post #8 |
|
made of tulips
|
Ah, the onEnterFrame isn't getting deleted. That code continues to run every frame... And since the movie is loaded, "play();" runs evey frame. Deleting the onEnterFrame once it's loaded should fix it.
|
![]() |
|
| akpaintslinger | Apr 6 2006, 07:03 AM Post #9 |
![]()
Brackenwood Heavyweight
|
Ay, that's the rub.
Thanks, Mr. Jiggmin! |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Actionscript · Next Topic » |








5:11 AM Jul 12