Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-08-2003, 09:06 AM   #1
Dylan
Registered User
 
Join Date: Jun 2002
Location: California
Posts: 14
Default loadtheWholeMovie!

Im using the "loadMovie" to load 15 jpgs into a scroller. the whole thing works fine but the pictures come in at random. Is there a way to make them all load before they even start to show up. I want them to _alpha from 0 to 100 all at the same time with out any patchy random look goin on.

i have this in frame 1 it doesnt seem to work on the pics

if (_framesloaded>=_totalframes) {
gotoAndPlay("start");


to see what i meen its the portfolio section

matrixrockscape.com
Dylan is offline   Reply With Quote
Old 05-08-2003, 09:49 AM   #2
Sualdam
Registered User
 
Join Date: May 2003
Posts: 848
Default

You've used framesLoaded - how many frames are actually involved in the movie clip that contains your JPGs?

You haven't given full details, but if you are introducing all these JPGs in a single keyframe then there's almost no control.

You'd be better off using getBytesLoaded and getBytesTotal - they're more reliable.

A normal preloader should then work.

Can you give more info?
Sualdam is offline   Reply With Quote
Old 05-08-2003, 05:34 PM   #3
Dylan
Registered User
 
Join Date: Jun 2002
Location: California
Posts: 14
Default

1 st frame
(not well versed in this area, I only know this _framesloaded code from the reference, and it seems they have depricated ifFramesloaded). Also does it have to be in a previous scene to work?

if (_framesloaded>=_totalframes) {
gotoAndPlay("start");
}

2 nd frame

gotoAndPlay(1);

3rd frame

"start"

5 th frame

loadMovie("../art/pic01T.jpg", "mcscoll.mcpic.spot01");
loadMovie("../art/pic02T.jpg", "mcscoll.mcpic.spot02");
loadMovie("../art/pic03T.jpg", "mcscoll.mcpic.spot03");
------- etc .... through 15

about 7 frames with mcscroll at 0 _alpha and the rest a tween into focus in hopes the pictures would load before they are seen


20th frame

stop();
Dylan is offline   Reply With Quote
Old 05-08-2003, 07:07 PM   #4
Sualdam
Registered User
 
Join Date: May 2003
Posts: 848
Default

First of all, try putting the instructions to load the images in successive frames rather than all in the same frame.

However, if I were you I'd forget about the loading order and just preload them into a movie clip. Then you could display them instantly.

Is the loading order critical to your design, or just a nuisance when it appears random?
Sualdam is offline   Reply With Quote
Old 05-09-2003, 10:32 PM   #5
Dylan
Registered User
 
Join Date: Jun 2002
Location: California
Posts: 14
Default

Im just trying to load all of my jpgs prior to advancing to the next frame on the main time line. No specific order, just loaded at 0 _alpha and ready to come into focus, not still in the middle of showing up.


Ive read about the framesloaded command but they arent doin things quite as they read.
Im assuming they dont include outside(swf/jpg) in what they call the movie parameters?
Would it change things to put the loader in a previous scene, or maybe it has to be in a certain clip?
Dylan is offline   Reply With Quote
Old 05-09-2003, 10:50 PM   #6
Sualdam
Registered User
 
Join Date: May 2003
Posts: 848
Default

The framesloaded thing is always a bit crude to my way of thinking - especially if you have a lot going on in a single frame. In that case, you can't control loading orders so easily.

You definitely need a preloading operation of some kind - what you are trying to do is preload images before you show them.

Look at the attached file - it is a preloader with a single image.

Basically, a loading bar or percent is shown until the image (or rest of the movie) is fully loaded.

This would work for your application, I'm sure.
Attached Files
File Type: zip demo4.zip (56.4 KB, 91 views)
Sualdam is offline   Reply With Quote
Old 05-09-2003, 10:50 PM   #7
dedwardsnew
Super Coder
 
Join Date: Apr 2003
Posts: 31
Default

Here's a sample that demonstrates how to get all the external jpgs loaded.

Each mc container has this code:

onClipEvent (data) {
_root.OnPhotoLoad();
}


This makes each jpg report when its load is completed to a function in frame 1 of your main movie which has this code:


var LoadCt=0;

mc1.loadMovie("1.jpg");
mc2.loadMovie("2.jpg");
mc3.loadMovie("3.jpg");


function OnPhotoLoad() {
++_root.LoadCt;

// these are just for debug to see it working
_root.Status=_root.LoadCt;
if (LoadCt==3)
_root.Status="All Loaded";
}

//-------------------------

What it does is use LoadCt to count the number of jpgs that have reported that they are complete. You can use a line similar to

if (LoadCt==3)

to detect that you are done and jump to the frame that starts cranking up the alphas. -Dave
Attached Files
File Type: zip loadct.zip (11.4 KB, 129 views)
dedwardsnew is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:23 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.