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




External Movie Preloader



Hi Flashers!
Im not to sure if this has already been asked, Im gessing it has but I couldnt find it in previous post's. Im trying add a preloader to my external movies that I import to my main movie. But when it loads the new movie, the preloader doesent work The page just go's blank then pops up when all content/pics etc has been loaded. What am I doing wrong? Anyone......?



Ultrashock Forums > Flash > Flash Newbie
Posted on: 2003-05-21


View Complete Forum Thread with Replies

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

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!

Preloader For External Movie
i've asked this question before but could not get satisfiying answers

i'm having trouble here with preloaders for the external movie

i'm doing a website, say i have a menu of about, product, etc
in the parent swf, when the about button is click, it will load the child's swf called about.swf
now i created preloader in the about.swf, a simple preloader with the word "loading"

however, when published on the net, it seems that it will take a few seconds before the about.swf preloader will load into the parent swf.

i've asked some people, and they asked me to create the preloader for about.swf within the parent itself.
how is that?

well for a better view of my situation, please look at this website

http://www.geocities.com/lech_flasher

if you have slow connection, you'll be able to see a pause after each menu is click before the word loading appear.

it would really help if you could include the codes as well for the solution

thanks

Anyone Have A .FLA External Movie Preloader
ive been looking for ages and rying for ages can any one please give a link to a .fla external preloader or at least a little actionscript im getting desperate cause ive never been able to do it!!!

thanks

External Movie + Preloader
hello guys.

my question:
i have one movie (navi.swf). that movie is done in adobe live motion, so i cannot open it to do scripting.

now i want to let another movie load that file AND only start it, when loading is done.

what have i to do?

how can i stop a movie, which is loaded into level 1 on my main movie, when i cannot script the file itself?

how can i get bytesLoaded from an external file?

please dont let me stay in the rain ! :-)

dr.ache

Preloader - External Movie
I'm using a preloader called Preloader.swf and want it to load the content of an external movie called Lavigne.swf

So I've used a normal preloader script I got from the tutorial section...

in the first frame I have

Code:
loadPercent = "0%";
loadBytes = "0 of " + Math.round((_parent.getBytesTotal() / 1024) * 1000) / 1000 + " Kb";


in the second frame I have

