PDA

View Full Version : A simple Challenge for a coder!!


scottharrison
01-23-2006, 12:49 PM
Hi there, I need some help with a project I am trying to do and I am wondering whether anyone would be prepared to spend an hour and help me?
Basically,I am new to flash and I am trying to build a template which i can use for all my future movies.

Here goes:

My website will have a 'splash' image screen (index.html) with an enter button which will go to (home.html)

Within the home.html page I will have a (holder.swf) flash movie which directly calls the (interface.swf) movie to run inside it.

but firstly:
The splash page will have a hidden preloader which will preload the 'holder.swf' and start to preload the 'interface.swf'

Once the viewer presses the enter button on the splash page, it will automatically go on to the 'home.html' page. This will present the 'already loaded' holder.swf @ 15kb and begin to load the interface.swf

Depending on how long the viewer has spent on the splash page the interface should have partly loaded; if not fully (depending on file size.)

Within the interface I have the folloing sections:

loading = this is just the preloader for the main interface

intro = this is the startup animation and the background frame of the interface

movie loading = animation and loading of external movies i.e. (sliding doors animation)

movie01 section = external movie shows here, this would be the 'home.swf'
movie02 = external movie shows here, this would be another 'movie.swf' etc...
movie03 = external movie shows here
movie04 = external movie shows here
movie05 = external movie shows here

I will have a navigation within the interface which will call each one in turn and load the movies into a holder (which i can change size and position)

this will be in a level e.g. (level 5) and when another movie comes in, it will unload the previous movie and load the requested movie into (level 5)

I need to get the interface movie to automatically load and display the external homepage movie on entering the 'movie loading' section after the initial intro animation startup sequence

I would like (at all sections; after initial home movie is loaded) for the interface to start loading all other movies in the background... To enable faster viewing.

Explaination:
When someone views the site (interface movie), the interface loads the external home movie. The viewer gets to the home section and starts reading. Whilst they are reading; in the background there is some actionscript telling the interface to load other movies in sequence and if interupted....
i.e. someone selects a movie which is last in sequence, it loads that instead and then continues to try and load the other movies again in the background...

I have created the holder; which works fine. I have created the interface and navigation. I just need the button scripts and the preloading movies script


I have a link to the template movies for your viewing:

www.glencareroofing.co.uk/code.rar

Paerez
01-23-2006, 03:00 PM
For movie loading the best solution is always a MovieClipLoader, because it lets you load from a url or linkageID to a movie clip and provides events for the start of the load, progess, and when the load is complete. So check it out in the AS dictionary.

tg
01-23-2006, 05:45 PM
you cant start preloading swfs embedded in a page you havent even been to yet.... the swf is embedded into home.htm. so until you get to home.htm, the swf doesn't exist, and can't start executing code to load the interface..... and if you did get it to start loading ouside of home.htm, once you loaded home.htm, it may start over again....

you might be able to start loading your swfs loaded into memory using proxy servers, but ive not heard of folks doing this.

Paerez
01-23-2006, 06:01 PM
if you finish loading the swf, most browsers will cache it, which will serve the purpose of preloading. Or, you can do the easiest and keep everything in one page and just split the two pages worth of stuff into seperate swfs.

tg
01-23-2006, 08:41 PM
if you finish loading the swf, most browsers will cache it, which will serve the purpose of preloading.

right.... but part of the problem posted above is that if half the swf is loaded, when the user goes to the next page, it will continue loaded the previous half swf already loaded.... thats the piece that i don't think will work. if holder.swf needs to load an mc, and only have the mc is loaded, then you switch pages, it will start over again.... i think.

Paerez
01-23-2006, 08:51 PM
I agree with you on that one. I have been in communication with scott and I am going to help him with it. The solution I plan to use will be to do it all on one html page with one controlling swf.