This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > July 2007 > Loading scenes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Loading scenes
dtedone1

2007-07-12, 6:15 pm

I have a movie with 2 scenes. Scene1 is the intro and I need it to play while sceen2 continues 2 load in the background
dtedone1

2007-07-12, 6:15 pm

Oh No! not the dreaded preloader! - I was hoping I could avoid it as I haven't figured out how 2 do it - any help - please?
dtedone1

2007-07-12, 6:15 pm

Also a number of elements need to load in the 1st frame - I didn't think you could do that with a preloader?
dzedward

2007-07-12, 6:15 pm

yes you can by loading your Main swf into a preloader swf using the MovieClipLoader Class if it's AS2 or the Loader class if it's AS3
dtedone1

2007-07-12, 6:15 pm

Sounds good thanks-I am using FlashMXpro2004 - also the elements loading into
the 1st frame are external movies including navigation - will these be affected?

Ia I right in thinking I should create a new Fla. and load the main SWF into a
preloader in the new Fla.?

dzedward

2007-07-12, 6:15 pm

yes, create a new FLA, insert a new blank movie clip, place it at (0,0), and
give it instance name of whatever, lets say, holder_mc. then attach this code
to Frame 1 of the new FLA.

var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number,
bytesTotal:Number):Void {
//do something while it's loading
};
mcLoader.addListener(listener);
mcLoader.loadClip("yourMovie.swf", holder_mc);
listener.onLoadComplete = function(holder_mc:MovieClip):Void {
//do something when it's done loading
};
holder_mc._lockroot = true;

dtedone1

2007-07-12, 10:15 pm

Many thanks 4 that - I will give it a go and come back 2 you tomorrow - I like the Precision
quote by the way
Franz Marksteiner

2007-07-13, 3:24 am

dtedone1 wrote:
> Many thanks 4 that - I will give it a go and come back 2 you tomorrow
> - I like the Precision quote by the way


Who are you talking to? And btw: Scenes are evil!


--
Kind regards,
Franz Marksteiner
dtedone1

2007-07-13, 6:15 pm

All done - I have set it up as per your instructions and it all works fine -
thanks 4 that - what do I need 2 do now 2 enable the control of the content
download?
my 1st scene contains almost nothing (kbytes) just intro text but around 6/800
frames, which will buy time 2 download the 2nd scene which contains 1.7Mg of
content.

dtedone1

2007-07-17, 6:16 pm

Do I have 2 do anything else 2 this code 2 control the download ?
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews