Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Seperate Multi-SWF Preloader...



Is it possible to create a preloader that is a completely seperate swf that... plays/stretches bar/shows percentage/etc.... while it loads the main movie and it's child MCs -- and, when completed loading, simply says "play" the main movie?

Can anyone help -- or point me in the right direction here?

Thanks in advance.



FlashKit > Flash Help > Flash General Help
Posted on: 09-07-2004, 07:29 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Multi Seperate Shape Animations
How do I make animations stay seperate from each other? When I try to add a second shape in the frames of an existing Shape effect, all the shapes are treated as a single shape. I tried using a second layer but no go.

Preloader To Seperate .swf
i currently have one .swf, with 2 scenes.
this is the code in the first scene:

ifFrameLoaded ("Scene 2", 1) {
gotoAndPlay("Scene 2", "1");
}
---------------------

can i just have a seperate .swf and have it
preload the next .swf,
instead of having one movie with 2 scenes?

the issue is that the preloader scene will not
visually show up on the screen. i'd imagine
an entire movie would definitely show, while preloading.

please help.

Seperate Preloader?
Well, I'm back to the ever agonizing preloader. I've finally finished the rest of my site, and now I'm trying to make it spiffy as it loads.

Now, normally I'd use the same one I normally use, and just modify it for this particular site. However, the site that I'm using now HAS to use the first frame of my timeline, so I can't put the loader there. Is there any other way to integrate a nice looking preloader?

Thanks,
DaVuLf

Preloader To Appear In Seperate MC
Hi guys,

I have been trying to get a preloader to appear in a seperate movie clip using a higher depth. I want to set up a slideshow where the preloader appears superimposed over the currently viewed image showing the progress of the next image loading, then disappears when the next image is displayed.

i was thinking of using three MCs - PhotoMC, TempPhotoMC, and LoaderProgressMC. Each photo is viewed in PhotoMC. When a link is clicked to load in another image, its loaded to TempPhotoMC, which is _visible = false. LoaderProgressMC would be created on the fly with a loadbar in it referencing the LoadBytes of TempPhotoMC, prob using _width linked to to the percent loaded ratio. When TempPhotoMC is loaded, PhotoMC is loaded with the same photo from TempPhotoMC which is now in the computer memory.

I can get the normal slideshows working (with the help from the fantastic tutes and people on this site!!!) but i don't know really how to approach this problem. Any suggestions or pointers would be great!! Thanks, Alex

Preloader To Appear In Seperate MC
Hi guys,

I have been trying to get a preloader to appear in a seperate movie clip using a higher depth. I want to set up a slideshow where the preloader appears superimposed over the currently viewed image showing the progress of the next image loading, then disappears when the next image is displayed.

i was thinking of using three MCs - PhotoMC, TempPhotoMC, and LoaderProgressMC. Each photo is viewed in PhotoMC. When a link is clicked to load in another image, its loaded to TempPhotoMC, which is _visible = false. LoaderProgressMC would be created on the fly with a loadbar in it referencing the LoadBytes of TempPhotoMC, prob using _width linked to to the percent loaded ratio. When TempPhotoMC is loaded, PhotoMC is loaded with the same photo from TempPhotoMC which is now in the computer memory.

I can get the normal slideshows working (with the help from the fantastic tutes and people on this site!!!) but i don't know really how to approach this problem. Any suggestions or pointers would be great!! Thanks, Alex

Should A Preloader Be Constructed As A Seperate .FLA?
Hello,

My site is about 2mb long, I don't know much about preloaders yet, but I have read many topics on the subject. But maybe I missed something along the way.

Should I create a seperate .fla for my preloader and load it in frame one of my movie intro? And if so, how will I know when the movie is loaded? I am 95% complete with my project and just want to get it right.

I will search more for tutorials, but any input will be welcome as always.

Thank you very much.

Thorrax

Preloader For A Seperate Movie? Help
Hey, I'm new to the forum boards. I am having this small problem with the preloader to the movie I'm making. Basically the preloader, waits until the intro to the site is ready to load, and then it plays it. No big deal. The thing is that, In the first frame of the intro, it is supposed to load another swf (which plays a music file all the way to frame 1834), but what ends up happening is the intro starts playing, but the music only fully loads half way into it... Maybe I need to put the music directly into the movie? The thing is that I have a button that I use to either call the music.swf or stop all sounds...

Check it out here: http://bounce.cached.hyspex.com


And here is how it is setup. Basically, what I want to know is how do you check if a frame is loaded in another movie (music.swf). If you could help out, that would be much appreciated. Thanks.

One solution I've thought of is maybe I should load the music.swf immediately when the site starts up, and then call it into the Intro once the movie starts up. But how do I do this with code?

Is It Possible To Have A Seperate Preloader.swf To Load Another .swf ?
is it possible to have a seperate preloader.swf to load another .swf ? so instead of having a preloader within the same .swf can it be in a seperate .swf??

Linking PreLoader To Seperate .swf
I am Very! much a n00b at Flash etc. I have added the Preloader http://www.kirupa.com/developer/mx/p..._component.htm Can anyone help me...

At the end of the main file's Timeline "flash.swf" another one loads "tour.swf" But I would like help with connecting the Main Preloader to load up whats on the seperate file aswell so that its loaded up at the start and not in two sections. I am guessing this is pretty basic. So if anyone can help it will be greatly appreciated.

Is It Possible To Have A Seperate Preloader.swf To Load Another .swf ?
is it possible to have a seperate preloader.swf to load another .swf ? so instead of having a preloader within the same .swf can it be in a seperate .swf??

Linking PreLoader To Seperate .swf
I am Very! much a n00b at Flash etc. I have added the Preloader http://www.kirupa.com/developer/mx/p..._component.htm Can anyone help me...

At the end of the main file's Timeline "flash.swf" another one loads "tour.swf" But I would like help with connecting the Main Preloader to load up whats on the seperate file aswell so that its loaded up at the start and not in two sections. I am guessing this is pretty basic. So if anyone can help it will be greatly appreciated.

2 Q's: Preloader On Seperate Page, And Fps Conversion.
1. Is there anyway I can begin to preload a movie from a seperate html page. For instance, could I set my homepage (and all other linked pages to begin to load the flash movie) that way it would be loaded already if the user just happen to click on the link to the actual movie. Does that even make sense?

2. Is there a way in MX to do a full frame rat conversion. For instance if I have a CD version of a movie that runs at 24 fps, could I change it for the web to run at 12 fps without making it play at 1/2 speed?

Thanks for any help.

Preloading External SWF's Using Seperate SWF As A Preloader
Oldnewbie was going to help me on this one, but I told him I thought I had it figured out... However, I am coming to quickly realize this is probably harder than I thought.

Is it possible to have a seperate 200x50 SWF act as a stand-alone preloader which loads all of your external SWF's? Then once they have all been loaded, it then proceeds to play a designated SWF. Which in this case would be my main SWF.

Any ideas? It doesn't have to be fancy. Just a basic preloader with a bar and text loading all of your external SWFs. Once they've all been loaded it proceeds to play the main SWF or whichever SWF you want.

Thanks in advance... If I can get this solved my site should almost be complete YAY!

[F8] Loading Seperate Moviecilps With 1 Preloader?
hi guys! i was having a problem today that i just couldn't figure out and when coming to flashkit.com it said tht the last time i logged in was in 2003!!! wow!
well all u guys in the form never fail me yet. here's my deal.

i am loading 5 movieclips onto the stage layers using a frame action.

now i made each movieclip to have it's own little getBytes loader (u know)

but i don't want 5 different preloaders to be showing. i just want 1 preloader that show the viewer tht the whole movie is being loaded.

so i don't want it that one movie loads and whenever the viewer is ready to goahead that the other isn't ready, i want them all to be loaded.

i hope i explained this so so so.

thanx y'all

V

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 "%";
    }
};

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?

Bonehead Boss Created A Preloader On Seperate FLA
Thats not biggest problem, the biggest problem is that he didnt name the frames for the navigation, he used the actual frame numbers. So now I cant add a preloader the normal way because I will essentially move all the frames out of place and I think that would take a pretty long time to fix. So im trying to have the preloader as the main movie, and then load the actual site to a movieclip. So far, I havent been able to communicate with the swf im importing to get the bytes loaded or bytes total to build a preloader.

How does one extract this information from a loaded movie clip so I can build a preloader?

Ive tried MovieClipLoader and basic loadMovie, and neither are working for me, so I guess I need a better explanation on what to do.

THANKS ALOT!!!!

Can A Preloader Load Info To SEPERATE Movie?
Before you read this, yes I know it makes more sense to have the preloader just be a seperate scene to the webpage, I was just wondering if this is or isn't possible.

As of right now I have two completely seperate swf's.  One is a preloader/enter button, and the other is my actual movie/webpage.

Is it possible to make the preloader download all of the information from the webpage, and not just the info from the preloader swf itself (only like 100k, pointless)?

Thanks so much guys.
Tyler Lucas

Multi Preloader
Hi!!

I have the main file named "default" in which are loaded
three .swf in three different clips on the main file.
First I load clip1 and when it's loadeded i stop it ang go to the next frame on main file's _root and load clip2 and then stop it; then go to frame 3 and load clip 3 and stop it.
Every time a load a clip I see its own preloader..
So now the 3 clips are loaded and I play them as I want..

Wow!! Never been I a situation like this!!

Please look at the attachment if omething is wrong!!

Thxs a lot!!

