16kb Loads Before Preloader Does...
I have a small animation - that loads a radio commercial for playing. The preloader works fine, however, doesn not begin til about 20 kb has been loaded! I am not sure why this is, is it common?
Cheers,
Nick
FlashKit > Flash Help > Flash MX
Posted on: 08-01-2003, 02:12 AM
View Complete Forum Thread with Replies
Sponsored Links:
Preloader Says NaN%, Then Loads Okay Why?
Okay,
I have a site which has 5 .swf files. In my preloader I want it to display how much of each .swf file has loaded, one at a time.
To do this I've used 6 seperate frames (the first is to load the actual preloader, very small).
My problem is that my percentage loader is coming up with NotANumber (NaN) below 20%. After that it loads fine.
For example, the 3rd .swf file to load is called in level 3 (specified earlier in the programme)
output = Math.floor((_level5.getBytesLoaded()/_level5.getBytesTotal())*100)
Where output is simply a dynamic text box.
Why would this display NaN and then after 20% start to display the percentage?
Thanks for any help.
View Replies !
View Related
Preloader Loads To Much
Need help, my main movie is fairly small, it calls other movies that are fairly big. In scence1 the preloader loads the main movie and its movies linked to it!!(hope your still with me) this is the code on the preloader clip
onClipEvent (enterFrame) {
ifFrameLoaded (2) {
_root.gotoAndPlay(2);
}
}
how can I load the main movie without the linked movies?? or should I go about this another way....
http://members.home.net/pascalyotis
(it does work, just takes forever, and preloader is basically useless, piece of shyt, jarbig)heelp
View Replies !
View Related
Preloader Loads Everything But Itself
Please have a look-see at:
http://www.perryballard.com/nhh/html...rmishmash.html
This is a very large movie, so I set up a preloader. Everything works great except for the fact that the preloader screen doesn't appear until the movie is over 80 percent loaded. I thought it was a "top-down", "bottom-up" issue (which you checked when you export a movie), but I couldn't tell a difference between the two. ....
Any ideas anyone?
Thanks!
View Replies !
View Related
Preloader Only Loads Once..
Hi all
I'm having a bit of a strange problem with my preloader today. I've made a preloader wich works as any other regular preloader (just a 100 frame loading animation, but with some extra's after those frames) and which is controlled by AS on the main timeline using two EventListeners attached to the loaderInfo.
(Link here, but you'd better read first )
The first one calculates the percentage and tells the preloader to gotoAndPlay that number.
The second one catches the complete event and tells the pop-up text (which I forgot to mention; it's just a MC which start playing when the frame is entered) to continue to play (bounce down again).
At the end of the pop-up text timeline, there's this code:
Code:
MovieClip(parent).pl.play();
which tells the preloader to start playing again (remember the extra frames I mentioned above). At the end of that there's this code:
Code:
MovieClip(parent).play();
which obviously makes the main timeline running again.
PROBLEM: When I upload the swf, the loader works, but when I refresh the window, it shows the full preloader, but then refuses to do anything :s
If anyone needs more code or something, let me know, and thanks for reading my way too long explanation
View Replies !
View Related
Preloader Loads More Than 100%
I have a bar preloader that is growing more than 100% when the movie loads. This looks weird because there is an outline around the bar and the bar goes beyond the outline. The code is below. Can someone help me?
ActionScript Code:
this.onEnterFrame = function() {
// trace the percentage of the movie that has loaded
percent = (_root.containerMC.getBytesLoaded()/_root.containerMC.getBytesTotal())*100;
if (!isNan(percent)) {
// The following only concern the preloader's displays...
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent)+"% loaded.";
}
this.loadbar._visible = true;
this.outline._visible = true;
this.loadbar._xscale = percent;
if (percent>1) {
}
// End of preloader's displays...
_root.containerMC.stop();
}
if (percent == 100) {
// this sends this preloader clip back to frame 1
// where it awaits the next call to it...
this.gotoAndStop(1);
// this deletes this onEnterFrame event...
// so that the movie clip stops looping...
delete this.onEnterFrame;
// preloader's displays handling...
percent_display = "";
this.loadbar._visible = false;
// end of preloader's displays handling...
_root.containerMC.play();
}
};
View Replies !
View Related
Preloader Loads At 20%
hi,
i have a problem with one of my mc, the problem is that when the loading text shows, it starts from 20% and not 1%. I attached the file, can you please check what is the problem?
thnaks
View Replies !
View Related
Preloader Loads Other Stuff Before Itself DUH...
My stinkin' preloader loads other stuff even before itself!!!
Here's the smack:
I'm working on a series of tutorials for the software that my company makes, made with Flash 5.
We start with our basic percentage bar preloader screen (first scene in order), and then it launches into the movie (next scene). The actionscript for the preloader is of the standard percent=bytesloaded/bytestotal variety.
Embedded into the main movie is a sound file, the soundtrack to the tutorial (composed by yours truly). It is not attached to the timeline of the "music" movie clip, but loaded as a sound object so that the user can shut off the music at will.
The problem is that the preloader decides to load the sound object first, even BEFORE the graphics that make up the preloader! This means that the user is staring at a blank white window for thirty seconds or so, and suddenly the preloader appears with 65% or so loaded already on the bar.
Watching the movie in "show streaming" mode confirms that everything is loading properly, and the loader bar is accurate.
SO......
How do I tell the preloader to load its own graphics BEFORE it loads the sound so the user isn't looking at a blank window?
I humbly appeal my case to all you FlashGods out there to smile upon me from on high and assist a humble and lowly newbie.
View Replies !
View Related
Preloader That Loads All SWFs
My post got lost somewhere out there. I'm trying to write a preloader that will load all the swf files you need before it starts playing the first one. I really don't care to show kb or percentage progress, just to wait while it loads all of them. All the tutorials are about loading 1 swf in a fancy way, I am looking for all. If anyone can point me in the write direction I'll appreciate. thanks.
View Replies !
View Related
White Bg Loads Before Preloader?
does anyone know how to get rid of the white bg that flashes before you swf preloads?? to see what i mean... please click here
http://avidgraphics.net/CCDesignStudio.html
on slower connections, a white bg flashes before the swf loads. i tried setting the swf to transparent bg and nothing happens. there is NO white bg set in my swf....
anyone have any ideas how to get rid of this?
thanks Tracy
View Replies !
View Related
Preloader: Loads Everytime
First off let me say I've searched theses forums for the last hour for an answer....it doesnt help when people have craptastic subject lines like "HELP! DOESNT WORK!" So i figured mine was a smart one
Anyways. Have a preloader, it shows the loading process everytime, so its not actually working.
FRAME 1
Code:
percent_loaded = 1;
total_frames = 212;
value = 13;
LOADED_FRAME = 3;
FRAME 2
Code:
if (Number(percent_loaded)>=100) {
gotoAndPlay(15);
}
FRAME 3
Code:
ifFrameLoaded (LOADED_FRAME) {
percent_loaded = int((LOADED_FRAME*100)/total_frames);
LOADED_FRAME = Number(LOADED_FRAME)+1;
setProperty("/BAR", _xscale, percent_loaded*value);
}
FRAME 4
Code:
gotoAndPlay(2);
View Replies !
View Related
Movie Loads Before Preloader Is Done
Have a site which has been working fine until about 5 minutes ago. All I did was add some content to the page that is loaded in and publish to the web.
Now the main preloader loads up fine like it always has but when it reaches about 90% the movie starts playing. It is only loading in one main file.
Any ideas on how it can start playing the swf before its done loading it. I have used the same code for the preloader on several sites and they are all working fine.
How can I make sure that the movie doens't play until it is fully loaded...
View Replies !
View Related
Preloader Loads Up Late
Hi everyone, Im almost done with a site that Im doing for a client, but i just realized that the Preloader that I have been using all along isn't loading up right away. I know more then 1 person has had this question, i have read alot of those peoples post but just cant seem to figure out the answer. The script that im using is this.
stop();
myInterval = setInterval(preloader, 10);
function preloader() {
if (getBytesLoaded()>=getBytesTotal()) {
play();
clearInterval(myInterval);
}
bar._xscale = (getBytesLoaded()/getBytesTotal())*100;
myTextField.text = Math.round(getBytesLoaded()/getBytesTotal()*100)+"%";
loaded.text = getBytesLoaded()+" Bytes Downloaded";
total.text = getBytesTotal()+" Total Bytes ";
}
I have my preloader on the 1st frame in scene 1, scene 2 is where the rest of the site is. Is anyone able to help me out and look at that script and tell me why its not working, I would really really appreciate the help.
Thanks
Frank
View Replies !
View Related
Problem With Preloader That Loads Another SWF
I'd really appreciate any advice on this.
I have made a Flash website that needs a preloader. The ActionScript on _root frame 1 sets up a load of functions and variables, then it does goToAndPlay(51) where the content of the website all starts appearing. It's got a lot of nested movieclips in it all with bits of ActionScript, with various functions and variables written in this style:
Code:
_root.movieclip_mc.another_mc.someVar
When I go on it in a web browser, I just get a white box for quite a few seconds, then when it's fully loaded it starts playing. I obviously need something to say "Loading" and a percentage.
I've seen some advice about starting another SWF and using loadMovie to load the other one into it with a preloader. But if I do that, will things like "_root.movieclip_mc.another_mc.someVar" stop working, because their paths relative to _root have changed?
Is there any way to dynamically load and then switch to the new SWF, so it's not running as a movieclip instance in the _root of the pre-loader SWF, but as the main movie? Or will the nested AS paths starting from "_root" still work as if it was running as the main SWF? Or should I just do it all in one SWF, with some AS on the first frame?
If anyone knows of a good example/tutorial on doing this, that would be great. It would be good if I could find some code I can use to show some text saying how much is loaded, and then gotoAndPlay the appropriate frame when it's complete.
View Replies !
View Related
Problem With Preloader That Loads Another SWF
I'd really appreciate any advice on this.
I have made a Flash website that needs a preloader. The ActionScript on _root frame 1 sets up a load of functions and variables, then it does goToAndPlay(51) where the content of the website all starts appearing. It's got a lot of nested movieclips in it all with bits of ActionScript, with various functions and variables written in this style:
Code:
_root.movieclip_mc.another_mc.someVar
When I go on it in a web browser, I just get a white box for quite a few seconds, then when it's fully loaded it starts playing. I obviously need something to say "Loading" and a percentage.
I've seen some advice about starting another SWF and using loadMovie to load the other one into it with a preloader. But if I do that, will things like "_root.movieclip_mc.another_mc.someVar" stop working, because their paths relative to _root have changed?
Is there any way to dynamically load and then switch to the new SWF, so it's not running as a movieclip instance in the _root of the pre-loader SWF, but as the main movie? Or will the nested AS paths starting from "_root" still work as if it was running as the main SWF? Or should I just do it all in one SWF, with some AS on the first frame?
If anyone knows of a good example/tutorial on doing this, that would be great. It would be good if I could find some code I can use to show some text saying how much is loaded, and then gotoAndPlay the appropriate frame when it's complete.
View Replies !
View Related
Preloader Loads External Swf
Hi!
My problem is that I want my 200x200 px preloader to be centered on the page and then load a flash movie which is 1200x900 px.
I can do it by centering the preloader on a page, and then using navigateToUrl to the main movie, but this obviously isn't very seamless.
so any ideas? Would I use JavaScript to alter the dimensions?
thanks!
View Replies !
View Related
Preloader That Loads 50% Then Plays
I want to make a preloader that begins my flash movie once it has 25% or 50% of the swf loaded. This is what I have on my first frame of my preloader right now:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
loadBar_mc._height = getPercent*179;
this.loadText = Math.round(getPercent*100);
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
This works fine and dandy.
I've tried:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal()/2);
getPercent = bytes_loaded/bytes_total;
loadBar_mc._height = getPercent*179;
this.loadText = Math.round(getPercent*100);
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
and I'm getting errors.
Can anyone help??
View Replies !
View Related
Preloader That Loads Only One Frame?
How to do preloader that loads only one frame, not the whole 6 megabyte flash site?
frame 1 has loader that loads frame 2 and in there you click button which loads frame 3 that has loader that loads frame 4 and so on. Can any one help me to do this please?
View Replies !
View Related
Preloader That Loads MC In Segments
Hi, I have a MC named "preloader". Inside this MC got 10 frames and each of it represents a pencil. Frame 1 had 1 pencil, frame 2 had 2 pencils... and so on until frame 10(10 pencils ofcoz)
After that I adding 3 frames on my root. Frame 1 is Actionscript as follow:
Code:
totalBytes = Math.round(getBytesTotal()/1024);
loadedBytes = Math.round(getBytesLoaded()/1024);
percentDone = Math.round((loadedBytes/totalBytes)*100);
if (percentDone==20)
{
_root.preloader.gotoAndStop(2);
}
if (percentDone==30)
{
_root.preloader.gotoAndStop(3);
}
if (percentDone==40)
{
_root.preloader.gotoAndStop(4);
}
if (percentDone==50)
{
_root.preloader.gotoAndStop(5);
}
if (percentDone==60)
{
_root.preloader.gotoAndStop(6);
}
if (percentDone==70)
{
_root.preloader.gotoAndStop(7);
}
if (percentDone==80)
{
_root.preloader.gotoAndStop(8);
}
if (percentDone==90)
{
_root.preloader.gotoAndStop(9);
}
if (_root._framesloaded>=_root._totalframes) {
gotoAndPlay("start");
}
Frame 2 also AS(to perform the loop) as follow:
Code:
gotoAndPlay(1)
Frame 3 got the pen MC and I named this frame "start".
This flash running without any errors.
My question is, is there a more pro way to make this code become shorter by using any loop/array? Coz I just good in if...else statement. Maybe u guys can help me out Im still in learning process....
Thanks a lot.
Eric
View Replies !
View Related
Delay Before Preloader Loads?
I have a 5 MB project with a simple frame based preloader. I've imported the swf and simulated various download speeds. The preloader is working fine, but before the preloader comes on the screen there are ten-or-so seconds of just the black background (and that's on a T1 setting). The preloader is very, very simple at present with only text and a simple button that kicks in once the main movie has loaded. Anyone know?
View Replies !
View Related
Preloader That Loads 50% Then Plays
I want to make a preloader that begins my flash movie once it has 25% or 50% of the swf loaded. This is what I have on my first frame of my preloader right now:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
loadBar_mc._height = getPercent*179;
this.loadText = Math.round(getPercent*100);
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
This works fine and dandy.
I've tried:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal()/2);
getPercent = bytes_loaded/bytes_total;
loadBar_mc._height = getPercent*179;
this.loadText = Math.round(getPercent*100);
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
and I'm getting errors.
Can anyone help??
View Replies !
View Related
Preloader That Loads Only One Frame?
How to do preloader that loads only one frame, not the whole 6 megabyte flash site?
frame 1 has loader that loads frame 2 and in there you click button which loads frame 3 that has loader that loads frame 4 and so on. Can any one help me to do this please?
View Replies !
View Related
Preloader Loads Too Early
Hi all,
I created both a master.swf and preloader.swf to load my main.swf. When I simulate download, for some reason the preloader.swf appears when it is 30% loaded. Then, I can hear my main.swf load underneath when the preloader is 90% loaded. Once the preloader finishes at 100%, the preloader disappears (as I wanted); however, the main.swf had already started.
Does this make sense? I am confused.
Here is the AS for my master.swf:
stop();
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target_mc:MovieClip, loadedBytes:Number, totalBytes:Number) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes/totalBytes) * 100);
_level50.preloader.gotoAndStop(preloadPercent);
_level50.preloadInfo.text = preloadPercent + " % loaded";
}
myListener.onLoadComplete = function(target_mc:MovieClip) {
_level50._visible = false;
}
myMCL.loadClip("main.swf", 5);
myMCL.loadClip("preloader.swf", 50);
View Replies !
View Related
Preloader, That Only Loads Certian Frames
hi ya,
i think this one is farily easy. I have made a preloder, that currently loads in all the frames, then starts the movie. How do i tell flash just to load, to say frame 27?
here is my current script:
onClipEvent (enterFrame) {
percent = int((_root._framesloaded/_root._totalframes())*100);
loaded = percent+"% loaded";
if (percent == 100) {
_root.gotoAndStop(3);
}
}
any help v.appreicated
cheers
danny
View Replies !
View Related
Movie Loads Before Preloader Shows Up
hey guys,
i'm getting really frustrated because i just can't seem to get this preloader to work! the preloader pops up on screen when the movie is 91% loaded. i have the publish settings set for top down loading and my script & preloader are on the top levels, first frame.
why doesn't flash show the preloader first?!?!
please help!
View Replies !
View Related
Preloader For Movie That Loads 3 Swfs
I have created one flash movie that loads 3 swf movies at the same time (a common menu bar, common background and page specific content)
It was built like this to make it easy to update any one component.
The problem I am having is that when I add a preloader to the swf that loads these three movies it does not know exactly when all 3 have loaded and it then runs the movies out of sync the first time around. So once one part has loaded it starts playing it right away.
I need to have the preloader run exclusively until all 3 movies have loaded and then have them all start at the same time.
The main movie .fla is attaced here and all files can be found here:
http://www.valencienne.com/test/
To see the current movie go to:
http://www.valencienne.com/test/hometest.swf
Thanks for your help!
View Replies !
View Related
Scene Loads Dynamically, Need Preloader
Hi.
I have a Flash movie that loads scenes dynamically into an empty movieclip using the loadMovie function. The only problem i have is my preloaders wont work. I have tried placing a preloader in the first frames on the .swf being loaded but it skips it every time. What and where do i need to put the preloader code and images?
Thanks in advance.
View Replies !
View Related
Site Loads While Preloader Is Still Running
I am having a tough time with my preloader. It loads fine but then 1/4 way through the loading process the site begins to animate underneath it. I think the problem is in my code in my master file. How do I tell my site to wait until the preloader is done to start the main site animation? Here is the code for my master.fla file:
stop();
//---------------<MCL>-----------------\
//create the new MCL and Listener objects
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
// attach the Listener, myListener, to the MCL
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes / totalBytes) * 100);
_level50.preloader.gotoAndStop(preloadPercent);
_level50.preloadInfo1.text = preloadPercent + " % loaded";
_level50.preloadInfo2.text = Math.round(loadedBytes/1000) + " k loaded / " + Math.round(totalBytes/1000) + " k total";
}
myListener.onLoadComplete = function (target_mc) {
_level50._visible = false;
}
//-------------</MCL>--------------------\
// trigger the MCL to load these assets
myMCL.loadClip("trigger.swf", 5);
myMCL.loadClip("preloader.swf", 50);
//---------------<LoadVars>----------------\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function (success) {
if (success) {
_level5.loadedInfo.htmlText = myLV.info;
} else {
_level5.loadedInfo.text = "There has been a error loading the requested information. Please contact the Webmaster ahendrix@eliteracing.com and report your error.";
}
}
//---------------</LoadVars>----------------\
View Replies !
View Related
Movie Loads Before Preloader Is Finished
here's what i have in my master.fla on frame 1.
//-------------------------preloaderscript------------------\
myMCL.addListener(myListener);
myListener.onLoadProgress = function (target_mc, loadedBytes, totalBytes) {
_level10._visible = true;
var preloadPercent:Number = Math.round((loadedBytes / totalBytes) *100);
_level10.preloader.gotoAndStop(preloadPercent);
}
myListener.onLoadComplete = function (target_mc) {
_level10._visible = false;
}
myMCL.loadClip("preloader.swf", 10);
//--------------------------------------------------\
here what's on frame 2.
//---------------------------------------------------\
stop();
if (percent == 100){
gotoAndPlay(1);
}else{
myMCL.loadClip("splash.swf", 5);
}
//--------------------/preloaderscript-----------------\
It used to work just fine until I added more content to the splash.fla, which you would think would make it take longer. Check it out so you can see what I'm talking about. Thanks.
http://dev.villaparadisonevis.com/
View Replies !
View Related
Preloader Loads Movie In The Middle
Preloader works, although my music from the loading SWF file begins playing right away during the preloading phase. But when the movie does begin playing, it starts in the middle somewhere. (almost as if it is trying to catch up to where the music is at?) Sound event is set at Start and to Loop in frame 11 of the movie. http://welcome.wisnet.com/strukel/www/senior_gallery.iml
You'll only see it happen the first time, after that the file is cached and it will play from the beginning like it's supposed to. Any suggestions? thanks, Julie
View Replies !
View Related
How To Make A Preloader That Loads By Bytes Not Frames.
I am aware of how to make your standard flash pre-loader using the "if frame loaded" command.
Unfortunately, that type of loader will not work with the movie I am making. I need to make a loader that basically says "If 200k of the movie is loaded, start at Scene 1 Frame 1"
Any ideas on how to do this?
Thanks in advance.
Joe
View Replies !
View Related
Preloader Loads But Next Scene Doesn't Work Right
Ok, I'm puttin a preloader on this flash file right. Well it seems to work right and loads the next scene, but when the next scene plays none of the motion tweening works. The music plays, the movie clips animate, but they don't do any motion from the places they are supposed to come from (if that makes any sense.) Most the to stuff starts at 0 alpha and slowly comes to 100% and slides into the screen. But once the preloader goes to the next scene, everything is already up on the screen at 100%????
I used one of the preloader Tutorials on this site and it all seems to work...
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
But like i said before, when the next scene comes up it doesn't show correctly, no motion in it. Am i missing something obvious? I've even changed the if statement to gotoandplay frame 1 of preloader scene and it still does the same effect.
HELP! I'm clueless.
View Replies !
View Related
Preloader Mc That Loads A Seperate Main Swf Movie
Thanks to C4_Tom for the tip. However, I'm still having trouble with this. I'm trying to use a dummy movie clip in a bare bones swf to preload and open another, complete seperate swf file.
In my bare bones swf I have a one frame dummy movie clip with no art. It just has a loadMovie action that loads the main swf.
I have a preloader in the bare bones movie that uses movieLoader.getBytesLoaded to preload the clip.
It opens the main swf fine and looks good. However, I'm not convinced that it is actually downloading the main swf before it jumps to it. When I look at the streaming profile it looks like it's loading just the 2 KB of the dummy movie, then jumps to the main swf. The main swf is 157 KB and should take at least 18 seconds for the 56.6 modem setting that I'm testing it at. So, why is it just jumping there? When I trace the movieLoader.getBytesLoaded it tells me 0 bytes of 0 KBytes loaded then jumps to the main swf. So I'm convienced that it's not really downloading the swf before it opens it. I need it to be completely loaded before it opens the main swf. What am I doing wrong?
View Replies !
View Related
Preloader For Master.swf Which Loads All External Swf Files.
Hi all-
I'm having a bit of a problem. I have a flash site that I'm making (my first one) and I want to have a preloader load my master.swf file. My master.swf file loads all other external .swf and .jpg files with a nice progress bar etc. However, when I first vist master.swf in my browser I have to put a not so nice "LOADING PLEASE WAIT" ugh. All my code is below for you to take a look at.
Is there any way to load my master.swf file with a nice preloader like I want or should I go about doing this a totally different way?
I have export frame for classes set to 1.
trigger.swf - my shared library and probably the largest file size since it has all the fonts I use in it.
preloader.swf - the preloader the master.swf file uses when loading external .swf and .jpg files.
mainmenu.swf - my navigation for my site.
splash.swf - the splash page for my site.
music_player_fin.swf - my little juke box that I made.
To see the swf in action visit http://spazio.dvdfuture.com/flash/master.html
master.swf
Frame 1
Code:
stop();
// ------------------ MCL ------------------ \
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
_level50._visible = true;
var preloaderPercent:Number = Math.round((loadedBytes/totalBytes) * 100);
_level50.preloader.gotoAndStop(preloaderPercent);
}
myListener.onLoadComplete = function (target_mc) {
_level50._visible = false;
}
myMCL.addListener(myListener);
// ------------------ /MCL ------------------ \
myMCL.loadClip("trigger.swf", 5);
myMCL.loadClip("preloader.swf", 50);
Frame 2:
Code:
stop();
myMCL.loadClip("splash.swf", 5);
myMCL.loadClip("mainmenu.swf", 20);
myMCL.loadClip("music_player_fin.swf", 10);
Below is the code in my mainmenu.swf
Frame 1:
Code:
stop();
//----------------<changeOptionColor options>-----------------\
var overFrame:Number = 2;
var outFrame:Number = 1;
MM_Button1._alpha = 20;
MM_Button2._alpha =20;
function changeOptionColor (myOption:MovieClip, myFrame:Number) {
myOption.gotoAndStop(myFrame);
}
//----------------</changeOptionColor options>-----------------\
//----------------<re-enable menu options>-----------------\
function reActivateBtns() {
MM_Button1.enabled = true;
MM_Button2.enabled = true;
MM_Button1._alpha = 20;
MM_Button2._alpha =20;
changeOptionColor(MM_Button1, outFrame);
changeOptionColor(MM_Button2, outFrame);
};
//----------------</re-enable menu options>-----------------\
//----------------<Button1 option>-----------------\
MM_Button1.onRollOver = function () {
this._alpha = 100;
changeOptionColor(this, overFrame);
};
MM_Button1.onRollOut = function () {
this._alpha = 20;
changeOptionColor(this, outFrame);
};
MM_Button1.onRelease = function () {
reActivateBtns();
this._alpha = 100;
this.enabled = false;
changeOptionColor(this, overFrame);
_level0.myMCL.loadClip("button1.swf", 5);
};
//----------------</Button1 option>-----------------\
//----------------<Button2 option>-----------------\
MM_Button2.onRollOver = function () {
this._alpha = 100;
changeOptionColor(this, overFrame);
};
MM_Button2.onRollOut = function () {
this._alpha = 20;
changeOptionColor(this, outFrame);
};
MM_Button2.onRelease = function () {
reActivateBtns();
this._alpha = 100;
this.enabled = false;
changeOptionColor(this, overFrame);
_level0.myMCL.loadClip("button2.swf", 5);
};
//----------------</Button2 option>-----------------\
View Replies !
View Related
[F8] Preloading... It's Loading Later Things Before It Loads The Preloader
I have made a lot of preloaders before but for some reason this one is being weird.
I set it up how it should be, actionscript is good. Preloader is in scene before new one. Everything works right, but it loads like 60% before it even shows the preloader. It's white for a few seconds then the preloader just jumps to like 60%.
And on the bandwidth profiler it says it has 60kb to load on the first frame... which I have nothing on the first frame.
Would be be because I'm using components? or I have a lot of actionscript in the next scene?
View Replies !
View Related
[CS3] AS2 Web Site Stalls After Preloader Loads File
Hello,
This is my first post and I hope there is someone out there who wouldn't mind donating some of their time and giving me a hand. I would be happy to repay the favor some day in the future.
So anyway, I have this site that was working fine, then I added some features and I broke it. Now I am trying to recreate the site in order to trace the problem. Only once I brake my file, I remove the last component which appeared to cause the problem and it is still broken. I don't have that much code, and there is really not too much going on in the .fla. My file size is 246,839 bytes, not too large. The original file once completed wasn't too much bigger at 323,287 bytes. What happens is that my preloader works, correctly loading the file, then it goes blank for about 30 to 60 seconds and then everything works correctly. During this stall it appears as though the browser is going to crash. This consistently happens with firefox, safari, and IE. I tried to streamline the file and remove animations I didn't need, take out motion tweens with alpha properties in them, toning down my frame rate from 30 to 25, and nothing seems to help.
Original File:http://digitaluprisingdesign.com/newSite/
Recreated Toned down home page only:http://digitaluprisingdesign.com/new...UDBasicV2.html
The original above actually isn't the complete original either as I was trying to tweak some components that contained tints and alphas as well, you'll notice.
If anyone is interested, I'd be happy to e-mail source files.
Thank you in advance,
Justin
Did I mention I am about to rip my hair out?
View Replies !
View Related
Preloader W External Swf Loads Movie Too Early
Hi all,
I've been tearing my eyes out trying to figure this one out. I have a game in a swf file, and I have another swf file which only contains my preloader. The preloader file has only 1 frame and 3 layers wich controls progess bar etc. My problem is that the movie is played before the actual movie has loaded 100%. Instead, when my loader reaches around 50% it disappears and the game swf is played which isn't good since every game component hasnt been loaded yet. Any ideas on why this is happening?
I'm using the tutorial
http://www.lukamaras.com/tutorials/p...preloader.html
Code:
siteLoader.loadMovie("game.swf");
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function() {
kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
if (percentage == 99) {
delete this.onEnterFrame;
}
}
I have also tried using loadMovieClip but I get the same effect. Why is my preloader exiting before the entire swf is loaded? Any help would be greatly appreciated.
View Replies !
View Related
Problems With My Preloader Which Loads External Images
I seem to be having trouble with my preloader. I have 7 categories of pictures with different picture totals for each group. They are to be loaded externally.
1. I made a scene before the main website with an empty movie clip offstage called introHolder.
2.Then I made looping code:
ActionScript Code:
picGrps = ["intro", "acc", "clt", "fd", "fun", "grm", "hm", "luv"];
picTotals = [8, 5, 3, 3, 5, 4, 6, 5];
//
function preloadPics() {
_root.introHolder.loadMovie("pb_address.jpg");
for (x=0; x<=picGrps.length-1; x++) {
for (y=1; y<=picTotals[x]; y++) {
_root.introHolder.loadMovie("pb_"+picGrps[x]+y+".jpg");
trace(picGrps[x]+y);
}
}
}
This should load intro1.jpg all the way up to 8, then acc1.jpg all the way up to 5, etc. When I trace, it shows all of these names.
Then, about 5 frames later I have the typical preloader script:
ActionScript Code:
total_bytes = _root.introHolder.getBytesTotal();
trace(total_bytes);
//sets a variable equal to the bytes loaded of the movie
loaded_bytes = _root.introHolder.getBytesLoaded();
//sets a variable equal to what's left to load
remaining_bytes = total_bytes-loaded_bytes;
//coverts remaining bytes to an integer in percent
percent_done = int((loaded_bytes/total_bytes)*100);
//makes the bar movie go to the frame equal to the percent done
bar.gotoAndStop(percent_done);
if (percent_done == 100) {
gotoAndPlay("placeholder", 1);
}
The frame after this has an action telling it to go back to the above script if not loaded.
So, the problem......
The pictures (when traced) say they're loaded, but they don't seem to be really loaded. The movie goes to the "placeholder" scene BEFORE all of these pictures are loaded...what am I doing wrong?
View Replies !
View Related
Preloader That Loads A Percentage Or Specified Number Of Frames, Help Please
hi,
i've googled and searched the forum here for a (simple) way to use a preloader that loads a percentage or specified number of frames. What i find is preloaders that load the total frames.
here is the action script used:
if (_framesloaded>=_totalframes) {
gotoAndPlay("Scene 1",1);
} else {
gotoAndPlay("preload",1);
}
is there a way to modify this simple script or do i need to use another script? i tried changing "totalframes" to "300frames". But it didn't work and i just shooting in the dark here.
help please
thanks
gregory
View Replies !
View Related
Preloader Issues - Loads Scene 1 Fine But...
NOOB here again... I did finally (with help) get my first flash movie/menu working, oh happy day. Now I have built a simple preloader in a seperate Scene above Scene 1, and it works up to the point the main SWF is supposed to play. The preloader loads the movie correctly and goes to the 1st frame in Scene1 and then it just sits there..mocking me. I have this code in the first frame of the preloader Scene:
ifFrameLoaded ("Scene 1", _totalframes) {
gotoAndPlay ("Scene 1", 1);
}
And this code in the last frame of the preloader to keep it looping until Scene 1 loads and the preloader Scene breaks:
gotoAndPlay ("Preload", 1);
Once Scene 1 is fully loaded, the preloader Scene goes by-by as it should, but the main Scene just sits there. None of my nested movie clips are playing but the background is there and the buttons are working. I have (2) nested movie clips on their own timeline doing nada, however everything plays fine without the preloader. I am missing something simple aren't I. ???
View Replies !
View Related
Preloader Loads Half Movie Before Showing Up?
I created a preloader using one of the tutorials on this site ( http://www.kirupa.com/developer/mx/p...epreloader.asp ). Now it works great, however when i use it in my movie which is 120Kb, it loads 60Kb before it even shows up? anyone know why this could be happening? and if it's possible to avoid?
I did edit the code to load some extra levels, but even the un editied code has the same results so I don't believe thats the problem.
This is how I have it to load the levels, Im assuming it will work?
PHP Code:
bytes_loaded = Math.round(_level0.getBytesLoaded())+(_level2.getBytesLoaded())+(_level3.getBytesLoaded());
bytes_total = Math.round(_level0.getBytesTotal())+(_level2.getBytesLoaded())+(_level3.getBytesLoaded());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}
Cheers.
View Replies !
View Related
|