Preloader Help (again)
I need the preloader to go to another scene once it finishes loading. This isn't working: if (percentage>99) gotoAndPlay("main",1); (my preloader already has working percentage code)
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-29-2005, 11:04 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do I Make A Fast And Easy Preloader Or A Hard Cool Looking Preloader
how do i make a preloader?? ive went thru many toutorials and they dont make sense to me i want a cool looking preloader if i can but if not!! a preloader that is jest flashing the words "loading" would be nice to know how to make....
im kinda new to flash MX and all Flash programs so could u explain verry well???
Preloader Not Showing In The Beginning? Did I Make The Preloader Wrong?
alright, it seems that my preloader does not show until the movie is about 85% loaded, and then after that it works fine. but how do i get the preloader to show from the begining? here is the site...
http://www.trikenit.com/6n/preloader.html
and here is the fla for the preloader
http://www.trikenit.com/6n/preloader.fla
if anyone could help me out with my preloader i would be so very grateful. thank you in advance.
Preloader For Importing Swf - Join To Initial Preloader On Level0
Hi all,
I have looked on many forums in order to sort this problem but can't quite get there.
I have a main movie (presentation.swf) which is a presentation which runs for about three minutes. After about a minute into the presentation it imports a swf (base.swf - placed onto level1) into the movie which then jointly runs together in realtime with the _root level0 movie. It all works fine. I have created a preloader on the root movie (presentation.swf - level0) which is OK but I can not work out how I can add the second swf (base.swf) onto the initial preloader. The problem is that I have lost the fla file of the base.swf file so can not add a preloader or any extra actionscript onto the base.swf file.
I have tried to see if by checking if level1 is loaded
Code:
if (_level1.getBytesLoaded() == _level1.getBytesTotal()){
_root.gotoAndPlay(20);
}
I have also tried to create a third swf which imports both the presentation.swf and base.swf but failed to produce anything.
The preloader that I have works well by its self. The code is shown below
Frame 4
Code:
_root.loadPercentage.text = "0";
_root.loadedBytesText.text = "0";
_root.ofLoadedBytesText.text = Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000;
Frame 5
Code:
_root.loadPercentage.text = (Math.floor (_root.getBytesLoaded() / _root.getBytesTotal() * 100));
_root.loadedBytesText.text = Math.round(((_root.getBytesLoaded() / 1024) * 1000) / 1000);
_root.ofLoadedBytesText.text = Math.round(((_root.getBytesTotal() / 1024) * 1000) / 1000);
// START OF WORKING OUT TIME REMAINING
counter = counter + 1;// the counter incrementing 12 times (12 - set by stage)a second
seconds = counter/12;// Converting the counter into Seconds
timeMinRemaining = Math.floor(((seconds/(Math.floor(_root.getBytesLoaded() / _root.getBytesTotal() * 100))*100)-seconds)/60);
timeSecRemaining = Math.floor((seconds/(Math.floor(_root.getBytesLoaded() / _root.getBytesTotal() * 100))*100)-seconds) - (timeMinRemaining * 60);
_root.TextTest1.text = timeMinRemaining;
if (seconds == Math.round(seconds)) {
if (timeMinRemaining == 0) {// If No minutes remaining then display only minutes remaining
_root.minRemainingText.text = "";
_root.minRemainingLabel.text = "";
_root.secRemainingText.text = timeSecRemaining;
_root.secRemainingLabel.text = "sec";
} else {// If MORE THAN 0 minutes remaining then display minutes and seconds remaining
_root.minRemainingText.text = timeMinRemaining;
_root.minRemainingLabel.text = "min";
_root.secRemainingText.text = timeSecRemaining;
_root.secRemainingLabel.text = "sec";
}
}
if (_root.getBytesLoaded() == _root.getBytesTotal()){// REDIRECT TO START OF SCENE
_root.loadPercentage.text = "100";
_root.loadedBytesText.text = Math.round(((_root.getBytesLoaded() / 1024) * 1000) / 1000);
_root.ofLoadedBytesText.text = Math.round(((_root.getBytesTotal() / 1024) * 1000) / 1000);
gotoAndPlay("PreloadComplete");// The preloader was used, therefore goto Close of Preloader
}
Frame 6
Code:
gotoAndPlay(5);
Please I would appreciate your help
Thanks
Preloader Issue - Code Is Correct, But Preloader Is Flakey
I'm using Flash MX 2004 to develop a flash-based website.
There is one main movie, and several external .swf's that are loaded into the main movie as needed.
All movies have a basic preloader, created as follows:
All movies have 2 scenes.
The first scene contains the preloader, which is 3 frames in total.
Frame 1 contains the following script:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
Frame 2 contains the following:
this.gotoAndPlay(1);
Frame 3 is blank.
There is a 2nd layer which contains a dynamic text box which calls the variable "loadText".
This preloader works great in the main movie. The main movie contains buttons which call external SWFs to be loaded into a holder MC on the main movie's timeline. When I load an external SWF into my main movie, the preloader doesn't show up at first. At about 60%, the preloader FINALLY shows up and counts the last 40% before the movie plays.
After several attempts, I noticed that the problem is not with the code itself, but might have something to do with the amount of data loaded into frame 1 of my movies.
Using the debugging tool, and looking at the graph that Flash provides when previewing a movie, I noticed that my main movie contains about 5kb of data in Frame 1, and as mentioned above, the preloader works just fine.
When previewing each of my external SWFs separately, I noticed that the amount of data on Frame 1 of those movies is much greater - 101kb.
After searching the help files, I read somewhere that Flash MX 2004 loads certain data into the first frame of the movie by default, and I'm guessing that THAT is what's causing the preloader not to show up instantly.
Would appreciate any help in clarifying this issue, as the site is completely done except for this preloader problem.
TIA.
Large Movie Preloader /External Preloader Question...
I have a fairly large movie (about 380KB) with a status bar preloader in the first frame. The problem is that I load a few of the MC's in the movie into ScrollPanes and then don't work unless I export them on the first frame (these MCs make up about 200KB). Therefore, there is no flash shown until it has loaded up about half way.
I tried to use an External Preloader, but that loaded the MC on level 1, and no buttons or functions within the entire movie worked properly.
My question is, is there a way to either use the external preloader and swap (or reload) the movie on level 0, or does anyone know a way to load the MCs on another frame other than 1, but before they load to the Scroll Pane? Any other ideas would also be appreciated.
Thanks!
Complex Preloader - Load Multiple Movies W/ One Preloader
Hello to all!
I haven't asked a good question in quite a while so here's one.
I know how to create a general preloader fairly well. What I want to do is take it one step further.
I want a preloader with a status bar...but here's the caveat...I want it to load multiple external movies instead of just one. So it would load one after another and show the status of each.
I can't think of a site off the top of my head, but it would show loading and then it would load...say audio player...shows text "Loading Audio Player" and then shows loading progress...and then...image loader...shows text "Loading Image Loader" and then shows loading progress, etc.
You get the point.
Any takers?
Thanks.
Fuse And Preloader: ZigoEngine.register() Slows Preloader
Here's something I came across and am wondering if anyone ran into this issue and found a workaround.
- My entire SWF is 200kB in size.
- I have a preloader on the first frame of my movie and its an animation which is about 24kB big.
- The rest of the content is on the third frame of my movie and also on the third frame is where I register the ZigoEngine.
Now, here's what's happening:
- The preloader doesn't show right away. There appears to be some 65kB-70kB added on the first frame when I register the ZigoEngine for Fuse.
- When the preloader shows, it's already at around 44%-50%
- If I remove the code where I do the registration, the preloader loads fine.
I am guessing the overhead is happening because the registration is global. But, is there a way I can fix this or is it impossible considering the nature of the Fuse registration call?
Preloader-moving On To An Actionscript Based Preloader
Most of the sites I have designed have just used an "if frames are loaded preloader". However, I want to get a more effecient preloader by using the _framesloaded and _totalframes properties of the movie to give a more accurate preloader . I was wondering if anyone knew where I can find a good tutorial or see an example of an FLA that uses this style actionscript based preloader.
Please let me know so I can start working on figuring this out!
Thanks Dave
Actionscripted Preloader Content ....egomedia Preloader
I have aquired a preloader, it is the egomedia preloader by unclickable. I have the .fla if required...problem is that the content is an actionscripted animation. Now how the hell do I add actions to the .fla to make it operate as a preloader..The .fla basically is not a preloader but just a animation there are no references in the code to ifframesloaded etc..I would appreciate some help ..like I say I have the fla and could mail it to whoever..All someone could do is pop the actionscript in for me and explain to me how it works..thanks in advance
How Can I Make A Second Preloader Play If A File Is In The 1st Preloader?
OK I'm going to try to explain this
I have a preloader on my main movie to preload external files. This preloader preloads the external files and places them into a empty movie clip.
What I would like to do is have 2 preloaders if the 1st preloader was used, I would like the second preloader to be used there on after.
I'll try to explain what is happening I have 3 buttons to load 3 external files on a blank MC if a external file is present on the MC I what to use a second preloader. I need to use a second preloader because the first preloader is a progress bar that goes across the whole MC. If a external file is on the main I want to use a smaller progress bar.
If you have any suggestions I would appreciate your help
Thanks
Preloader Inside Preloader Type Thing
Hi,
I've got like a main page that has a preloader in a different scene. And in the main page I call loadMovie on first frame that load external swf that has same structure - preloader scene with a main scene (content for the main page) ... but the first preloader seems to wait to load the actual page and the external swf before if finishes. Why is the first preloader not just preloading for the home page and then once u are there the other preloader kicks in and loads the content??? Also the preloader seems to have a wait till 20 % before it actually appears on the screen how is that?
code is
frame 1
-----------------------------
total_bytes = _root.getBytesTotal();
kb = int (total_bytes/1000)
loaded_bytes = _root.getBytesLoaded();
kb_loaded = int (loaded_bytes/1000);
remaining_bytes = total_bytes-loaded_bytes;
kb_remaining = int (remaining_bytes/1000);
percent_done = int((loaded_bytes/total_bytes)*100);
bar.bar2.gotoAndStop(percent_done);
ifFrameLoaded ("main", 1) {
gotoAndPlay ("main", 1);
}
--------------------------------
frame 2
gotoAndPlay(1);
Cheers
More On Background Swf Loading *or* PRELOADER OF A PRELOADER
Deja vu, but here we go! I asked this before, but I'm still not quite there. I can guess you can call this post HOW TO MAKE A PRELOADER OF A PRELOADER! lol...
Here's the setup. I have 3 swf files burned off. In other words, I will have a main movie with two buttons that will load each of the other two (depending on which button is clicked) with the "loadMovie" action. I have a preloader setup for all the movies. So, when button one is clicked it will load the first swf into level 1, etc and the preloader animation will run until it's loaded...etc. for the other swf and button.
Now, that's the setup, here's what I'm looking to do.
Is there a way (on the main stage) to set an action that will start the loading process of the other two swfs (that the buttons activate)"in the backgroud" BEFORE the buttons are pressed. In other words, I want to start the loading process before anything is done and then when the button is clicked, what hasn't been loaded, if any, will finish off with the preloader animation going.
TWO THINGS:
1) I want to do this with multiple swf's (as explained above) NOT one huge swf with all the scenes.
2) Even if the swfs finish before a button is clicked, I want them to just "sit there" invisible until a button is clicked. I know that I can achieve the invisible effect by leaving the first frame of each loaded swf blank and applying a stop action.
3)The clips that I will be loading are the same size of the stage, therefore, will be covering up the main timeline completely (an "unloadMovie" action is put into a button to get back to the main timeline which acts as a "back" button of sorts).
Well, that's about it. I hope I explained it thouroughly enough. Some extra info....on the main timeline I have the preloader on frame 1 (an anonymous one, it works for any timeline of any scene or swf that I put it on), then my "main" page on frame 2 (the one with the two buttons).
Thoughts and impressions:
Should I load each of the swf's into their own movie clip in level 1? I don't know if this would make a difference, but I'm throwing it out there for comments!
Preloader For Another Movie In Current Preloader
say i have a preloader, for the first movie. in the first movie, at the end of the movie, i put up an action script in which it will load another movie call second movie
see, if the first movie got 30 frames, and at frame 30 the second movie is loaded (loadMovie method), the preloader is utterly useless cause users still need to wait at frame 30 of first movie for second movie to load.
so what i'm trying to ask here is can first movie preloader check or make second movie load then show it at frame 30.
to make things clearer, heres my source code for preloader
ifFrameLoaded ("main", 30) {
gotoAndPlay ("main", 1);
}
well looks simple, but doesnt check and see if the second movie is loaded onto frame 30
any help?
Scene Preloader Vs Movie Preloader
hi
I have a movie with about six scenes. Each scene begins with a simple preloader...
if (_root.getBytesLoaded()>=_root.getBytesTotal()) {
gotoAndPlay(4);
}
The trouble is that I think that this script only works on the first scene because it is loading the whole movie rather than just the scene to which it belongs.
does anyone know how i alter the script so that it only gets the BytesLoaded and BytesTotal of the current scene rather than the whole movie?
thanks very much for your time.
Preloader Only Showing After 30% (can I Preload A Preloader?)
Im trying to make a diferent kind of preloader. Its a dog that pulls the loader bar....
I made the dog MC animation, and i have a Bar_mc with this code
Code:
onClipEvent (load) {
_xscale = 0;
}
onClipEvent (enterFrame) {
counter = math.floor(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);
_parent.counterpercent = counter+"%";
// if loaded, play;
if (counter>=100) {
_parent.gotoandStop(5);
// Alex troque isso para a ação quando tvier em 100%
} else {
// if not loaded, set the status bar width;
_xscale = counter;
}
}
So far so good, but it seems that the preloader will only appear after 30%, i guess the dog MC is heavy and it is stoping the loader to be displayed earlyer, all i get is a blank screen and near 30% all the elements pops out... Is there a way to preaload a preloader? , how can i fool that? pls my deadline is so near
Preloader (multi-external Preloader)
This loader i made is makeing my movie play() before its done? ARG!
Anyone see anything i overlooked?
Thanks,
PHP Code:
bytes_loaded = 0;
bytes_total = 0;
numOfThumbs = 15;
for (l=1; l<=numOfThumbs; l++) {
loadMovie("Images/Thumbs/image"+l+".jpg", _root.thumbStrip["TN"+l]);
_root.thumbStrip["TN"+l]._y = _root.thumbStrip["TN"+(l-1)]._y+thumbHeights;
}
for (t=1; t<=numOfThumbs; t++) {
bytes_total += _root.thumbStrip["TN"+t].bytesTotal;
}
this.onEnterFrame = function() {
for (f=1; f<=numOfThumbs; f++) {
bytes_loaded += _root.thumbStrip["TN"+f].bytesLoaded;
}
if (bytes_loaded>=bytes_total) {
_root.play();
delete this.onEnterFrame;
} else {
_root.stop();
loaded_txt = bytes_loaded+"/"+bytes_total;
loaded_percent_txt = (bytes_loaded/bytes_total)*100 add "%";
}
};
Loadmovie With Preloader (preloader Won't Work)
I finally managed to get my .swf to load into a movieclip on my main movie.
now the problem is that it doesn't show the preloader, it just sits there until it's loaded then starts to play.
i've read just about everything i got my hands on but can't figure out why the preloader won't play.
here is my code on my main movie's main scene
myButton.onRelease = function (){
_root.target_MC.loadMovie ("movie.swf"), 1);
}
any help would be greatly appreciated.
thanks
Help How Can I Make A Preloader Bar With This Preloader Code?
Hi,
I have external swf's loading into an empty movie clip, I'm using this preloader at the first frame of every external swf.
Code:
stop();
function waitForLoad() {
bytesLoaded = this.getBytesLoaded();
bytesTotal = this.getBytesTotal();
percent = Math.floor(bytesLoaded/bytesTotal * 100);
if (bytesLoaded == bytesTotal && bytesTotal > 4) {
trace("done loading");
delete this.onEnterFrame;
this.gotoAndPlay("fr1");
}
}
this.onEnterFrame = waitForLoad;
I don't have a clue how to make a bar show the loading progress. Is there an easy way I can implement it into this preloader code?
External Preloader/ Internal Preloader
can someone explain me the difference? i am trying to achieve a loader but that loads a movie clip wich is part of the same swf(i dont see the point in converting this mc to a jpeg as it would weight more), how can this be achieved?
Help Making Preloader Into A External Preloader
Hey Flash Gurus
I need some help changing a preloader I have into a preloader that can be used for loading external swf.
Now the code for the preloader is
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);
}
Ie the preloader and steps through a preloader animation filling the logo (ie loader)
Now I have tried changing a few things but having problems tried loading into a container and a level
Help would be awesome
Thanking you in advance
jacko
Help Making Preloader Into A External Preloader
Hey Flash Gurus
I need some help changing a preloader I have into a preloader that can be used for loading external swf.
Now the code for the preloader is
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);
}
Ie the preloader and steps through a preloader animation filling the logo (ie loader)
Now I have tried changing a few things but having problems tried loading into a container and a level
Help would be awesome
Thanking you in advance
jacko
Preloader Starting At 82% And Another Preloader Not Working
i have two new problems now , my global preloader is starting at 82% , i do imagine why but not sure, i suposse that all my MC are been loaded at 1st frame althouth my movie starts at 5th frame in scene 2 ... is there any way to tell MCs to load at 5th frame ?
and another preloader working when i use Crtl+enter But not working at the web when i upload it into internet, here is the code of the preloader (the second one)Code:
function fotografia(numero, texto) {
_root.MCInstalaciones.ventanita.fotoin.createEmptyMovieClip('holder', 1);
//load the external movie into the new movieclip
_root.MCInstalaciones.ventanita.fotoin.holder.loadMovie('imagenes/'+numero+'.jpg');
_root.MCInstalaciones.ventanita.notainsta.textodefoto.text = texto;
};
//check the download status of the external
//movie once every frame
_root.MCInstalaciones.ventanita.fotoin.onEnterFrame = function() {
//trace the porcentajeage of the movie that has loaded
porcentaje = (_root.MCInstalaciones.ventanita.fotoin.holder.getBytesLoaded()/_root.MCInstalaciones.ventanita.fotoin.holder.getBytesTotal())*100;
if (!isNan(porcentaje)) {
_root.MCInstalaciones.ventanita.porcent.text = porcentaje;
} else {
_root.MCInstalaciones.ventanita.porcent.text = porcentaje;
}
if (porcentaje == 100) {
delete _root.MCInstalaciones.ventanita.fotoin.onEnterFrame;
}
}; this code is called when mouse moves over and now that i write this i am getting an idea why is not working......maybe this code only executes once , a single time, due to that is called from a mouseover event? if so why does it work when i do crtl+enter
could that be the cause?
Here is the link to my temporarely work where preloaders fail to do their job http://sultanos.shinranet.com/pupito.html
second preloader is to load images at INSTALACIONES link
Mask To Reveal Preloader And Mask To Hide Preloader Upon Load.
Hi all, can anyone help me in regard to a mask over a preloader of elements.
Ok I have a preloader all set up, this includes a logo, a notice, i.e please wait loading in progresss, a load bar, and a percentage reading.
All I want is a simple wipe effect using a mask, which is very easy to achieve, I have done so already. But I am unsure in how to hide all the preloader elements, and how to use the wipe to reveal all elements on the stage / timeline. I have the wipe setup using two layers, and decided to place these inside a movie clip and place the movie clip on the timeline. But now I am stuck in what to do next.
As when everything is loaded I want the wipe to hide the preloader and move onto the design aspects.
Does anyone have an idea how to achieve this?
Preloader - Please Help... (How Can My Preloader Get Cached?)
I was having trouble with the page that my movie clicks to upon it's conclusion, but now I got my page "Error Free" now, but I am still confused. I got some preloading movie from this site and I added it to my first two frames. Now, it came with Movie-Clip coding. Do I take out that code and add in the code that tells the user's computer to load the movie and then skip to Frame 3 once it is loaded in? Sometimes I see that there is code on the preloader and depending on how I click on it, I can add additional/different coding to that frame. Then, I also get confused on the original "_ifFrameLoaded == _totalFrames" code and the code that doesn't have the preloader play every time the same user watches my movie.
http://www.BillyJoelMusic.com/ClassicalMusic2.shtml
Thanks for the help!
Dan from Long Island
Preloader Main Swf And Sub-preloader
Hi,
Got a bit of problem with preloader, First preloader the main.swf and then when i load the external.swf will run the preloader before playing because my external movie together with a lot of movieclip.
Main movie : intro.swf
External movie : 1.swf , 2.swf, 3.swf, 4.swf
How do i put the code?
Thanks
Preloader With A 100 Frame 'preloader'
My question is, (Flash 5 or MX) is there a way to make a preload script that can tell my preloader to go to a frame based on the percentage loaded. i.e., i have a preloader animation made that is 100 frames long... when 15 is loader i want it to goto frame 15 and 30% goto frame 30. I'm pretty sure this is possible in MX since ANYTHING is possible , but is it also available in 5? any help with either versions is greatly appreciated.
thanks
Preloader Inside A Preloader
ok at my website www.thornburyselfstorage.co.uk i am making a tour. it is a full flash site and the swf loads into it another swf which is each page. i want the preloader that is standard for every page in the site to preload my tour.swf which the 1st scene is a preloader. ok i have attached the main design (design.fla) and the tour which only loads a page with just coming soon (tour.fla) and the beings of my new tour (tour preloader.swf).
i hope that made sense
thanks
Preloader And Nested MC's With Preloader
Hi,
I have a flash movie with a preloader with the following code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
if (percent>99) {
_parent.gotoAndPlay(2);
}
}
I then use the percent value to influence my loading animation.
I have a external mc loading into my main movie, I've used the same code above in it as a preloader when I preview this movie it works fine, but when I run my main movie the preloader seems to stop working.
I have used this before in different projects and have run into this same problem but can't seem to remember how I fixed it.
I have looked at these previous projects code, it is exactly the same in the main movie as it is in the external movie.
Any help would be much appreciated>
Preloader Text W/ Pie Preloader
i'm using the script that i modified from sbeener's pie preloader.
here's the code i have
Code:
MovieClip.prototype.drawMeter = function(t,l){
var p = l/t;
var r = 16;
var v = [[r,-r],[r,r],[-r,r],[-r,-r]];
var d = Math.ceil(p*4);
var s = this.getProgress(p);
with(this){
clear();
beginFill(0x560000);
lineTo(0,-r);
for(var i=0;i < d;i++){
lineTo(v[i][0],v[i][1]);
}
lineTo(s.x,s.y);
endFill();
// in drawMeter()
if(t == l){
// when loaded actions
_root.nextFrame();
}
}
}
MovieClip.prototype.getProgress = function(p){
var r = 20;
var s = Math.PI + (-p * Math.PI*2);
return({y:Math.cos(s)*r,x:Math.sin(s)*r});
}
MovieClip.prototype.drawCircle = function(r, x, y){
this.moveTo(x+r, y);
this.curveTo(r+x, -0.4142*r+y, 0.7071*r+x, -0.7071*r+y);
this.curveTo(0.4142*r+x, -r+y, x, -r+y);
this.curveTo(-0.4142*r+x, -r+y, -0.7071*r+x, -0.7071*r+y);
this.curveTo(-r+x, -0.4142*r+y, -r+x, y);
this.curveTo(-r+x, 0.4142*r+y, -0.7071*r+x, 0.7071*r+y);
this.curveTo(-0.4142*r+x, r+y, x, r+y);
this.curveTo(0.4142*r+x, r+y, 0.7071*r+x, 0.7071*r+y);
this.curveTo(r+x, 0.4142*r+y, r+x, y);
}
this.createEmptyMovieClip("loader",0);
this.createEmptyMovieClip("mask",1);
this.mask.beginFill(0xfeefff);
this.mask.drawCircle(16,0,0);
this.mask.endFill();
this.loader.setMask(this.mask);
loader.onEnterFrame = function(){
if((i++) < 100){
this.drawMeter(100,i);
}
}
this.preloader_mc.loadedFile.onEnterFrame = "The movie is " + p + "% loaded";
here is my question. the last line of the code defines what the textbox contained inside a clip called preloader_mc with a variable of loadedFile should display the percentage loaded of the file according to the variable p set at the beginning of this code
why doesn't this work?
by the way sbeener, it wasn't working b/c i did miss one of the _roots ... it was acting funny b/c the mask was being put on the _root still so it had nothing to mask since the meter was inside the symbol instance i made. now it works fine though :) well except for the text thing i'm trying to do now :)
Preloader Bug - Easing Preloader
Hello all,
Im having some weird buggy issues with my preloader and was wondering if anyone can take a look to see if you can see anything that may be causing this :?
The bug is sort of hard to explain. The loader works most of the time, but when someone double clicks on a link to load a section, the loader seems to get stuck in a loop - like i didnt put a stop frame at the end of the timeline :?
I get the same bug when I test the movie in flash and simulate the download at cable modem speeds, but I dont seem to get it at 56k simulated speeds.
Im baffled - can anyone think of what this could be?
the code is as follows:
Code:
function preLoader(bar:MovieClip,targetClip:MovieClip){
var loaded:Number = targetClip.getBytesLoaded();
var total:Number = targetClip.getBytesTotal();
var percent:Number = loaded/total;
var dummy:Number = Stage.height*percent;
bar._height += (dummy-bar._height)/4;
if(bar._height>=Stage.height-1){
clearInterval(preloaderInt);
targetClip.play();
}
updateAfterEvent();
}
preloaderInt = setInterval(preLoader,40, loaderBar, _parent);
Thanks a million in advance!
JTK
[preloader][as2] One Preloader To Rule Them All
inhabitants of middle earth,
i have a question about preloaders. lets say i'm using the following function to load a movie:
ActionScript Code:
public function loadContent(strContentPath, objTarget)
{
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.loadClip(strContentPath, objTarget);
}
and i'm calling the function like this:
ActionScript Code:
loadContent("MyMovie.swf", _root);
i want to be able to add a generic preloader so that i can plug it in to this loadContent() function, such that any movie i load can use the same preloader. my understanding is that a preloader is basically just another movie clip, so i should be able to achieve this, right?
any help would be greatly appreciated.
A Preloader That Doesn't Look Like A Preloader.
I'm kinda new to actionScript, so.....
I've been asked to design my larger flash ads (yes, I'm making ads, not websites) with a short (low file size, fast loading) intro that could play until the rest of the ad is loaded. They want the page to load, with ads, quickly, but retain the ability to have larger, longer timeline animations play once everything else is loaded.
so I've been going over several tuts covering preloaders, and some to load external swfs. But I don't want a progress bar, and I can't figure out how to start loading a movie clip but but not start playing it until getBytesLoaded = getBytesTotal.
Quicktime Preloader | Mp3 Preloader
Hello - everything refers to FLASH MX 2002~2003 not the latest version :
1. Can anyone please tell me a link with the best tutorial for a QUICKTIME movie preloading inside a flash movie ?
2. Also for an mp3...
3. Now other question - I used the classic preloader script for the SWF file with the soundrack, and it looks like this :
if soundtrack.getBytesTotal=soundtrack.getBytesTotal
then go to frame 20
else go to frame 19
The script and the "soundtrack" instance are on the same level.
Sometimes the website starts with unloaded soundtrack... how that could be possible...
I'm waiting for your answers, thanks.
Loading Movie With Preloader In Movie With Preloader - Problem
I have problem this problem:
I have main MC (SWF) with preloader.
I load in this MC another MC1(SWF) and this MC1 have preloader too.
During preloading blinks the main MC and MC1 => nothing is loaded.
If i remove from MC1 preloader all works without problem, but i must use preloader for MC1 too.
How can i solve it?
I think the problem is, that i use the same code for both MCs and preloader goes in some loop.
I use this preloader:
Code:
onClipEvent (enterFrame) {
_root.preloader.bar._xscale = siteLoaded;
siteLoaded = int((loaded_bytes/total_bytes)*100);
// bytes
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
// frames
frame_loaded = _root._framesloaded;
frame_total = _root._totalframes;
// kilo bytes
totalkb = int(total_bytes/1024) add "KB";
loadedkb = int(loaded_bytes/1024) add "KB";
remaining_kb = int(remaining_bytes/1024);
remainingkb = int(remaining_kb) add "KB";
percent_done = int((loaded_bytes/total_bytes)*100) add "%";
// time
time = getTimer()/1000;
// speed
speed = loaded_bytes/time;
bits = speed/1024;
Kbps = Math.round(bits*10)/10 add "KB/S";
// time remaining
kbyteCounter = (total_bytes-loaded_bytes)/1024;
loadRate = (loaded_bytes/1024)/time;
timeCounter = kbyteCounter/loadRate;
minutes = Math.floor(timeCounter/60);
seconds = Math.round((timeCounter/60-minutes)*60);
time_remaining = minutes+" min "+seconds+" sec";
// timeelapsed
minute = Math.floor(time/60);
second = Math.round((time/60-minute)*60);
time_elapsed = minute+" min "+second+" sec";
if (total_bytes == loaded_bytes)
{
_root.gotoAndStop (2);
}
}
How should i set preloader for MC1, which is inside of main movie MC?
I load MC1 (extertal SWF) in empty MC2 in _leve0 of main movie MC.
Thanks Jan
Help With Preloader
I made a preloader in one scene and the movie in the second scene. But whenever the movie is fully loaded and the preloader is told to go to the next scene and play it, it'll just jump to the 1st frame of the next scene and stop and it won't play at all. I tried putting a play action in the 1st frame of the second scene but all that does is make the second scene jump to the preloader back and forth.
Here are the keyframes actions for the preloader:
1st keyframe:
objTime = new Date();
varStartSeconds = objTime.getSeconds();
varStartMinutes = objTime.getMinutes();
varStartHours = objTime.getHours();
varStartDays = objTime.getDay();
2nd keyframe:
varKbytes = Math.round((_root.getBytesLoaded()/1024)*100)/100;
objNewTime = new Date();
varSeconds = objNewTime.getSeconds()-varStartSeconds;
varMinutes = objNewTime.getMinutes()-varStartMinutes;
varHours = objNewTime.getHours()-varStartHours;
varDays = objNewTime.getDay()-varStartDays;
varTime = (varDays*24*60*60)+(varHours*60*60)+(varMinutes*60 )+varSeconds;
varSpeed = (Math.round((_root.getBytesLoaded()/varTime/1024)*10))/10;
varMove = Math.Round((_root.getBytesLoaded()/_root.getBytesTotal())*193.9);
txtTotalKbytes = Math.round((_root.getBytesTotal()/1024)*100)/100 add " Total Kb";
txtPercentage = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) add "%";
txtSpeed = varSpeed;
setProperty ("_root.mcLoad", _x, 56+varMove);
3rd keyframe:
if (_framesloaded != _totalframes) {
gotoAndPlay(2);
} else {
gotoAndPlay ("Scene 2", 1);
}
Preloader
I am fairley New too flash and I was wondering if someone could give me a good Preloader or how to Make the whole movie load b4, it plays, that would be great Thanks .
Preloader ?
I have 3 scenes. In the first scene in frame 1 I have this code...
stop ();
loadMovieNum ("preload.swf", 2);
if (_framesloaded>=_totalframes) {
gotoAndPlay ("password", "pass");
}
but after it reaches 100% loaded in this scene it just stays there. It will not go to "password" which is Scene 2. What do I need to change?
thanks
jhb
How Do I Do This? - Preloader
I have a main movie which is just a title and a series of buttons. I want to load an mc, which is a strip of images which will change according to which button you press, into a blank mc . This is not the problem.
I want to have a preloader show for the first mc image strip and then, on the press of a button, the image strip will change (a new mc is loaded) so I want to have a preloader for these new mcs as well.
I tried putting a preloader in the image strip mc i am loading but it doesn't seem to work. Here's what I have:
Frame 1:
Code:
total=_root.getBytesTotal();
loaded=_root.getBytesLoaded();
percent=(loaded/total)*100;
bar._width=(percent/100)*70;
if (percent>=100) {
_root.load1.gotoAndStop(3);
}
Frame 2:
Code:
gotoAndPlay(1)
And on the third frame is the image strip. load1 is the blank mc on the main timeline of the main swf that im loading the image strip into.
It doesn't seem to work though. Can anyone tell me what I'm doing wrong?
Preloader Help
Whats up, flashkit--
I've got this real goofy movie, but I can't get it to load right. Maybe it's just my computer or something. It works locally, but not over the net. I'm exporting it as Flash 4.
Here's the link
http://www.exit-6.com/chowder
here's the code
total_bytes = _totalframes;
loaded_bytes = _framesloaded;
percent_done = int((loaded_bytes/total_bytes)*100);
tellTarget (bar) {
gotoAndStop (percent_done);
}
ifFrameLoaded ("main", "end") {
gotoAndPlay ("continue");
}
the bar just loops and doesn't track the progress of the load, plus sometimes it won't even go to frame "continue," it just hangs up. Help? Please?
Preloader Help
Hi all,
I am try to create a preloader that will display "loading..." + the percentage loaded.
Example. Loading... 10% complete
Can someone point me in the right direction.
Also, I used Flash 4 in the past but I don't know how to past varibles across different files.
Thanks,
James
PRELOADER
Hi,.. look at my flash movie,..
I am just a kind of noob, so don't expect too much
http://www.gitaarwerk.net/flash2.shtml
The rpoblem is the preloader.. as you can see... It won't saty in place whahaha
I used this tutorial
http://www.gear78.com/v2/tutorials/tutpreload.html
hope to hear from you guys...!!! (don't mention the incompatibelness ok?? I already know ahah, I will work that out later..this is just a test)
PRELOADER - HELP PLEASE
I'm building a site for a competition (thinkquest), and so far, i'm 90 percent done. My problem is that the file is quite big, 2.8mbs to be exact. Now I have already inserted a preloader into it, but how do I build a preloader that tells how many bytes is downloaded at any time. That way, the user won't have to wait and guess how far the file has been loaded. Thanks in advance!
Willy
:: http://www.gotiq.com ::
Preloader
Hi,
I have a simple preloader on a scene called "Preloader". In the preloader, I check to see if all the bytes have been loaded. If it is loaded, I then perform a goto to frame 1 of Scene 1. In Scene 1, I have 4 frames with stop action in all frames and in each frame I have an MC. When the MC finishes, it tells Scene 1 (tell target with "../") to go and stop at the next frame.
The preloader works to the point that it will play the MC in frame 1 of Scene 1, then when the MC finishes, it tell target ("../") to go and stop at the next frame. But this action is sending the action to the Preloader scene to stop at frame 2 instead of frame 2 of Scene 1.
Any help or suggestions are greatly appreciated.
Can Help Me With My Preloader?
Ok, this is the 3rd or 4th post ive made about the question, and i have yet to find an answer, i hope this one will produce results. So heres the question: in my preloader, it displays a loading bar, bytes remaining, bytes loading, and byter loaded. I'd like to know of a way where i can make it display kilobytes as the info instead of bytes.
http://rj.clanh2k.com -click flash version to see the preloader i have now.
If anyone can help me please let me know.
Thanks.
Help Me With My Preloader
it seems no one knows how to do this. whoever gives the correct answer is the SMARTEST person on flash kit!!!
any way i'm using the tutorial on this page:
http://www.flashkit.com/tutorials/Ac...12/index.shtml
and what i want to do is only load the sound file that's in the movie and then let the rest stream. i can't seem to figure out how to set this up. how do i manipulate the code in the tutorial to do this? i saw a tutorial for preloading only certain things and they say to put them in a separate scene from the preloader and the movie and that's fine and good but how to i tell the preloader to only preload one specific scene and to show it on the preloader scene as far as how much is loaded and how much to go. heh. hope that makes sense. thanks for any help. sorry i posted this here in someone else's post but i don't seem to get responses much.
looooooove,
botti
Help With Preloader
I have three scenes ... my skip intro option scene ... my preloader scene ... and my main movie scene. When I publish and test my movie, my damned preloader doesn't work when everything else tells me it should. My preloader uses the following actions ...
frame 1 (label StartFrame) with movie clip in keyframe
frame 2 (label IfEndFrameLoaded) (actions: if frame is loaded [Scene Main, label LastFrame] go to & play StartMovie)
frame 3 (label GoToSF) (actions: go to & play [label StartMovie])
frame 4 (label StartMovie) (actions: go to & play [Scene Main, label Frame 1])
* last frame of my movie in movie scene (label LastFrame)
So why doesn't it work??? I need help ASAP
Lll-------<<<< PRELOADER >>>> -------lll
This is a preloader.
A bar grows as bytes are loaded.
it works fine, but when it´s 100% done, it won´t go to the next scene!
Any ideas?
Thanks!
Here are the scripts:
it´s on the bar...
onClipEvent (load) {
_xscale = 1;
}
onClipEvent (enterFrame) {
if (counter<100) {
parcial = _root.getBytesLoaded();
total = _root.getBytesTotal();
counter = (parcial/total)*100;
_xscale = counter;
} else if (counter==100) {
gotoAndStop ("Scene 3", 1);
}
}
|