Multi Preloader
Hello, I am a bit mad about this problem, because I finished my website 14 days ago and I am not able to make right preloader for it.

During whole website I am loading a lot of (about 35) .swfs into levels. I dont want to preload each .swf when it has to start - I want to preload for example 10 .swfs in the beginning, but run it in the right time .... For example, I have page "materials" and when I will show on wood - wood.swf will start. When I will show on iron - iron.swf will start. I want to preload these wood.swf and iron.swf in the beginning but I dont know how.

Please help me....

One more think, it is neccesary to put wood.swf and iron.swf into different level or not (they will never be visible together)...

I know that if client will not go on material called water.swf - preloading will be wasting of time, but I want to do this way.

Thank you very much.

Kanister

[F8] Multi Use Preloader
I have the two functions below working on there own, but i need to get the random load image to have a preloader aswell!


// preloader function
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);

preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
holder1._alpha = 0;
progress1._visible=true;
};

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

preload.onLoadComplete = function(targetMC) {
fadeInImage(holder1);
progress1._visible=false;
trace(targetMC+" finished");
};

//works with:
my_mc.loadClip("images/port01.jpg", "holder1");


//random load function
function loadRandom(clipname)
{
choice = Math.round(Math.random()*4+1);
switch (choice) {
case 1 :
clipname.loadMovie("images/intro01.jpg");
break;
case 2 :
clipname.loadMovie("images/intro02.jpg");
break;
case 3 :
clipname.loadMovie("images/intro03.jpg");
break;
case 4 :
clipname.loadMovie("images/intro04.jpg");
break;
case 5 :
clipname.loadMovie("images/intro05.jpg");

}
}

//works with:
loadRandom(holder1);


can i get the preloader to work in this format, is it just a simple syntax problem? I need the loadRandom(holder1); to be replaced!

cheers
Rat

Multi Preloader
Hi, I'm new to Flash.
and need to create a preloaded that shows stages loaded.
i.e 20% play stage one_MC
60% play stage two_MC
80% play stage three_MC

So far i have the standard reload setup bu i need new
if (loadpercent != 100) commands but it doesn't seem to work with more than one.


loaded_bytes = _root.getBytesLoaded(); //Loaded Bytes already
total_bytes = _root.getBytesTotal(); // Get the total bytes of the swf
loadpercent = (loaded_bytes/total_bytes)*100; // The current exact percentage done

if (loadpercent != 100) {
// OPTIONAL: Place the percentage on some textfield
preloaderText.text = int(loadpercent) + '%';
// Goto respected load percentage since not done
bar.gotoAndStop(int(loadpercent));
} else {
// Goto the "Main" Scene since its done
gotoAndPlay("Main", 1);
}

Multi-stage Preloader
Hi guys,

My project is quite big 500K so I need to keep people busy for some time... How to make multi-stage preloader?
So an animation within preloader comes out accourdingly to speed of downloading...
Like in http://www.neostream.com for example.

I would appreciate if anyone could give my some advice.

Thanks,

Trump

How To Check Multi Preloader?
hi guys,
I made a website that consist of several different movie that loaded on command to the main movie. Each movie has their own preloader.

My question is could we check how the preloaders work offline? If I use the "show streaming" option, it shows only the main movie preloader, not the other movie preloader.

Thanks,

Assistance With Multi Preloader..
Hi everyone,

I'm using Jesse Stratford's multi preloader tutorial, and the code is almost identical.

The problem is, it works perfectly on my local system. As soon as I upload to my FTP server for testing, the percentage loaded (dynamic text field), instead of reporting 0 to 100, I get a number series from 0 to 5,000,000,000 or so.

You can see this for yourself, head to http://www.visualemotive.com/wealthworks/index.htm

If someone has an answer for this problem, I would be extremely appreciative! Thank you for your time everyone,

Anthony Parker

Ps. The preloader bar is NOT a component progress bar, it just looks a lot like one..


Here is the code on the container_mc movie clip:

onClipEvent (enterFrame) {
if (_root["load"+this._name]) {
if (total_bytes == null) {
total_bytes = this.getBytesTotal();
} else {
loaded_bytes = this.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = Math.floor((loaded_bytes/total_bytes)*100);
_root.bar.gotoAndStop(percent_done);
_root.bar.displayPCent_var = percent_done + " %";
if (percent_done == 100) {
trace ("fully loaded");
_root["load"+this._name] = false;
_root.loadNext();
}
}
}
}


and here is the code on the main timeline, defining the function:

count = 0;
numMoviesToLoad = 3;

function loadNext () {
_root["loadcontainer"+count] = false;
_root.bar.gotoAndStop(1);
if (count<numMoviesToLoad) {
count++;
upTo_var.text = count + " / 3";
var newName = "container"+count;
_root.container.duplicateMovieClip(newName, count);
with (this[newName]) {
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
_alpha = 100;
}
loadMovie ("Web_WealthWorks_"+count+".swf", _root[newName]);
_root["load"+newName] = true;
}
}

