Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load Movie Not Working All the Time

Status
Not open for further replies.

kimraznov

Programmer
Oct 16, 2000
31
US

If you click on the work/advertising... and then click on one of the images at the bottom of the screen, a new movie will open on level 2. In each of these loaded movies is a loader on 10 frames.. the first frames says...

if frame is loaded 15 (or total number of frames)
go to and play 11

if this condition is not met, frame 10 says go to and play 1

there is the text "loading" that appears on the screen as an animation.

the problem is this... when the movie is suppposedly loaded in fully.. one can click the arrows in the upper right of the screen to view more images in that section...however they dont always load the first time around. I dont understand how this could be since in the loader i tell it to load all of the frames where the bitmaps reside.

Please help... this should be simple and ive done it before, im totally stumped.
 
Your problem probably comes from the preloaders. BTW, you should add one, when those small images are loading, 'cause I might be led to believe nothin's happenin'.

The ifFrameLoaded action (if that's the one you're using - and not something like: if frame is loaded 15...), is deprecated in Flash 5, and you should be using either _framesloaded & _totalframes or getBytesLoaded & getBytesTotal, for a more accurate preloading.
You could also set a variable at the end of each movie, and condition the display of the movie in it's preloader with that variable being true or not.

But first try something like the following in your preloaders, that should only hold 3 frames:


Frame 1: (a blank keyframe)
if(_root.getBytesLoaded >= _root.getBytesTotal){
gotoAndStop(11);
}
The above is only to prevent seeing a Flash frame of the preloader on future visits.

Frame 2:
if(_root.getBytesLoaded >= _root.getBytesTotal){
gotoAndStop(11);
}

Frame 3:
gotoAndPlay(2); // that's the loop

Your loading animation should be in a 10 frames movie clip, dragged from the library, on it's own layer, but only from frame 2 to 3 included. It should not be on frame 1.
To do this, you can create a new layer above the actions layer, and simply drag your loading movie clip on stage. Then simply selecting and holding the mouse down drag the first frame to the frame 2 position, thus clearing up the animation on the first frame.

Regards & Season Greetings,
wink4.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top