Code:
loadPercent = (Math.floor (_parent.getBytesLoaded() / _parent.getBytesTotal() * 100) + "%");
loadBytes = (Math.round((_parent.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_parent.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");

if (_parent.getBytesLoaded() == _parent.getBytesTotal()){
loadPercent = "100%";
loadBytes = (Math.round((_parent.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_parent.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");

gotoAndPlay("Button");
}


The gotoAndPlay command refers to a button I have installed which allows you to go to the external .swf

in the third frame I have

Code:
gotoAndPlay(2);


and in the final frame I used a stop command...µ
and then I have some scripting for the button...

Code:
on (release) {
loadMovieNum("Lavigne.swf", 1);
}


but it doesn't work... what am I doing wrong exactly?
thx in advance...

Preloader For External Movie
Help please!
I want to put a preloader for external movies to be loaded on the main movie.
something like a slideshow that loads images from external files (if it's clear...)
anyone can help me?
Thanx

Preloader For External Movie
Help please!
I want to put a preloader for external movies to be loaded on the main movie.
something like a slideshow that loads images from external files (if it's clear...)
anyone can help me?
Thanx

Preloader For External Movie
Help please!
I want to put a preloader for external movies to be loaded on the main movie.
something like a slideshow that loads images from external files (if it's clear...)
anyone can help me?
Thanx

Preloader Of An External Movie
Hello I've a serious doubt... I know how to put a preloader in a normal movie, but sometimes I call an external movie in the same file and I can't put a preloader on it (I've tried several things including some tutorials), and generally those external movies are very big.. so I need help with a code for a progress bar (already made by me), when it loads the external movie.. I also don't know if you have to put the preloader in the beginning of the external movie or in the frame that calls the external movie.. thanks a lot.

Preloader For External Movie(swf)
hi, im looking for preloader for external movie (swf). Preloader will placed in main movie and will indicate progress of loaded movie (swf).
thanks for help in advance
georgmorb@ip.osgf.ge
g e o r g e

Preloader For External Movie (swf).
hi,
im looking for preloader for external movie (swf). Preloader will placed in main movie and will indicate progress of loaded movie (swf).
thanks for help in advance

georgmorb@ip.osgf.ge
g e o r g e

Help On Preloader For External Movie
I use this code on the actions layer of the scene to make it load the movie to the container called areaem:


Code:
areaem.loadMovie("dou.swf");




But since the movie is pretty big I need to use a preloader, I only need a text percent indication no need for a loading bar.

So I try to use this:


Code:
loadMovie(dou.swf, "movieLoader");
_root.onEnterFrame = function() {
infoLoaded = movieLoader.getBytesLoaded();
infoTotal = movieLoader.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
delete this.onEnterFrame;
infoField._visible = false;
}
};



I've created a dynamic text field called infoField where the percent should appear


But doesn't work, need some help please!

Preloader In External Movie
OK I have a preloader in a external movie, it works fine when I preview the single .swf, but when I try to preview it as a external movie being loaded, the preloader doesn't work, it justs stays there and never loads the movie. Thanks in advance. I would post the .fla but it's too large.

Here is the actionscript I used:

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+" percent";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}

Preloader In External Movie
OK I have a preloader in a external movie, it works fine when I preview the single .swf, but when I try to preview it as a external movie being loaded, the preloader doesn't work, it justs stays there and never loads the movie. Thanks in advance. I would post the .fla but it's too large.

Here is the actionscript I used:

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+" percent";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}

Preloader - External Movie
I'm using a preloader called Preloader.swf and want it to load the content of an external movie called Lavigne.swf

So I've used a normal preloader script I got from the tutorial section...

in the first frame I have


Code:
loadPercent = "0%";
loadBytes = "0 of " + Math.round((_parent.getBytesTotal() / 1024) * 1000) / 1000 + " Kb";
in the second frame I have


Code:
loadPercent = (Math.floor (_parent.getBytesLoaded() / _parent.getBytesTotal() * 100) + "%");
loadBytes = (Math.round((_parent.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_parent.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");

if (_parent.getBytesLoaded() == _parent.getBytesTotal()){
loadPercent = "100%";
loadBytes = (Math.round((_parent.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_parent.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");

gotoAndPlay("Button");
}
The gotoAndPlay command refers to a button I have installed which allows you to go to the external .swf

in the third frame I have


Code:
gotoAndPlay(2);
and in the final frame I used a stop command...µ
and then I have some scripting for the button...


Code:
on (release) {
loadMovieNum("Lavigne.swf", 1);
}
but it doesn't work... what am I doing wrong exactly?
thx in advance...

Preloader For External Movie (swf)
hi,
I'm looking for preloader for external movie (swf). Preloader will placed in main movie and will indicate progress of loaded movie (swf).
thanks for help in advance
georgmorb@ip.osgf.ge
g e o r g e

External Preloader For Movie
I am wondering if its possible to have a preloader contained in an external movie than the one its preloading.

I have heard that the movie clip class can do this, is this true or is there another way?

thanks

::preloader::check The External Movie
i want to make a preloader that checks the external movie file is loaded or not.if its loaded play the animation.is it possible?????

External Movie Inside Preloader
Hi,

Can I include all external movies inside 1 preloader?
I mean, when I'm loading the preloading page, it will load all the other related external SWFs as well....

Andre

Preloader For A External Movie Prob.
O.k this is a big problem and im with a headache already
Iwanna do a preloader for a external movie.
-I have the preloader in Scene 1
-I have a movie clip named "bueno" and with the action scrip for load a swf that is in the same folder

everything runs fine, but the preloader just load the empty movie clip that is 4.kb and the swf that im loading is 360Kb.

I need the preloader says " X from 360Kb." and then sends you to the next scene where the movie is.

But mine says " X from 4kb" and sends you the next scene where the movie isn´t loaded!

I Know there is a way.
so Please Someone help me
if you can sendme the script or contact me doit
thanks

Preloader That Loads An External Movie
Is there a way to have one movie with a preloader on it that loads another movie? Is so, how would I go about doing that?

Thanks

Attaching Preloader For External Movie(s)
(I posted this by accident in scripting and backend, apologies)
I'm trying to use the same preloader movie in my main movie, so then for when a movie is to be loaded into the main movie, I'm calling a function that is like:


Code:
depth = 0;
preloadExt = function (loc) {
loadMovie("portfolio/id/bassilik.swf", "_root.project.shots");
_root.project.holder.attachMovie("ext_preloader", "external_preloader", depth++);
};
inside that preloader that I've written it goes like this:

frame one:

Code:
movieSize = _root.project.shots.getBytesTotal();
moviePercent = movieSize/100;
sliderMove = this.redBar._x;
percentMove = this.percentContain._x;
frame 2

Code:
current = _root.project.shots.getBytesLoaded();
this.percentContain.percent = Math.round(current/moviePercent);
this.redBar._x = sliderMove + this.percentContain.percent;
this.percentContain._x = percentMove + this.percentContain.percent;
frame 3

Code:
if (this.percentContain.percent<100) {
this.gotoAndPlay(2);
} else {
this.removeMovieClip();
}
but of course _root.project.shots will have loaded within the main movie.. how can I refer to each movie that is being loaded in?

External Movie And Image Preloader
I have seen people make external objects preload, but only when the external object is called upon. How do I do this?? Ive seen it for external movies, im pretty sure you can do it with images too.

How To Add A Preloader For A External Movie Clip.
Hi,
What I need some advice on is what is the most effecient way to add a visual preloader to play while the user clicks a button to load an external "swf" into a predetermined sized movie clip. The "swf" loads rather quickly but on some computers it could take up to 6 seconds to start to play and I don't want the user to think its not going to play when infact it is loading without them seeing anything. Would I drag a preloader from the components window into the first frame of the intended targeted "mc"? I am using MX 2004 on windows platform. Thanks ahead for any help.

External Loaded Movie Preloader
hi all,
i wanna make a swf that loads external swf movie, and this swf will have a preloader as loading external swf movie is concerned.

usually i make a preloader for a single swf, show the preloader at frame 1 and keep showing this preloader till bytes loaded == bytes total then i play the movie which go to play another frame.
That is single swf preloader, very common as shown in kirupa tutorial.

But how about the preloader is in swf that load external swf?
how to do this?

Thanks

Movie & External Image In 1 Preloader?
Hi to all,

i'm trying to load a jpg dynamicaly into my flash movie and
integrate the preload process/state into
my existing preloader. (using the Smooth Prealoder)

My problem is, the preloader only recognizes the mainmovie
(the size of the main swf / 17 KB) and ignores the size of the jpg.
The result, when the movie has finished loading,
it starts playing without having finished
preloading the jpg.

Here's my try:
Code:
stop();
function preLoad(what):Void {
var percent:Number = 0;
var total:Number;
var loading:Number;
var per:Number;
var loader_mc:MovieClip = createEmptyMovieClip("l",500);
loader_mc.onEnterFrame = function() {

// here i'm trying to load that jpg
// but the preloader ignores it :-(

createEmptyMovieClip("looper", 10);
looper.loadMovie("1.jpg",1);

loading = getBytesLoaded();
total = getBytesTotal();
percent -= (percent - ((loading / total) * 100)) * .25;
per = int(percent*1.5);
load_mc.loadBar._width = per;
if (percent > 99) {
delete this.onEnterFrame;
play();
}
};
}
preLoad(this);
So how can i make the preloader preloading the movie
AND the jpg and THAN starts to continue to frame 2??

Thanks in advance!

regards
mod

External Loaded Movie Preloader
hi all,
i wanna make a swf that loads external swf movie, and this swf will have a preloader as loading external swf movie is concerned.

usually i make a preloader for a single swf, show the preloader at frame 1 and keep showing this preloader till bytes loaded == bytes total then i play the movie which go to play another frame.
That is single swf preloader, very common as shown in kirupa tutorial.

But how about the preloader is in swf that load external swf?
how to do this?

Thanks

Movie & External Image In 1 Preloader?
Hi to all,

i'm trying to load a jpg dynamicaly into my flash movie and
integrate the preload process/state into
my existing preloader. (using the Smooth Prealoder)

My problem is, the preloader only recognizes the mainmovie
(the size of the main swf / 17 KB) and ignores the size of the jpg.
The result, when the movie has finished loading,
it starts playing without having finished
preloading the jpg.

Here's my try:
Code:
stop();
function preLoad(what):Void {
var percent:Number = 0;
var total:Number;
var loading:Number;
var per:Number;
var loader_mc:MovieClip = createEmptyMovieClip("l",500);
loader_mc.onEnterFrame = function() {

// here i'm trying to load that jpg
// but the preloader ignores it :-(

createEmptyMovieClip("looper", 10);
looper.loadMovie("1.jpg",1);

loading = getBytesLoaded();
total = getBytesTotal();
percent -= (percent - ((loading / total) * 100)) * .25;
per = int(percent*1.5);
load_mc.loadBar._width = per;
if (percent > 99) {
delete this.onEnterFrame;
play();
}
};
}
preLoad(this);
So how can i make the preloader preloading the movie
AND the jpg and THAN starts to continue to frame 2??

Thanks in advance!

regards
mod

In And Out Animation To Preloader From External Movie
The thing here is i have a main movie, which contains buttons to load the destined movie and a preloader which i summon up. I've messing around for a few hours now and i havent managed to add animation(extra frames) to my preloader which is summoned from within the movie that has been chosen(by a button). works splendily. The problem is my preloader just popup and disapears POOF, how do i add animation to my preloader BEFORE and AFTER it had done its job.

Here is the code within the movie which summens up the preloader.

Code:

this.onEnterFrame = function() {
   if (this.getBytesLoaded()<this.getBytesTotal()) {
      _level0.preloaderGraphics._visible=true;
      Total = this.getBytesTotal()/1000;
      Received = this.getBytesLoaded()/1000;
      Percentage = (Received/Total)*100;
      _level0.preloaderGraphics.percent = int(Percentage) add "%";
      _level0.preloaderGraphics.progressBar._xscale = Percentage;
   } else {
      this.gotoAndPlay("intro");
      this.onEnterFrame = null;
      _level0.preloaderGraphics._visible=false;
   }
};
stop();



I dug a few holes with setInterval but turned up pretty messy.
Any suggestions?

Preloader With External Movie Doesn't Work, Help Please
This simplistic loader does not work with an external movie loaded into level1 from level0 with this command:

loadMovieNum ("image.swf", 1);

(Image.swf movie frames)
FRAME 1:
ifFrameLoaded (5) {
gotoAndPlay (5);
}

FRAME 2:
gotoAndPlay (1);

FRAME 5:
The Image and a stop command

It does some funky stuff on level0. What needs to be changed so I can use this on my level1 movie?

Thanks

External Movie Preloader Code. What Is Wrong? Thanks
Hello,

i created a code which acts as a preloader to an external movie loaded in level 1. I think, but i am not sure, that the percentage and bytes fields are working. Could you check them?In relation to the Loading BAR, it doesn't scale from 0 to 100. What is
wrong? My code takes only one frame...here it is:

_root.loadBarFill._xscale=0;
// load the external movie into the new movieclip
loadMovieNum("pt27lamps.swf", 2);
// check the download status of the external
// movie once every frame
this.onEnterFrame = function() {
// displays the percentage of the movie that has loaded
_root.loadDisplay.loadPercent = Math.floor(_level2.getBytesLoaded()/_level2.getBytesTotal()*100)+"%";
_root.loadDisplay.loadBytes = Math.round(((_level2.getBytesLoaded()/1024)*1000)/1000)+"Kb";
_root.loadBarFill._xscale = _root.loadDisplay.loadPercent;
if (percent == 100) {
delete this.onEnterFrame;
}
};



Thanks,
Miguel

External Movie Preloader Code. What Is Wrong? Thanks
Hello,

i created a code which acts as a preloader to an external movie loaded in level 1. I think, but i am not sure, that the percentage and bytes fields are working. Could you check them?In relation to the Loading BAR, it doesn't scale from 0 to 100. What is
wrong? My code takes only one frame...here it is:

_root.loadBarFill._xscale=0;
// load the external movie into the new movieclip
loadMovieNum("pt27lamps.swf", 2);
// check the download status of the external
// movie once every frame
this.onEnterFrame = function() {
// displays the percentage of the movie that has loaded
_root.loadDisplay.loadPercent = Math.floor(_level2.getBytesLoaded()/_level2.getBytesTotal()*100)+"%";
_root.loadDisplay.loadBytes = Math.round(((_level2.getBytesLoaded()/1024)*1000)/1000)+"Kb";
_root.loadBarFill._xscale = _root.loadDisplay.loadPercent;
if (percent == 100) {
delete this.onEnterFrame;
}
};



Thanks,
Miguel

Simple Preloader For A External Loaded Movie
I've done preloaders in the past, with no problems. I cannot seem to figure out how to do a preloader for an externally loaded movie. I take it that the preloader will exists in the loaded movie? I just want something simple, I don't need bytes loaded with percentages, just when the last frame (frame label "loaded") has loaded the movie will then begin to play.

What should the code look like and where does it go?


Mark

Help Please With Preloader For External Movie Loaded Into Sprite
I have tried tried and tried again, just can't make it work.
Clicking on the top menu items, there is no problem with the preloader working, but the problem is that it is looping and not loading the external movie??
Any help would be greatly appreciated
www.bcspecialtyhomes.com

Preloader On An External .swf Being Loaded Into The Main Movie
when an external swf is loaded into another one, the preloader on the movie being loaded does not work. how would i make a preloader to show the progress of the movie that is being loaded into the main one? would the preloader have to go on the main flash, or on the swf being loaded?

The Preloader Of A External Movie Dont Work
I use flash mx 2004 -
I have logo.fla and external.fla

logo.fla have their own preloader, in external.fla i put a empty movieclip that logo.fla will load there using the behaviors...

When i debug the movie, the preloader of logo.fla dont work, the movie is in blank unti all the image is load...

In logo.fla the preloaders works! - i dont know whats going, the problem here is that the logo preloader works, but no if i use the .swf as a external movieclip.

Please download the 2 files, i need help for this really urgent! anyone!

Thanks

Preloader Delay And No Progress Bar On External .swf Movie
I would really appreciate any help with this. Basically my preloader at the beginning of my parent flash movie works fine with the progress bar moving as it loads and beginning at 1% and rising to 100% etc.

I have then applied the same code to an external .swf and changed _root. to _.this which partly works but for some reason nothing happen until it gets to 54% loaded (the external file is a 1mb in size so there is a bit of a wait) and the progress bar doesn't move at all. Any ideas?

http://www.binaryfinarydesign.com/lambretta/index.htm

Here is my code:

Frame1:
loadpercent = "0%";
loadBytes = "0 of " + Math.round((this.getBytesTotal() / 1024) * 1000) / 1000 + " Kb";

Frame2:
loadPercent = (Math.floor (this.getBytesLoaded() / this.getBytesTotal() * 100) + "%");
LoadBytes = (Math.round((this.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((this.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");
if (this.getBytesLoaded() == this.getBytesTotal()) {loadPercent = "100%"; loadBytes = (Math.round((this.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((this.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded."); this.gotoAndPlay("rangestart");}

Frame3:
this.gotoAndPlay (2) ;

Frame4: is labeled "rangestart"

External Swf Preloader In Nested Movie Clip
Hello all,

Does anyone know how to create external swf preloader in a nested movie clip?

For example, clip_mc was loaded on a empty movie clip on the stage. There is another movie clip, clip_child_mc, will be loaded into another empty movie clip in clip_mc when a button is pressed. I hope my explanation is clear enough and hope to hear some feedback from you guys.

Thanks!

Preloader W External Swf Loads Movie Too Early
Hi all,
I've been tearing my eyes out trying to figure this one out. I have a game in a swf file, and I have another swf file which only contains my preloader. The preloader file has only 1 frame and 3 layers wich controls progess bar etc. My problem is that the movie is played before the actual movie has loaded 100%. Instead, when my loader reaches around 50% it disappears and the game swf is played which isn't good since every game component hasnt been loaded yet. Any ideas on why this is happening?

I'm using the tutorial
http://www.lukamaras.com/tutorials/p...preloader.html



Code:
siteLoader.loadMovie("game.swf");
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function() {
kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
if (percentage == 99) {
delete this.onEnterFrame;
}
}
I have also tried using loadMovieClip but I get the same effect. Why is my preloader exiting before the entire swf is loaded? Any help would be greatly appreciated.

Loading External Movie Preloader Problem
hi all, i can't find out how to make work this code, that should load a movie into a Main-Movie, where on 1st frame i've put the follow code:


Code:
var moviem:MovieClip = createEmptyMovieClip("moviem", 9999);
moviem.onEnterFrame = function() {
var barWidth:Number = 200;
var barHeight:Number = 6;

this.createEmptyMovieClip("pBar_mc", 9999);
var test = getDepth(pBar_mc);
trace (test);
var bar:MovieClip = pBar_mc.createEmptyMovieClip("bar_mc", 10);
bar.beginFill(0xFF0000, 100);
bar.moveTo(0, 0);
bar.lineTo(barWidth, 0);
bar.lineTo(barWidth, barHeight);
bar.lineTo(0, barHeight);
bar.lineTo(0, 0);
bar.endFill();
bar._xscale = 0;

var stroke:MovieClip = pBar_mc.createEmptyMovieClip("stroke_mc", 20);
stroke.lineStyle(0, 0xFFCC66);
stroke.moveTo(0, 0);
stroke.lineTo(barWidth, 0);
stroke.lineTo(barWidth, barHeight);
stroke.lineTo(0, barHeight);
stroke.lineTo(0, 0);

pBar_mc.createTextField("label_txt", 30, 0, barHeight, 100, 21);
pBar_mc.label_txt.autoSize = "left";
pBar_mc.label_txt.selectable = false;

pBar_mc._x = (Stage.width - pBar_mc._width) / 2;
pBar_mc._y = (Stage.height - pBar_mc._height) / 2;

var mymove = new MovieClipLoader();
mymove.onLoadStart = function (targetMC)
{
loadProgress = mymove.getProgress(targetMC);
trace( loadProgress);
}
mymove.onLoadProgress = function (targetMC, loadedBytes, totalBytes) {
trace ("movie clip: " + targetMC);
trace("Bytes loaded at progress callback=" + loadedBytes);
trace("Bytes total at progress callback=" + totalBytes);
var pctLoaded:Number = Math.floor(loadedBytes / totalBytes * 100);
pBar_mc.bar_mc._xscale = pctLoaded;
var my_cchange:TextFormat = new TextFormat();
my_cchange.color = 0xFFFFFF;
pBar_mc.label_txt.text = pctLoaded + "% loaded";
pBar_mc.label_txt.setTextFormat(my_cchange);

if (loadedBytes >= totalBytes) {
pBar_mc.onEnterFrame = undefined;
pBar_mc.unloadMovie();
}
}
mymove.loadClip("top.swf", moviem);

}
i can't find out the way to solve it
trust on yours help, thanks

Loading External Movie Preloader Problem
hi all, i can't find out how to make work this code, that should load a movie into a Main-Movie, where on 1st frame i've put the follow code:


Code:
var moviem:MovieClip = createEmptyMovieClip("moviem", 9999);
moviem.onEnterFrame = function() {
var barWidth:Number = 200;
var barHeight:Number = 6;

this.createEmptyMovieClip("pBar_mc", 9999);
var test = getDepth(pBar_mc);
trace (test);
var bar:MovieClip = pBar_mc.createEmptyMovieClip("bar_mc", 10);
bar.beginFill(0xFF0000, 100);
bar.moveTo(0, 0);
bar.lineTo(barWidth, 0);
bar.lineTo(barWidth, barHeight);
bar.lineTo(0, barHeight);
bar.lineTo(0, 0);
bar.endFill();
bar._xscale = 0;

var stroke:MovieClip = pBar_mc.createEmptyMovieClip("stroke_mc", 20);
stroke.lineStyle(0, 0xFFCC66);
stroke.moveTo(0, 0);
stroke.lineTo(barWidth, 0);
stroke.lineTo(barWidth, barHeight);
stroke.lineTo(0, barHeight);
stroke.lineTo(0, 0);

pBar_mc.createTextField("label_txt", 30, 0, barHeight, 100, 21);
pBar_mc.label_txt.autoSize = "left";
pBar_mc.label_txt.selectable = false;

pBar_mc._x = (Stage.width - pBar_mc._width) / 2;
pBar_mc._y = (Stage.height - pBar_mc._height) / 2;

var mymove = new MovieClipLoader();
mymove.onLoadStart = function (targetMC)
{
loadProgress = mymove.getProgress(targetMC);
}
mymove.onLoadProgress = function (targetMC, loadedBytes, totalBytes) {
var pctLoaded:Number = Math.floor(loadedBytes / totalBytes * 100);
pBar_mc.bar_mc._xscale = pctLoaded;
var my_cchange:TextFormat = new TextFormat();
my_cchange.color = 0xFFFFFF;
pBar_mc.label_txt.text = pctLoaded + "% loaded";
pBar_mc.label_txt.setTextFormat(my_cchange);

if (loadedBytes >= totalBytes) {
pBar_mc.onEnterFrame = undefined;
pBar_mc.unloadMovie();
}
}
mymove.loadClip("top.swf", moviem);

}
i can't find out the way to solve it
trust on yours help, thanks

Loading External Movie Preloader Problem
as suggested, i have post this topic on this appropriate forum. (some moderator maybe will delete the topics on Flash MX forum (two wrong topics). sorry for it.
So, that's my problem:
i can't find out how to make work this code, that should load a movie into a Main-Movie, where on 1st frame i've put the follow code:


Code:
var moviem:MovieClip = createEmptyMovieClip("moviem", 9999);
moviem.onEnterFrame = function() {
var barWidth:Number = 200;
var barHeight:Number = 6;

this.createEmptyMovieClip("pBar_mc", 9999);
var test = getDepth(pBar_mc);
trace (test);
var bar:MovieClip = pBar_mc.createEmptyMovieClip("bar_mc", 10);
bar.beginFill(0xFF0000, 100);
bar.moveTo(0, 0);
bar.lineTo(barWidth, 0);
bar.lineTo(barWidth, barHeight);
bar.lineTo(0, barHeight);
bar.lineTo(0, 0);
bar.endFill();
bar._xscale = 0;

var stroke:MovieClip = pBar_mc.createEmptyMovieClip("stroke_mc", 20);
stroke.lineStyle(0, 0xFFCC66);
stroke.moveTo(0, 0);
stroke.lineTo(barWidth, 0);
stroke.lineTo(barWidth, barHeight);
stroke.lineTo(0, barHeight);
stroke.lineTo(0, 0);

pBar_mc.createTextField("label_txt", 30, 0, barHeight, 100, 21);
pBar_mc.label_txt.autoSize = "left";
pBar_mc.label_txt.selectable = false;

pBar_mc._x = (Stage.width - pBar_mc._width) / 2;
pBar_mc._y = (Stage.height - pBar_mc._height) / 2;

var mymove = new MovieClipLoader();
mymove.onLoadStart = function (targetMC)
{
loadProgress = mymove.getProgress(targetMC);
}
mymove.onLoadProgress = function (targetMC, loadedBytes, totalBytes) {
var pctLoaded:Number = Math.floor(loadedBytes / totalBytes * 100);
pBar_mc.bar_mc._xscale = pctLoaded;
var my_cchange:TextFormat = new TextFormat();
my_cchange.color = 0xFFFFFF;
pBar_mc.label_txt.text = pctLoaded + "% loaded";
pBar_mc.label_txt.setTextFormat(my_cchange);

if (loadedBytes >= totalBytes) {
pBar_mc.onEnterFrame = undefined;
pBar_mc.unloadMovie();
}
}
mymove.loadClip("top.swf", moviem);

}
i can't find out the way to solve it
trust on yours help, thanks

Preloading An External SWF Using The Same Preloader As The Parent Movie
I have an external swf that is randomly chosen (out of 5) and loaded into my main movie. This works great, but I'm trying to figure out a way to have this external SWF preload when my parent movie preloads, I'd like to have it included with the parent movie's preloader progress.

Also, I would like the parent movie to not continue playing until my loaded swf file has completely played.

Any help on this would be greatly appreciated...

-John

Preloader On External Swf Makes My Movie Start Over
I was told that if I put a preloader on my on my swf and export it that it would work but now when ever i import the swf with the loadMovie action my main movie resets and starts playing from frame 2 and I know its not a button problem its preloader problem could it be a action on my preloader?

heres the same action I have on my preloader and my exported swf preloader

ActionScript Code:
onClipEvent (load) {
total = _root.getBytesTotal();
}

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

Loading Both And External Sound File And The Movie With The Same Preloader
i made a movie.swf with several scenes. then i made another movie with just sound called sound.swf that i have load in the first frame of the second scene in level 2 so i can have it play over the whole movie becuase of the multiple scenes. in the first scene i have the movie.swf load with a preloader. is there anyway that i can have both the movie.swf and the sound.swf load with he same preloader. the reason i want the sound.swf to preload is because it loads late in the second scene. the url for the movie is:

http://www.geocities.com/aviewfromth.../3seconds.html

can anybody help? thanks

Preloader For External Movie Loaded Into A Blank Placeholder
Hello all,

Help!!!! I am going nuts over here. I am having issues with getting preloaders to work on movies that are loaded into another movies blank placeholder. This is what I got: I have a main movie that serves as my homepage then I have external photo album movies that when I click on a button load into a blank placeholder in the main movie. Well I am trying to put a preloader on those photo albums but I suck! I can do it for the main movie no prob but a movie that is loaded into a target not the case. If anyone can help me with this I would be very grateful. Thanks

Duncan

Preloader To Also Preload External F4v Files In Main Movie?
n00b alert... I did search the forum (and several others online), but either the code got too complicated for me to even attempt to adjust it, or I didn't find a relevant answer.
So I really hope someone here can help me out.

I've found a preloader code online that works like a charm. I don't really know what half of it actually means/does, but it preloads and then plays the mainfile.swf . Me happy.

But the "mainfile.swf" calls external f4v files, and the problem is that they do not get preloaded. (And that kinda was why I needed a preloader in the first place...)

I gave all the f4v files instance names within the mainfile (assume: video01.f4v, video02.f4v etc), and the f4v files themselves are in the same folder as the mainfile.swf.

What do I need to add to the code to get it to preload everything?
Thanks in advance!!


ActionScript Code of my preloader is attached.







Attach Code

var l:Loader = new Loader(); l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop); l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("mainfile.swf"));

function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString() + "%";
}

function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}

Loading External Swf Into Movie Clip ... Preloader Problem
Hi,

i don`t know how i got back to the basics but i am having a problem with a preloader.
What i do...
I have an empty movie clip that loads an swf after a user make a button choise.
So after the user choise i make the preloader._visible = true;
and in the preloaders movie clip i have this code

onClipEvent (enterFrame) {
_root.externals.stop();
mctotal = _root.externals.getBytesTotal();
mcloaded = _root.externals.getBytesLoaded();
percent = Math.round((mcloaded/mctotal)*100);
load = percent+"%";
if (percent == 100) {
_root.externals.play();
this._parent._visible = false;
}
}

The "_root.externals" is the empty movie clip that loads the external swf.
The problem is that when the preloader goes to 100% the external swf plays but plays in loop all the time.
In the external swf i have the action stop(); in a frame but it doesn`t stop
insted of stoping it replays all the time......

Any idea what can i do???????

External Preloader That Opens Main-movie In Html-frame
Howdy scripters!
My site starts loading showing the PRELOADER. It should be shown in a 1-frame browser-window (standard window that is...). Once the MAIN-movie has loaded it should be shown in the middle frame of a 3-frame-browser-window.
Follow me?

=My guess is that it could be done something like this=
Use two .swf:s. The first one is the PRELOADER and the second is the MAIN-movie. Once the PRELOADER has loaded MAIN, MAIN should be shown in another browser-window containing frames. At the same time, the window containing the PRELOADER should be closed. This would give the impression of that the preloader switched from 1-frame-window to a 3-frame-window.

QUESTION: can an external preloader open the loaded file in a new html-document? some nice javascript?

QUESTION 2: do you have any alternative strategies for solving my problems?

All help is MUCH appreciated!!!
THANKS!!

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