loadNext();
stop();

Preloader On Multi-Pictures
How can I have the preloader load all the pictures and then open the main scene...

Right now I have this code put in to the "Preloader" layer on scene 1.

onClipEvent (load) {
total = _root.getBytesTotal();
} onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
percen1 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(10);
}
}

Right now when I test the movie the preloader works but when It is downloading the first of 12 pictures it starts runnning. I would like it to download the all of the pictres and then "gotoAndPlay(10).

Thanks in advance,
Mattypee

Multi Purpose Preloader
Dear all,

I am finishing a preloader that will let me to reuse my code, basically to load XML, imaged and swf . I want to know if what I am doing it is the most efficient way

General function for listeners


HTML Code:
function myListeners(dispatcher:IEventDispatcher):void {
dispatcher.addEventListener(Event.COMPLETE, handleComplete,false, 0 , true);
dispatcher.addEventListener(ProgressEvent.PROGRESS, handleProgress,false, 0 , true);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler,false, 0 , true);
}
To create listeners

XML


HTML Code:
function loadXML(){
xml_URL = "myFile.xml";
xmlRequest = new URLRequest(xml_URL);
xmlLoader = new URLLoader(xmlRequest);
myListeners(xmlLoader);
}
SWF, images


HTML Code:
function loadImage{
var assetsURL:String = "muFile.gif";//or swf
var assetsLoader:Loader = new Loader();
var assetsRequest:URLRequest = new URLRequest(assetsURL);
myListeners(assetsLoader.contentLoaderInfo)
assetsLoader.load(assetsRequest);
}
Function Events


HTML Code:
function handleProgress( event:ProgressEvent ):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
}

function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
}

function handleComplete( event:Event ):void {
if (event.currentTarget is URLLoader){
var loader:URLLoader = URLLoader(event.target);
myFunction (loader.data)// process the data
}
if (event.currentTarget is LoaderInfo){
var loadedContent:Loader = Loader(event.target.loader);
myFunction (loadedContent)//process the content
}
}
I will appreciate your feedback

Preloader For Multi Movie Parts
Hey,

Me again... yep... I need lotsa help.

How do I make a preloader load lots of things seperate in one movie.. if that makes sence..

Basically, I have a movie, I want the content to load at one part of the site, and the navigation to load at one part of the site.. in seperate pre loaders..

Like what they have at www.2advanced.com

I'm sure someone has asked this before, bt I can't find the post.

Do I just make differnt scenes for all the different things I want loaded? If thats a yes, then ya gotta elaborate more... cuase I still don't get it, if a no... same thing..

Hope ya can help me out.
Ian

HELP Ideas For A Multi-swf Preloader Wanted
I created a 19 scene (separate swfs) presentation that loads a little slowly on dial-up. I am looking for a way to PRELOAD all 19 swfs before the first one starts.

I now have it so that each swf loads the next one, But it doesn't load into the downloaders cache until it is asked for.
I use Flash 5.
Any suggesions?
Thanks,
Rich

Multi Preloader Works On Firefox Not On IE
I use a preloader to load two external swfs into a main swf (index.swf) ..

I use the following code to preload the swfs into levels :

frame1:

moviearray = new Array("left-music.swf",1,"final_step-test.swf",2);
actMovieIdx = 0;


frame 2:

// get the next moviename and level
moviename = moviearray[actMovieIdx++];
movielevel = moviearray[actMovieIdx++];
// load the given movie
loadMovieNum(moviename, movielevel);
//trace (moviename);

frame 3:

blank

frame 4:

//get the actual loaded bytes
actBytes = eval("_level" add movielevel).getBytesLoaded() || 0 ;
// get the total bytes to load
totBytes = eval("_level" add movielevel).getBytesTotal() || 100 ;
// calculate the percentage loaded
percent = actBytes/totBytes;
bar._width = percent*137.4;
percent = Math.round(actBytes * 100 / totBytes) + "%" ;
//trace("percent."+ percent);
//trace ("bar."+bar._width);
if( totBytes - actBytes > 10){//more bytes available, keep on loading
gotoAndPlay(3);
} else if(actMovieIdx < moviearray.length){//if we got more movies to load
gotoAndPlay(2);
} // else go to frame 5



The problem is tha in firefox, opera, netscape works great .... but in IE sucks (as always). I cant figure out what is going wrong


you can see the movie in action at the following link:

http://www.stavento.gr/test

I use flash 8 pro
the script puplished in flash player 7

Preloader Issues W/multi Domain
hey i'm having some issues with a preloader i made using this tutorial http://www.lukamaras.com/tutorials/p...preloader.html .

