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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intro movie load & load other movie into cache - same time

Status
Not open for further replies.

whoknows361

Technical User
Sep 22, 2005
228
US
Hi guys.. I have been trying to figure this out & need a little help. Here's what I want to do: I have an initial page which will load, utilizing a pre-loader, an intro flash movie... However, I want, when the intro is completed loading, to begin loading the main web page flash movie, however I don't want it to go to the flash movie yet. I have on the first frame variables recording the user's x resolution & y resolution using:
sizey = System.capabilities.screenResolutionY;
sizex = System.capabilities.screenResolutionX;
I also have a few htm pages which have different sizes of my main flash movie, which the user will see dependent on their resolution as recorded by the above actionscript. What I want is when the intro movie is done loading & beings to play, the actionscript begins to load the correct flash movie as identified by the user's resolution. When the main flash movie is loaded, I want a button to appear that says something like "to skip intro & go to homepage, click here." So when they click on the button the correct flash movie according to their resolution is already loaded in their cache & there is no download time. So when the user clicks the button, they are taken to the correct htm page which has the movie already loaded & begins to play. But I can't figure it out. I can get the intro to load utilizing the preloader, & I can get the user's resolution size. But how do I use actionscript to start loading the right movie, according to resolution size, & utilizing a pre-loader? I think I can get the button action correct (meaning using the user's screen resolution to define which htm page they will go to so the movie is the correct size), but I can't figure out how to use a preloader to load the movie with the right proportions that I want. I hope this is clear, it is a kind of confusing situation. Let me know if you have any questions & thanks in advance as you guys have always been so helpful. Thanks again

Jonathan
 
How many different movies (differently proportioned...) do you have?

You could probably use a generic preloader within you main movie, called upon to start loading the appropriate main movie, according to the user's resolution, as soon as your intro starts playing.

Thing is, are you sure the intro is long enough (and the user's connection speed high enough...) to allow your main movie to fully load before your intro finishes playing?

Regards. Affiliate Program - Web Hosting - Web Design
03/13/05 -> OLDNEWBIE VS FLASHKIT
 
I guess the real problem is, is that I don't know how to code the main movie so that it loads the correctly proportioned movie into the user's cache, so when they click the "go to web page" button, it takes them to a new htm page with the correctionly proportioned movie..

Maybe this will help... A user comes to the main page & the intro loads & starts playing. On the first frame of this main movie I record the user's resolution sizes. Let's say that it is 800x600. So now the "go to web page" button will know which htm page to send the user to when clicked by using an if else statement. But how do I load the correct movie into the user's cache & have a preloader indicate this progress? Here is the code that I generally use with a pre-loader, please show me how to change it so that it simply loads the correct movie into the cache, but does not begin playing it.

//begin loading movie process//
_root.attachMovie("loader", "loader", 18)
_root.loader._x = 307;
_root.loader._y = 431;
_root.loader._visible = false;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);

preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.loader._visible = true;}

preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
_root.loader.bar._width = (lBytes/tBytes)*100;
_root.loader.pText.text = "% "+Math.round((lBytes/tBytes)*100);
};

preload.onLoadComplete = function(targetMC) {
_root.loader._visible = false;
trace(targetMC+" finished");
};

my_mc.loadClip(" _root.holder);
 
do I need to amend the preload.onLoadComplete section? I'm lost on this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top