Preloader - Am I A Newbie Or What?
hi there,
how can i have my preloader, simple movieclip of 3 dots in this case, to start looping right away on the OnRelease -action of my button while the target.swf is loading? and can i have this preloader somehow integrated in the actionscript of my button, so that this preloaderMC would follow this button when multiplied and renamed? [-my goal is to have these dots blinking in the front of each button when pressed, as long as the whole .swf is loading]
to make it more clear: is it possible to have the MC paused on the same frame with the button and then activate it looping while target is loading?
FlashKit > Flash Help > Flash MX
Posted on: 08-16-2002, 10:56 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Newbie Needs Help With A Preloader
Hi Im trying to do a preloader for a site... and I feel that I messed up, when de bytes load a variable called percent increases, I want that a movie clip plays depend on the value of the percentaje... but when I upload the swf file or I test the movie a msgbox is displayed telling me that there is an error in the script that may crash or make unresponsive my computer... and asks me if I wanna skip it... and when I choose yes my movie gets stucked in an infinite loop? please I need help
the .fla file is in
http://www.geocities.com/rick_deacha/259.fla
thanks
Rick
Newbie Needs Help With A Preloader
Hi Im trying to do a preloader for a site... and I feel that I messed up, when de bytes load a variable called percent increases, I want that a movie clip plays depend on the value of the percentaje... but when I upload the swf file or I test the movie a msgbox is displayed telling me that there is an error in the script that may crash or make unresponsive my computer... and asks me if I wanna skip it... and when I choose yes my movie gets stucked in an infinite loop? please I need help
the .fla file is in
http://www.geocities.com/rick_deacha/259.fla
thanks
Rick
Preloader Help For Newbie
Please can someone tell me why does my preloader only show on the screen a few secounds before the movie is loaded. I changed the simulated download speed to 56kb, how can i make the preloader show from the start. Many thank in advance and sorry if this is a stupid question.
Newbie Needs Help With Preloader
I am having a problem with my preloader. I have posted my .fla file at www.prism.gatech.edu/~gtg767h/drewsiteredo.fla. When i test it in flash there is no problem, but for some reason it will not work on the web. does anyone have any ideas why this is happening. the url is www.prism.gatech.edu/~gtg767h/index.html. Thanks!
Newbie Preloader
I am having problems making a bar preloader.
What is the easiest way to create a bar prealoder?
This is what I have... www.enviousgraphics.compreloader.fla
I took the script of a tutorial but not sure it will work correctly.
Thanks in advance!
DNY
Newbie PreLoader Help?
Ok, I am the ultimate Flash MX 04 newbie. I have just started working with the product and I am scouring all over for a pre-loader. I have an .swf file that is about 3mb and loads all of it's images in the first frame, so I need a pre-loader to display a loading message while the .swf loads. I have no way of changing the .swf file to make the images load in any frame other than frame 1. Can someone help me with a loader for this bad boy? I'm willing to paypal someone $50 if they can help me. Thanks!
Preloader Percentage(ish) Bar -newbie
Dear All,
I am trying to create a preloader that gives some indication of the amount of data that has been downloaded. I got this method from a book byt appear to be having problems.
I have created a movie clip with a bar animating from left to right. The movie clip contains no action script.
I have than attached the following code to the movieclip when placed in the first frame of the movie.
onClipEvent (enterFrame) {
if (_root._framesloaded>=_root._totalframes) {
_root.gotoAndPlay(2);
} else {
this.gotoAndStop(Math.floor((_root._framesloaded/_root._totalframes)*this._totalframes));
}
}
The problem is that when I test this with show streaming the movie clip loops for the first 50% of the download time and then starts to work all be it not very accurately. When I test the actual html and swf files all i get is the movie clip looping.
Any ideas?
Cheers
Craig
Newbie Having Preloader Trouble...help?
hi, here is my situation...
i have a 'mymovie.swf' that im loading into my main movie. the swf has a preloader in the first scene, and the content in the next.
here is the code for the preloader:
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
if (loadedbytes == totalbytes) {
nextScene();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop(_root.frame);
}
I am using dynamic text fields for my 'loadedbytes', 'totalbytes', and 'frame' vars. I also have a simple loading bar MC ('loader') that tweens from frame 1-100. Now, as a stand alone movie, this swf works great.
Here is my problem:
when i loadMovie("mymovie.swf", "_root.main.target") the dynamic text does not show up at all, and the 'loader' only travels about 1/4 of the total length before the next scene loads.
Any help or advice would be appreciated.
thanks,
bscott
Newbie Preloader Hell
I have a flash site with the main movie separated into three scenes
1. Preloader
2. Intro
3. Main
The main scene loads all other movies and contains the main navigation for the site. I have placed the following actionscript in frame 2 of my three frame preloader (the third frame loops back to frame 1 of the preloader).
loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();
loadedkbytes=Math.ceil (loadedbytes/1000);
totalkbytes=Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
gotoAndPlay ("Intro",1);
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
For some reason after the preloader finishes I get a weird loop between it and the main page which doesn't fully load.
You can check it out at:
http://www.startrakstudios.com/newflash.html
Any help would be very appreciated.
Newbie Preloader Query
Hey all i think you can probably help me here. If i have a logo, say a silouette cat, for example. Is there any way that as a preloader the cat sort of changes colour. So from bottom to top gradually the colour turns from black to white, using a motion tween?
But i want it to have turned all black when the movie has loaded, does this make sense?
Matt
Newbie Requesting PreLoader Help
Hey everyone. Almost finished with my first Flash Project. It's been an absolute, hair pulling, head-banging experience that has driven me to brink of insanity.
I wanted to share it all with you here especially for those who have been kind enough to help me along the way....especially oldnewbie!
My FLA file can be downloaded here.
http://www.emocreative.com/fla.html
BUT....I'm having trouble with getting preloader working. I've tried 3 different tutorials on the net, all of which *i believe* I followed to perfection but no luck.
Is there a simple way of doing this? I attached my FLA. I created an empty layer at the very top of my main timeline. All I am trying to do is create a simple loader with a percentage. It's empty because everything I've tried has failed. Can someone show me the way so I can finish up my first project and celebrate?
Thanks for your time,
_Michael_
Preloader Question For Newbie
I've searched past forums and I found one that addresses my problem, but I don't understand how to do the response. Please take a look at it here What paulselhi asks, is what I'm looking for. Unfortunately, I don't understand how to do pellepiano's response, especially the part "When first movie reaches the last frame you tell movie two to start playing and also start loading movie number three and so on."
Any help would be appreciated. By the way, I have Flash Pro MX 2004.
Preloader Newbie Question....
Hi, I have a generalised question about preloaders....
I am a bit confused as to what format to create the preloader in...
I mean, i have created my swf file now so should i have made the preloader within that movie so that its the 1st thing that loads, or should a preloader be created in its own swf, which would then load the next movie once the loading is complete?
Secondly... If i wanted to create a loading bar which drops from the top of the screen, would i just tween or code the MC so that it "drops" whilst loading?
Thanks in advance
Newbie Preloader Question
My main timeline has multiple externally loaded .swf's... can I get away with one single preloader for the whole thing, or does each external movie need it's own preloader?
Help A Newbie With A Preloader Issue
Hi,
I have a flash movie built that I would like a preloader attached to. I found a tutorial on this site at http://www.actionscripts.org/tutoria...er/index.shtml
that had exactly what I wanted.
I followed the tutorial, built the preloader and stuck it in my main flash movie, but cannot seem to get it to work correctly. When I test the movie (ctrl+enter) it works fine. Also, when I test it with streaming, it works fine. However, when I publish the file, I end up with a blank rectangle (the color of my background).
I am a newbie at this so I'm not really sure what other information you might need. My flash file(MX) zipped is still too big to attach here, I could email it if that helps.
What am I doing wrong?
Thanks!
Preloader Newbie But Wants Something Customized
Hi I'm pretty new to flash but I have the basics down and I'm having a horrible time trying to find a script, tutorial, forum on the type of preloader i'm making. I did find a couple with separate scenes but I thought it would be simpler keeping 1 scene and separate MC. I don't know I'm too new at this stuff to know the bugs or whatever. Here is how I have everything set up.
1 scene
2 MC
- 1st MC is a 30 frame BMP animation of my loader
- 2nd MC is a small alpha transition revealing my buttons and the details on my page.
I basically want the preloader to play in a loop until everything is loaded then the 2nd MC plays.
Thanks I hope to become a master of FLash through this experience
Newbie / Preloader-progress Bar Help
Hello - building my first site. created a preloader.fla and also a master.fla that i want the preloader to load into.
1. when i preview just the preloader file, it starts displaying my flash page before the progress bar is complete.
2. when i preview my master file, the preloader does not work, but 2 splash pages load on top of each other.
--------------------
my actionscript for my preloader is:
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
var loaded:Number = Math.round((bytesLoaded/bytesTotal) * 100);
progressBar.gotoAndStop(loaded);
}
myListener.onLoadInit = function (target_mc:MovieClip) {
progressBar._visible = false;
}
myListener.onLoadStart = function (target_mc:MovieClip) {
progressBar._visible = true;
}
myMCL.loadClip("splash.swf", "container");
--------------------
my actionscript for my master file is:
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);
}
myListener.onLoadComplete = function(target_mc:MovieClip) {
_level50._visible = false;
}
myMCL.loadClip("splash.swf", 5);
myMCL.loadClip("preloader.swf", 50);
-----------------------------------------
can anyone see right off hand what my problem(s) are? also, i've gotten to this point with online tutorials and books and it would be most appreciative if you could reply in as simple as possible newbie terms - thx developers!
Preloader Array Newbie
I'm trying to get a preloader to work with multiple swf and have found this one seems to work but I need to work out how to delay the start of the second, third etc. I thought maybe adding a visible = false type script to the array may work????? HELP
Newbie Preloader Question
Hey all i think you can probably help me here. If i have a logo, say a silouette cat, for example. Is there any way that as a preloader the cat sort of changes colour. So from bottom to top gradually the colour turns from black to white, using a motion tween?
But i want it to have turned all black when the movie has loaded, does this make sense?
Matt
[MX2004]Preloader Help (Newbie)
Hi, sorry to ask about something so basic as a preloader, but mine has been giving me trouble.
I am using code I wrote in Flash 5 but it ought to work fine in MX04 (it looks like the same code in various tutorials I've looked at). The preloader I am using is in the first scene, and the actual movie clip sequence is in scene 2. The code I am using is as follows:
Code:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Main", 1) {
nextScene();
}
Now, the problem I am having is that when the user loads the SWF in the browser, it still loads the entire file without showing the preloader. I've used the same code elsewhere and it worked fine.
The particular file I am referring to is: http://www.forma3.com/stuff/flash/FS...-%20v1.1.8.swf
(Check out http://www.forma3.com/stuff/flash/ for all the successful attempts I've had, ack.)
I intentionally stopped it at the preloader because otherwise it would simply download completely and then go to scene 2. I am hesistant to post the FLA because this is for a client, but I suppose I could send to someone who can help.
Thanks so much and sorry it this is a really basic question.
Another Newbie Preloader Predicament
In F8, I created a loading bar using the instance "loadBar". I then inserted the following actionscript in a keyframe in an empty layer. It doesnt seem to work.
Quote:
stop();
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(6);
}
Can someone help me a bit here? thx in advance
Newbie Preloader Question
Hi All,
I have 2 movieclips on the stage (called left Container and rightContainer) - they load external jpegs.
There are also 2 dynamic text fields (named infoFieldLeft and infoFieldRight) on the stage.
I want the leftContainer to load the external jpeg (which it does correctly) and count up the file amount loaded and display that in the infoFieldLeft (which it does correctly) - basic preloader stuff.
Once that is complete I then want the rightContainer to load its jpg and do the same count in the file size and display it in infoFieldRight.
But the rightContainer doesn't load its jpg and doesn't count up.
I have tried a few configurations for this and now need some help from people who truly know what they are doing (unlike me who tweadles code snippets till I fluke working code).
Here is my code:
_root.leftContainer.loadMovie("photography/photo_A/photo_A_01.jpg");
_root.onEnterFrame = function () {
_root.infoFieldLeft = (Math.floor (_root.leftContainer.getBytesLoaded() / _root.leftContainer.getBytesTotal() *100)+"%");
}
leftContainer.onLoadComplete = function ()
{
_root.rightContainer.loadMovie("photography/photo_A/photo_A_02.jpg");
_root.infoFieldRight = (Math.floor (_root.rightContainer.getBytesLoaded() / _root.rightContainer.getBytesTotal() *100)+"%");
}
Cheers.
Nos
AIR AS3 Newbie Preloader Issue
Hi all, thanks in advance for any advice...
I have a simple preloader which I am trying to animate a bouncing ball in. I am not seeing the bouncing ball or text when I simulate downloads and instead get this error: TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Base()...
I am pretty sure this is something simple...
Here's the as file code:
package {
import flash.display.MovieClip;
import flash.display.Stage;
import flash.events.*;
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.text.TextFormat;
import fl.motion.easing.*;
import gs.*;
import com.*;
public class Base extends MovieClip {
var loader:Loader;
var ball;
var TextBox;
public function Base() {
loader = new Loader();
addChild(loader);
ball = new ball();
addChild(ball);
TextBox = new TextBox();
addChild(TextBox);
TextBox.x = 530;
TextBox.y = 410;
TweenMax.to(ball, .5, {x:390, y:400, bezierThrough:[{x:420, y:200}, {x:440, y:400}, {x:470, y:300}, {x:500, y:400},
{x:550, y:350}, {x:580, y:400}, {x:600, y:370}, {x:600, y:400}], orientToBezier:true, ease:Bounce.easeOut});
loader.load(new URLRequest("Main.swf"));
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, initApplication);
loader.contentLoaderInfo.addEventListener(Progress Event.PROGRESS, showProgress);
}
public function showProgress(eventrogressEvent):void {
var percent:Number = Math.round((event.bytesLoaded / event.bytesTotal) * 100 );
TextBox.text = percent + "";
}
public function initApplication(myEvent:Event):void {
removeChild(ball);
removeChild(TextBox);
}
}
}
Preloader Array Newbie
I'm trying to get a preloader to work with multiple swf and have found this one seems to work but I need to work out how to delay the start of the second, third etc. I thought maybe adding a visible = false type script to the array may work????? HELP
Newbie Preloader Question
Hey all i think you can probably help me here. If i have a logo, say a silouette cat, for example. Is there any way that as a preloader the cat sort of changes colour. So from bottom to top gradually the colour turns from black to white, using a motion tween?
But i want it to have turned all black when the movie has loaded, does this make sense?
Matt
[MX2004]Preloader Help (Newbie)
Hi, sorry to ask about something so basic as a preloader, but mine has been giving me trouble.
I am using code I wrote in Flash 5 but it ought to work fine in MX04 (it looks like the same code in various tutorials I've looked at). The preloader I am using is in the first scene, and the actual movie clip sequence is in scene 2. The code I am using is as follows:
Code:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Main", 1) {
nextScene();
}
Now, the problem I am having is that when the user loads the SWF in the browser, it still loads the entire file without showing the preloader. I've used the same code elsewhere and it worked fine.
The particular file I am referring to is: http://www.forma3.com/stuff/flash/FS...-%20v1.1.8.swf
(Check out http://www.forma3.com/stuff/flash/ for all the successful attempts I've had, ack.)
I intentionally stopped it at the preloader because otherwise it would simply download completely and then go to scene 2. I am hesistant to post the FLA because this is for a client, but I suppose I could send to someone who can help.
Thanks so much and sorry it this is a really basic question.
Newbie Preloader Question.
Hello all,
I'm following a tutorial here: http://www.absolutecross.com/tutorials/flash/preloader/
and the code for the preloading is as follows;
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);
}
now i pretty much understand it all, except for the last two lines:
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
what is this doing? is it necessary? my understanding is that the telltarget command is to be phased out, but i would still like to understand what the purpose of these last two lines are. thanksNadvance.
Old Newbie's Preloader For Multiple External SWF's
Trying to load external swf and found OLD NEWBIE's preloader. My only problem is I need to load 3 external swf's at level10, level20, level30. His example is for only one external swf.
Basically I'm trying to preload a site that is structured like this:
content.swf -- on level 10
nav.swf -- on level 20
intro.swf - on level 30
I've looked at his code and am wondering should I just load all three swf's into the same container clip? Here is his code:
// Hides displayed elements
this.reelmc._visible = false;
this.loadbar._visible = false;
percent_display = "";
//create a new movieclip to load
//the external movie into
this.createEmptyMovieClip("container",10);
//load the external movie into the new movieclip
container.loadMovie("sound.swf");
//check the download status of the external
//movie once every frame
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
percent=(this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
if(!isNan(percent)){
// trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent) + "% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent > 1) {
this.reelmc._visible = true;
}
container.stop();
} else {
// trace("0% loaded");
}
if(percent == 100){
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
loadMovieNum("sound.swf",0);
}
}
stop();
Preloader (very Easy Question.. Another Newbie Help Me?)
Hello,
I want my flash to see if frame 45 is loaded, and if it is than go and play to frame 15... if it is not than go and play frame 2... whats the 'actionscipt' for this? i just need the actionscipt, i know how to put it in
thanks,
lieb39
Preloader Question From A Forum Newbie
Hi all (i'm a newbie - please be gentle lol)
I have posted on certain other forums *ahem* but have had no luck. This post is basically what I said on the other forums. I hope you can help me - I really do appreciate it and once the project I am working on is finished I will post back the link to show you what you have helped me with! I apologise now if this has been covered before - I'm sure it has and really I should search before posting - but I'm pushed for time so I thought I would just post anyway lol.
Here goes:
Flash 8 Prof - mac.
I have a main swf, which has 13 buttons and a empty movie clip called holder_mc. When you click on a button it loads an external swf into the holder_mc, and you can navigate from one external swf to another by pressing the Next and Previous buttons (I call these the controls). When you click on Next or Previous, one swf is unloaded and another is loaded into the holder_mc. This all works fine (hope that all makes sense).
What I would like to know is should I have a preloader for each swf? I have already left a frame at the start of each swf's timeline just in case. My assumption is that I would need a preloader for the main swf (which is about 24kb) and then a preloader for every external swf (which on average are about 40kb). Is this correct?
I have a feeling I will be asking lots of questions about preloaders so I will keep using this thread. I appreciate any help you can give. I see myself as a comfortable Flash user but not so comfortable with Actionscript - probably top-end beginner/intermediate so please be gentle! If you could explain as much as possible I would appreciate it
Thanks in advance,
Theo
Intelligent, On-demand Preloader For A Newbie To AS3.0
Hi all,
Please excuse my newbie-ness. I've been an early Flash user, but never really got my head around Actionscript (I'm not really a programmer at heart). I've been able to learn a bit here and there, and am trying to get into AS3, which is a bit confusing, as I think my head is still stuck in previous versions (for example, I assume loading movies into levels is passe, and that now everything loads into the Display List?).
Anyway, I can see the inherent power of Flash CS4 and AS3, so I'd like to see if something can be done:
Build an intelligent, on-demand site preloader that sits idle (and invisible) until external SWFs are loaded. I'm still structuring my Flash sites so that only the certain sections that a user requests is loaded to keep my sites relatively light and speedy (please let me know if this shouldn't be the case anymore). So, if a user clicks on 'Products', the preloader will activate (through an eventListener, I assume), either pull or be given the variable of the requested SWF URL, and then show the visitor the loading status of that loading SWF. Upon completion of the load, the preloader will disappear (and sit waiting for the next request) and the requested SWF ('products') will appear for the user.
I've seen a few preloading tutorials on this site, and several others, but they all seem to just focus on the actual preloading code. I want to try and integrate this into an actual site.
Maybe I'm missing the point of the existing preloader tutorials (a very real possibility!) and maybe my mindset is too old-school...but I'd greatly appreciate if anyone could help me with the code and the logic behind how it works.
Thanks to any and all that respond.
GS3
HUGE Newbie....needs Help With Preloader(hope Thats What Its Called)
Hi, I am very new to flash and need help. I have Flash MX 2004 and I just want to make a thing before the movie that has a bar that moves as its loading with a thing that says the percentage loaded. If I need to draw the bar I will but I need the actionscript for it.
I searched for it and I know there are 219 pages for this but I just couldn't find out how to do it.
Sorry I am such a newbie...hope I described my problem well enough.
Thanks,
Mike
Flash 8 Newbie Looking For Simple Preloader Script
i actually got this working in flash 5 but the same code doesn't work in ver. 8.
what i have is a scene called "intro" that has a loop running. in a layer are the words "please wait while loading..."
the dots animate one then two then three.
all i need is a simple script that says "when the last frame of my last scene loads, please jump out of this loop and play frame 45 of this scene."
i feel very thtupid but tried finding sample code and looked at a bunch of tutorials but either the code was way more than i need or didn't work for some reason. i know the syntax has to be pretty much perfect.
well any help would be most welcome - thanks!
Newbie Question Basic Preloader/display Help
I'm using a simple media display to show my artwork on my website, using thumbnails to select the files. I have my video controls and everything working fine, but I'm having difficulty with the preloader. Could I get some assistance from a pro?
http://www.onlinefilefolder.com/inde...758b2d53d70388
Jason
Preloader Not Working - Flash 6 Newbie :confused:
Ok in my movie I have a preoloader I have the first two frames
dedicated to the preoloader - on frame one the action has this code:
if (_framesloaded = = _totalframes) {
gotoAndPlay(3);
}
Onframe two the action has this code:
gotoAndPlay(1);
On frame 3 the action is: stop();
my movie is located on frame 3 and should start - but the loader just loads and laods and never stops and my movie never starts.
I'm new to prelaoders and the code above was taken from an already build prelaoder - so I know it's wrong I just don't know how to fix it.
Newbie Preloader Troubles: Loop Back To First Frame
Hi,
I created a flash intro, and decided I'd like to have a preloader for it. I found several preloader tutorials and decided to use the Advanced bytes-loaded Preloader, because I want to display percent/bytes loaded. I understood everything pretty well, however, when I got to page 5, it says "In the 3rd frame, Control layer, place an action to loop back to the first frame. Simple!"
Well, not so simple for me. I am almost completely new to flash, letalone AS, but I used my very limited coding knowledge to attempt a loop-back action.
Here is the preloader code I used in Frame 2 of the "control" layer. It is basicly copy-and-pasted from the tutorial, except I cut out the "loadedkbytes" and "totalkbytes" parts (lines 3 & 4 in the original code) because I don't want them.
Code:
loadedbytes=getBytesLoaded("Scene 1");
totalbytes=getBytesTotal("Scene 1");
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
// just in case it matters, the original code from the tutorial:
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);
}
And here is my attempt to loop back to frame 1:
Code:
while (loadedbytes != totalbytes) {
gotoAndPlay(1);
}
When I test my movie, it starts paused about 100 frames into the second scene ('Scene 1'), not even showing my preloader scene ('loader'). Could someone please tell me what I'm doing wrong here?
Thanks in advance,
Andrew
Oh ya, and I am using the fully-functional 30-Day Trial of Flash MX if that matters at all.
[Edited by thecroc on 07-06-2002 at 12:51 PM]
Null Button/mc & Preloader Queston (newbie-style)
Okay, here's my site www.rberry883.home.comcast.net that I'm working on (slowly) and made all my buttons (across the top) as movie clips. They all work fine but I want to know how I can disable the one for the page you are on. For example, if I hit the one for Gallery, you go to the gallery page but you can still click the gallery button and it reloads the page.
Also, under PC Stuff, I have a thumbnail gallery that I should have a preloader on for the thumbnails and for the component itself but I don't know where it would/should go (on main timeline, in external .swf, etc). I read some of the preloader tutorials but they seem to be more for loading an entire site which I don't want.
Any help is appreciated or just help me out with some links.
Gibbosniper Vs Munkie Or Newbie Vs Newbie
Ok Gibbosniper,
This is the start of the thread, for our contest of Newbies brains in action. Let us set a time limit of sorts, and go from there.
Again, I am far from an MX master, I just started just over a week ago, so it might take a while for me to produce something worthy of public display, but if you are patient, so am I.
Game on!
Munkie!
Keyboard Control-for A Very Newbie Newbie
I was wondering if there is a simple way to control flash animations when
pressing a key on the keyboard. Example: Scene 1 is an animation of a
circle, this scene will continue to loop until I press the 'f' key, and
then the flash movie will change to Scene 2 where we see the circle
explode. I looked around flashkit.com and found some tutorials, but I
think they used an earlier version of flash, because I can't find the
instance properties in order to change the action from mouse click to key
press. I own flash professional 8. Anyway, I can use as much help as I
can get, so if you know of an action parameter in which I can execute
this...action, it would be greatly appreciated! Thank you for your time!
-Timmy
Newbie Asking A Newbie Question
Thanks for looking at my post. I am very new to Flash and I want to make a simple movie withsome text. I know how to insert text and customize it, but I wanted to know how I could jazz it up a bit. Add some effects to it. I was wondering if anyone could help show me how to make it shine, or glimmer, or glow, or something of tht sort, you know? You know on the Ultrashock logo when you put your mouse over it, it shines? I wanna know stuff like that. Can anyone help? Is there a tutorial or we page I can go to? Thanks in advance, and thanks for looking even if you can't help...
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
|