Now when i put
placeHolder.loadMovie("http://www.maindomain.com/flash/thero.swf");
everything works fine and the pictures in the preloader go away. But my problem is that my site has multiple domain address all pointing to the same place. How do I make everything work no matter what addy you typed in? I've tried putting in my ip address.

My CODE:
placeHolder.loadMovie("http://www.maindomain.com/flash/thero.swf");
progressTracker.onEnterFrame = function() {
movieLoaded = Math.round(this._parent.placeHolder.getBytesLoaded ()/1024);
movieComplete = Math.round(this._parent.placeHolder.getBytesTotal( )/1024);
percentage = Math.round(movieLoaded/movieComplete*100);
this.loadingBar._xscale = percentage;
this.maskBar._xscale = percentage;
if (percentage < 10) {
this.blackText.text = "0" + percentage;
this.whiteText.text = "0" + percentage;
} else if (percentage == 100) {
delete this.onEnterFrame;
this._visible = false;
this._parent.loadingText._visible = false;
this._parent.loadingLogo._visible = false;
} else {
this.blackText.text = percentage;
this.whiteText.text = percentage;
}
}

Multi Preloader Works In Simulation But Not On Web
A while ago I found on this very board a nice piece of preloading code for multiple images. It seemed to be working great until I've actually posted the swf on the web. The text field displaying the loading progress in % started showing NaN until about 85-90% of the totalbytes were loaded. This would coincide with the first image actually popping up. This does not happen in a simulation mode: the first image shows up at the same point but the percentage is displayed correctly and grows staedily from ~5 to 100%. I can cover NaN with something else but I'd like to know if there is an explanation for this. here's the code:

ActionScript Code:
//number of images to be displayed:
srcL = 10;
//source of Images for a gallery:
imageFolder = "Graphics/Gallery_1";
var Images = new Array();
for (i=0; i<=srcL; i++) {
    Images[i] = [imageFolder+"/image"+i+".jpg"];
}
// create one clip for each movie
// and load the movie into each one.
for (var i = 0; i<Images.length; i++) {
    var tmp = this.createEmptyMovieClip("clip"+i, i);
    tmp.loadMovie(Images[i]);
}
// now set up an onEnterFrame event
// to continually check the load progress
// and update the bar clip
this.onEnterFrame = function() {
    var stat = 0;
    // initial status
    for (var i = 0; i<Images.length; i++) {
        var tmp = this["clip"+i];
        stat += (tmp.getBytesLoaded()/tmp.getBytesTotal())*100;
    }
    stat /= Images.length;
    // get the average status value
    this.bar._xscale = stat;
    // set the width of the bar to reflect the load status
    this.txt.text = Math.round(stat)+"%";
    trace(stat);
    // if the load is complete, cancel the onEnterFrame
    if (stat == 100) {
        delete this.onEnterFrame;
    }
};
stop();

Multi Layer Movie/preloader Question
In a multi layer movie, which layer do you put the preloader into?

Multi-purpose Preloader Called Up As Needed
I have a portfolio movie that contains close to 100 images that each are on their own frame. I want to have a preloader that only plays if the requested image isn't loaded yet. I only want to set up one pre-loader that gets called up only if needed. Is it possible to have some sort of script that says, for instance: go to frame 16, but if it's not loaded, play the preloader until it's loaded, then go to frame 16. And so on...

Preloader Issues W/ Multi Domain Names
hey i'm having some issues with a preloader i made using this tutorial http://www.lukamaras.com/tutorials/preloaders/using-masking-with-a-preloader.html .

Now when i put
placeHolder.loadMovie("http://www.maindomain.com/flash/thero.swf");
everything works fine and the pictures in the preloader go away. But my problem is that my site has multiple domain address all pointing to the same place. How do I make everything work no matter what addy you typed in? I've tried putting in my ip address.

My CODE:
placeHolder.loadMovie("http://www.maindomain.com/flash/thero.swf");
progressTracker.onEnterFrame = function() {
movieLoaded = Math.round(this._parent.placeHolder.getBytesLoaded ()/1024);
movieComplete = Math.round(this._parent.placeHolder.getBytesTotal( )/1024);
percentage = Math.round(movieLoaded/movieComplete*100);
this.loadingBar._xscale = percentage;
this.maskBar._xscale = percentage;
if (percentage < 10) {
this.blackText.text = "0" + percentage;
this.whiteText.text = "0" + percentage;
} else if (percentage == 100) {
delete this.onEnterFrame;
this._visible = false;
this._parent.loadingText._visible = false;
this._parent.loadingLogo._visible = false;
} else {
this.blackText.text = percentage;
this.whiteText.text = percentage;
}
}

Background Multi-preloader Problems *urgent*
Hi, bit of a hurry - this is already overdue and I'm starting to feel a bit guilty.

