Jump to content


preloader problem


  • You cannot reply to this topic
7 replies to this topic

#1 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 04 March 2007 - 02:26 PM

ok i have a preloader and when testing it in flash 8 works fine. go i put the .swf onto the net and the internet broswer just seems to load the whole .swf in one go instead of just loading up to the preloader frame and stopping there. because it loads the whole flash in one go it means it skips the preloader. except, when i press refresh is loads the preloader then!

here's the code:
// Create a listener object event function. The progress bar is an object so it needs an object function to work
myProgressBarListener = new Object();
// When the progress bar is complete and has preloaded this movie, the listener will call and run this code below:
myProgressBarListener = function (eventObject) {
	// Hide the progress bar now as we don’t need it any more
	myProgressBar._visible = false;
	// In this example I have used the gotoandstop(); command because I want the movie to go to and stop at frame 2
	gotoAndPlay(2);
	// As an alternative remove the line above and un-comment any of the code below:
	// This will go to the next frame but may not automatically play beyond the next frame:
	// nextFrame();
	// This will go to the next scene but may not automatically play beyond the first frame in the next scene:
	// nextScene();
	// Replace the X with the frame number you want the Movie to go to and stop:
	// gotoAndStop(X); 
	// Replace the X with the frame number you want the Movie to go to and play:
	// gotoAndPlay(X); 
	// When referring to frame labels ensure that the label name is in quotes in the code:
	// gotoAndPlay("MyLableName");
	// Close the above function 
};
// Declares a listener that detects when the progress component has loaded the movie and is complete. Then calls the function above: myProgressBarListener
myProgressBar.addEventListener("complete", myProgressBarListener);
// We are now setting the progress bar component variables
// Set up the progress bar component to polled when loading the movie. In this case it has to be set to polled to work
myProgressBar.mode = "polled";
// Set the location to load as this movie. 
myProgressBar.source = "_root";
// Set the conversion to 1. This basically means the component divides the current and total values loaded and to be loaded. Then it floors them (works out the difference between them) and displays the converted value in the label property
myProgressBar.conversion = "1";
// Set the label to display the word 'loading' followed by the percentage value loaded so far
myProgressBar.label = "LOADING %3%%";
// The direction the progress bar moves when loading
myProgressBar.direction = "right";
// The location of the label that displays the percentage loaded so far
myProgressBar.labelPlacement = "bottom";
// Stops the Movie at the current frame until the Movie has been preloaded
stop();

any idea why the broswer is not letting the preloader load the swf instead of it loading the whole thing itself?

#2 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 04 March 2007 - 03:30 PM

You know, I've always wanted to know that. Hopefully someone here can answer our question.

#3 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 04 March 2007 - 04:12 PM

If thats the macromedia component, dont use it. It's pretty crappy. Not only is it a huge ammount of kb for a lame looking preloader, but it never functions correctly.

The only time I used it it kind of worked, but not as well as I would have liked, so I made my own. You may want to consider this as well.

In any case, make sure you have frame 1 set as the frame to export all AS, as well as the component (found in the linkage for the comp). Shift all your stuff over by 1 frame so things can load up on the first frame and then use the preloader on the 2nd frame. Set any non-preloader components to load on a later frame so they dont try and load before the preloader has loaded.

#4 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 05 March 2007 - 05:49 AM

It's not the component. It does it to every preloader. I'm pretty sure it's to do with IE's lame security.

#5 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 05 March 2007 - 09:47 AM

You sure its not the macromedia component? AFAIK thats the same code that is applied to it. In any case, just make a shell.swf file that has nothing but a preloader in it and make that preloader load up another swf that contains the rest of your website. Problem solved!

#6 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 05 March 2007 - 03:34 PM

View PostPax, on Mar 6 2007, 01:47 AM, said:

You sure its not the macromedia component? AFAIK thats the same code that is applied to it. In any case, just make a shell.swf file that has nothing but a preloader in it and make that preloader load up another swf that contains the rest of your website. Problem solved!
I mean, it doesn't matter if it's the component or not. What he means is that his preloader before his movie never gets to show, because IE only displays the .swf once the .swf is loaded.

#7 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 05 March 2007 - 04:00 PM

Hmm...I've never seen that before. Are you using the embed code that you get when you publish your swf? Or are you using a javascript method to do so? From what I can tell, if you use JS to do it you don't get that. But I might be wrong, or it might be my version of IE, which is v6.

#8 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 07 March 2007 - 04:23 PM

i was actually going directly to the .swf

but firefox was being a homosexual about it so i used the html file instead and it's fine now :lol:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users