Can anyone help with this? Is there some naunces of Flash I don't know about, or have I just made a stupid mistake? I'm trying to load several MCs in the background dynamically, the code I'm using is:

_root.createEmptyMovieClip("gameCont",0);
_root.createEmptyMovieClip("bossCont",0);
_root.createEmptyMovieClip("endCont",0);

function loadCode() { // this is run every 1 or 2 frames
_root.gameCont.stop();
_root.bossCont.stop();
_root.endCont.stop();
if(nowLoading=="start"){
nowLoading="game";
if (sHero == "boy") {
if(sFriend == "boy"){
_root.gameCont.loadMovie("swf/game_boy_boy.swf");
}else{
_root.gameCont.loadMovie("swf/game_boy_girl.swf");
}
}else{
if(sFriend == "boy"){
_root.gameCont.loadMovie("swf/game_girl_boy.swf");
}else{
_root.gameCont.loadMovie("swf/game_girl_girl.swf");
}
}
}else if(nowLoading=="game"){
if(_root.gameCont.getBytesLoaded/_root.gameCont.getBytesTotal==1){
_root.bossCont.loadMovie("swf/lovegods_boss.swf");
nowLoading="boss";
}
}else if(nowLoading=="boss"){
if(_root.bossCont.getBytesLoaded/_root.bossCont.getBytesTotal==1){
nowLoading="end";
if (sHero == "boy") {
if(sFriend == "boy"){
_root.endCont.loadMovie("swf/end_boy_boy.swf");
}else{
_root.endCont.loadMovie("swf/end_boy_girl.swf");
}
}else{
if(sFriend == "boy"){
_root.endCont.loadMovie("swf/end_girl_boy.swf");
}else{
_root.endCont.loadMovie("swf/end_girl_girl.swf");
}
}
}
}else if(nowLoading=="end"){
if(_root.endCont.getBytesLoaded/_root.endCont.getBytesTotal==1){
nowLoading="done"
}
}
}

Which I've based on an example I found somewhere (I forget where but it's included in the .zip with my source file.

Basically it's not working (doesn't even start preloading the files) and I'm hoping someone out there can see why 'cause can't at the mo' and I'm starting to get a bit psyched out about it.

If you're looking at the source file the important code's in the frame marked "begin". Sorry about the messy file, I've had to code around someone else's structure.

Thanks for any suggestions.

Multi Movie Transitions Preloader Problem
I know there is already a wealth of info on this topic, but I can't find anything to help me out with the code I'm using.

I want to have one preloader work for all of my external content.

Basicaly I'm trying to reuse the same preloader objects with these two sets of code. The red is for loading external movie clips that I have setup to transition in and out while the blue is setup to just load external movie clips with no transitions into a different location. The blue works fine, but the red does not.

First frame of main timeline:

Currently when I have mainLoader here it will not work. If I take mainLoader out the movie will load but it will not preload.


Quote:




_root.currMovie = "section1";
mainloader.loadMovie(_root.currMovie+".swf", container);






Quote:




//main preloader//

mainLoader = new MovieClipLoader();
mainListener = new Object();
mainLoader.addListener(loadListener);
mainListener.onLoadStart = function() {
container.stop();
};
mainListener.onLoadProgress = function(loadTarget, loadedBytes, totalBytes) {
preloaded = Math.floor(loadedBytes/totalBytes*100);
load_txt._visible = true;
load_txt.gotoAndPlay(1)
loaderText_txt.text = preloaded+" ";
bar_mc._width = Math.round(loadedBytes/totalyBytes*100);
};
mainListener.onLoadComplete = function() {
loaderText_txt.text = " ";
load_txt._visible = false;
load_txt.gotoAndStop(1)
container.play();
};
//main preloader end//

//image preloader//

mcLoader = new MovieClipLoader();
loadListener = new Object();
mcLoader.addListener(loadListener);
loadListener.onLoadStart = function() {
container.container_2.stop();
};
loadListener.onLoadProgress = function(loadTarget, loadedBytes, totalBytes) {
preloaded = Math.floor(loadedBytes/totalBytes*100);
load_txt._visible = true;
load_txt.gotoAndPlay(1)
loaderText_txt.text = preloaded+" ";
bar_mc._width = Math.round(loadedBytes/totalyBytes*100);
};
loadListener.onLoadComplete = function() {
loaderText_txt.text = " ";
load_txt._visible = false;
load_txt.gotoAndStop(1)
container.container_2.play();
};
//image preloader end//





What script would I add to this button to make section 1 use my preloader on the main timeine?:


Quote:




btn_mc1.btn.onRelease = function() {
btn_mc1.btn.enabled = false;
btn_mc6.checkMe();
btn_mc5.checkMe();
btn_mc4.checkMe();
btn_mc3.checkMe();
btn_mc2.checkMe();
clearAllContent();
clickSound.start(0,1);
if (_root.currMovie == undefined) {
_root.currMovie = "section1";
container.loadMovie("section1.swf");
} else if (_root.currMovie != "section1") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "section1";
container.play();
}
}
};




I need some serious help!

thanks

Demo: FlashMX Multi Purpose Reusable Preloader
Last edited by monolithdd : 2002-07-06 at 22:09.
























Just copy and paste this code into frame one of your authouring enviornment
/* Preloader custom class. Developed and coded by Aaron Sears ©monolithDigital 2002
* Can use without charge, so long as credit is given and code is not altered.
* ---------------------------------------------------
* AddonList: in the future, concidering adding feature that allows one to set the preloading bar and textfield
* as properties, and will combine them at runtime, so as to create complete customization, or perhaps
* colour alteration in code, sound compatibility or other such widgets, as of yet, it is designed mostly for
* speed.
* -------------------------------------------------------
* message = string; If you want to display a specific message after
* byesLoaded or % in text window, state it here
* max_percent = amount of the movie to load before playing
* display_bar = bool; show progress bar or not default true;
* _axis = string; string literal of property to affect eg. '_alpha' or '_xscale' default _xscale
* display_text = string;'bytes','percent','none' | show bytes, percentage or no text in clip default none
* loading_clip = movieclip to preload;
* loading_fun = custom function to load when preloader is finished, default simply plays the loaded movieclip
* -------------------------------------------------------
*register class to preloading linked movieclip, all a movieclip needs to run is:
*a textfield (dynamic:'progress')
*a movieclip (_name = 'progress_bar')
*/

//==============================
function preloader(){
/*set defaults in event of no data in ob -------- */
(this.message==null)?(this.message='Loaded'):(0);
(this.display_bar==null)?(this.display_bar=true):(0);
(this._axis==null)?(this._axis='_xscale'):(0);
(this.display_text==null)?(this.display_text = 'none'):(0);
(this.max_percent==null)?(this.max_percent=100):(0);
(this.loading_clip==null)?(this.loading_clip=_level0):(0);
(this.loading_fun==null)?(this.loading_fun=function(){this.loading_clip.play()}):(0);
/*set constants and other misc data ----------- */
this.loading_clip.stop();
this.total_bytes = this.loading_clip.getBytesTotal();
/* init values of textfield and movieclip --------- */
(this.display_bar)?(this.bar[this.display_axis]=this.getPercent(false)):(0);
(this.display_text!='none')?(this.progress.text =(this.display_text=='bytes')?(this.displayBytes()):(this.getPercent(true))):(this.display.text='');
}
preloader.prototype = new MovieClip();
preloader.prototype.onEnterFrame=function(){
// set textfielf ------------------------------------
if (this.display_text!='none'){
this.progress.text=(this.display_text=='bytes')?(this.displayBytes()):(this.getPercent(true));
}
// set preloading bar ----------------------------
if (this.display_bar){
this.bar[this._axis]=this.getPercent(false);
}
/*status ---------------------------------------- */
(this.getPercent(false)>=this.max_percent)?(this.unloadMe()):(0);
}
preloader.prototype.unloadMe=function(){
/*im done, goodbye ------------------------------ */
this.loading_fun();
this.unloadMovie();
}
preloader.prototype.displayBytes=function(){
return this.loading_clip.getBytesLoaded()+'/'+this.total_bytes+'Bytes '+this.message;
}
preloader.prototype.getPercent=function(showText){
/*showtext detirmined if its textfield or property that gets value, string or int ------------*/
var _percent = (this.loading_clip.getBytesLoaded()/this.total_bytes)*100;
return (showText)?(''+(_percent<<.5)+'% '+this.message):(_percent);
}
//EOF============================

Communicating Between 2 Seperate .swf's Each In A Seperate Frame(HTML) ... Help
this seems so elementry, .. yet I cant get it working ...

here is what I have....

A frameset (2 frames).... Frames "Top" and "Bottom"

Frame "top" contains the .swf Named and ID'd as "cont"
Frame "bottom" contains the .swf Named and ID'd as "nav"

The _parent of the frameset contains the following script.. (between the <HEAD> tags)

<script language="Javascript">
function forward1(){
window.top.document.cont.GotoFrame(10);
}
</script>

The movie in the frame "bottom" controls the movie in frame "top" with this.

on (release) {
getURL ("javascript: forward1()", "top");
}

Please look at the source for the _parent ... maybe the mistake will be apparent,heres the link
http://www.alpha8.com/s3/index.html

I'm using dream weaver ..

I'm sure that the javascript is in the _parent of the frameset.

I'm Mac IE5 ... Javascript no go?

Thanx in advance ... I desperately need a solution to this prob.

Multi Loaded Vars To Multi MC's...Banging My Head Against The Wall
OK I'm banging my head against the wall because this is probably too simple, and I've been working on too many things lately *L*

OK so I've loaded a bunch of vars... let's say var1, var2, var3...var6 from a txt file.

Now I want to send each var to a MC whit similar names - but1, but2, but3...but6

code:
varsFile.onLoad = function(success:Boolean) {
trace("loaded");
for (i=0;i<=6; i++) {
buttonClip.but[i].htmlText = varsFile.var[i];

}
};



I've tried a bunch of different syntaxes, but can't seem to get it to work... HELP!!!!!! LOL


Thanks!!!!

Creating Multi-buttons To Open Multi-jpegs
I am a newbie to action-script and flash. I have Flash 6.
I am using a template built in flash and there is a sub page that has numerous
buttons with roll-over effects that were pre-built. BUT they don't point to anything yet.

I want the viewer to be able to click on a button and have each one open a different Jpg in a window next to the rows of labeled buttons.

I imagine this is pretty simple...Perhaps you know of a specific tutorial within this flash help site that addresses this?

Or if there are a few things that you can communicate to help me...that would be awesome!

Thank you!

Specifying The FLV In A Multi-channel Multi-title Player
Hello,

I have Flash 8 Pro that I use to publish an Earth Sciences Agency version 5.1 multi-channel multi-title FLV player on my website. The FLV player is populated using an XML playlist. I'm going through the account setup process at Truveo, which is a search engine dedicated to video, that uses an RSS feed to enter your videos into their search engine. I've set up the RSS feed and it validates.

However, a listing of one of my videos in the search results only points to my site as a whole, rather than to the specific FLV file on a specific channel in the FLV player. I suspect that there is some need in the RSS file to specify the FLV video and also fire an event, plus some type of event listener in my SWF to respond with the correct FLV.

In other words, when the search engine(s) return one of my videos in a search list, and provides a hyperlink to my site, how do I make it open the FLV player at that specific video, rather than just open my site as a whole?

Can anyone point me to a tutorial for how to set that up? Is it even possible?

Thanks,

Tom Wood





























Edited: 07/13/2008 at 09:35:46 AM by tomwood2

Multi-multi-dimensional Array?
Can you have an array structured like this?

The idea being that'd we'd have a whole bunch of stores with the same data

School[0] = Store's full name
School[1] = Number of store employees
School[1][0] = Employee 1
School[1][0][0] = Janitor (Title)
School[1][0][1] = Employee 1's hire date
School[1][1] = Employee 2
School[1][1][0] = Sales person (Title)
School[1][1][1] = Employee 2's hire date

And on and on and on

I Need To Know If You Put The Preloader Into The First Scene Or In A Seperate Scene?
do i put this preloader into a SEPERATE scene? or do i put the preloader into the first scene?

[CS3] Multi Level Drop-down Menu. Trouble With The Multi Level Bit
Hi,

I'm creating a multi-level drop down menu for a college project. So far I have 2 main menu items, one of which (products) contains 3 sub menus (line 1, 2 and 3). Line 1 should also have 3 sub menu items (product 1, 2 and 3).

I'm putting the actions for the line1_mc roll over and roll out on the main timeline but it doesn't seem to be working because it is trying to call a movie clip from within another movie clip!

Any ideas would be greatly appreciated!

How Do I Seperate <>
if (score<7>3) {
gotoAndStop ("alien4-6", 1);
}

thats an example peice of my code..
how do i make it check if "score" is between 4 and 6?
im trying to make it check if score is less then 7 but greater then 3. i dont know how to seperate the 2

How Would I Seperate A MC?
Would it be possible to take a mc that is inside a mc like say _root.mc1.mc2 would i be able to make say a button so that in the swf when i hit that button mc2 is brought to _root and if i hit another button with _root.mc2 it would respond. Sry if im making it sound confusing, but if anyone can understand it plz help me

Seperate Pop Up Box In Flash?
Hello,

Please help me as i am having trouble creating a pop up window in my Flas movie. Is Java script the only thing that can create this or can Flash do this internally. I know about loading MC into MC's to confine the area however I would like to have apop up window to contain an actionscripted game in, ( with a mouse hide feature) If i just import a a MC the action script on the mouse hide, start drag etc affect the rest of the movie.

Thank you , if you relpy you are purely belter!

Preloading A Seperate SWF
Hi all,

Does anybody know how to pre-load a seperate .swf?

I have a movie, when you click on (button) cars, I have this action
loadMovie
("cars.swf", "cars");

The preloader is in the cars.swf. The movie loads in the right spot, but the preloader doesnt work.

I have a feeling that the preloader should be in the main movie, but I dont know how it should be done.

Can anybody help me out?

Cheers
Aron

Copyright © 2005-08 www.BigResource.com, All rights reserved