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








How To Preload .swf's From Main Movie


I am loading multiple .swf's into a main .swf on different levels. So on the mains time line I have a frame that says this;

loadMovieNum ("AASPLASH*.swf", 8);
loadMovieNum ("NAVIGATION.swf", 3);
loadMovieNum ("AUDIO.swf", 5);
loadMovieNum ("SPINNER.swf", 1);

What I want on the main is to have is a % preloader that says, if these 4 movies are loaded go to a play them. This way when people view my site it looks seemless.




Ultrashock Forums > Flash > ActionScript
Posted on: 2002-05-29


View Complete Forum Thread with Replies

Sponsored Links:

How To Preload Main Movie
Hi!

This code is to preload external swf files?


Code:
var request:URLRequest = new URLRequest("content.swf");
var loader:Loader = new Loader();

loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);

function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
trace("Loading: "+percentLoaded+"%");
}
function loadComplete(event:Event):void {
trace("Complete");
}

loader.load(request);
addChild(loader);
How would I do to preload the main file if this code is at first frame in the main movie inside a function for example?

View Replies !    View Related
Preload Various Swf Inside The Main Movie
I have the main movie that call 3 external swf , i try to make a preload like this, to start the to play only when the last extrenal swf get loaded but i got freeze on it,
and how can i put a dynamic text to change everytime start to load a another external swf
load main scene-> load elements(external swf) -> load adds( external swf).


TIA
molotophy

View Replies !    View Related
How To Preload Multiple Movie Clips With The Main Movie
I want to know that how i can preload multiple movies with main movie together. lets supose i have two movies named first.swf and second.swf and i have also Main movie with intro so how i can preload these movies together then these movies can play together.

Please help me in this regard.

Thankyou

View Replies !    View Related
Can I Preload A Movie Clip That Is On Main Timeline?
Ive seen this done, and now I need to do it. I want to do a percentage preloader for a movie clip. I think my nesting is wrong. Here is the script as it is not working. If anyone knows how to do this, you will be helping me save the world. The crap below might be totally off. Feel free to bust on me.

cmov is the MC I want to load.

total = 250;
download = int(_root.cmov.getBytesLoaded() /1000);
if (download>=total) {
tellTarget ("_root.cmov") {
gotoAndPlay (2);
}
} else {
play ();
}

View Replies !    View Related
URGENT - Stop Main Movie Looping After Preload
Hi there - this is a stoopid one - I have a preloader for an xml file and then a large movie clip. I preload using three key frames (First sets up the load, the second tests for success and the third just loops to the second).

Once the xml has loaded, I want to jump the loop and carry on to a KF which has a clip on that is highly complex, comes with animation and animated clips embedded.

How do I stop the main time line looping back to the preloader without stopping the main time line?

If I put in a stop(); on the timeline, then all of the animations on the large mc then shutdown. I either get the loop and the animations or no loop and no animations.

Help!!!!

frank

View Replies !    View Related
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);
}

View Replies !    View Related
Please Help Fraternity Preload Movie And Main Movie
I really would appreciate some much needed help with this project from some of you smart people!! I read this forum and appreciate the knowledge I see!!
My son created the SigEp Arbeta Fraternity(Arkansas-Henderson State University) preloader .swf and the main .swf that they would like for the introduction to their site.

The preloader has the precentage and loading bar to show the main movie loading. This is WAY OVER MY head. I am a beginnner and they need someone that would like to help them with this.

What they want is the preloader to run with the percentage and preloader bar loading for the main movie and of course, then, the main movie starts.

Would some one want to help me set this up? I do not have a clue how to do this. I have HONESTLY tried to read, read, work, study, and apply tutorials, but this is too advance for me.

Here are the movies:
http://www.darcejean.com/arbeta/flas..._preloader.swf
www.darcejean.com/arbeta/flash/arbeta.swf
Thank you
Darce Jean
Retired Artist,Mother,Grandmother

View Replies !    View Related
Preload Main Movie Via Document Class & Add Details To Stage?
Hi Guys,

I have what I think might be a dumb question on my behalf or maybe I am missing something but is it not possible to added a preloader movie clip that i create to the stage via the document class? i.e. if i wanted to use this method of preloading my movie, is it possible to add a movie clip to the stage with the status? Everything I try just doesn't seem to work Currently, when i test within flash using simulate download, my stuff is added to the stage, after the movie is loaded? I've moved my content on the stage to frame 2 with the correct frame label.

cheers for any help,
stacey


Code:
package {

import flash.display.*;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.net.*;
import flash.text.*;

public class SiteLoader extends MovieClip {

var preloader_site_mc:MovieClip = new MovieClip();


public function SiteLoader():void {


createPreloader();

//this.loaderInfo.addEventListener(Event.INIT, initApplication);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);


}


public function showProgress(theProgress:ProgressEvent):void {

//get the values
TextField(MovieClip(preloader_site_mc).getChildByName("preloader_site_percentage")).text = "" + (theProgress.bytesLoaded / theProgress.bytesTotal * 100);

//update width of bar by amount changed as a percentage
Sprite(MovieClip(preloader_site_mc).getChildByName("preloader_site_progressBar")).scaleX = theProgress.bytesLoaded / theProgress.bytesTotal;

}

public function onLoadComplete (myEvent:Event):void {

gotoAndStop("loaded");


}


public function createPreloader():void {

//create the preloader itself dynamically
var sprite_preloader_site_progressBarBorder:Sprite = new Sprite;
sprite_preloader_site_progressBarBorder.graphics.lineStyle(0.5,0x30304a,0.5,false,LineScaleMode.NORMAL,CapsStyle.NONE);
sprite_preloader_site_progressBarBorder.graphics.moveTo(550,420);
sprite_preloader_site_progressBarBorder.graphics.lineTo(735,420);
sprite_preloader_site_progressBarBorder.graphics.moveTo(735,420);
sprite_preloader_site_progressBarBorder.graphics.lineTo(735,425);
sprite_preloader_site_progressBarBorder.graphics.moveTo(735,425);
sprite_preloader_site_progressBarBorder.graphics.lineTo(550,425);
sprite_preloader_site_progressBarBorder.graphics.moveTo(550,425);
sprite_preloader_site_progressBarBorder.graphics.lineTo(550,420);
preloader_site_mc.addChild(sprite_preloader_site_progressBarBorder);

var sprite_preloader_site_progressBar:Sprite = new Sprite;//b6c0df or fbda9b
sprite_preloader_site_progressBar.name = "preloader_site_progressBar";
sprite_preloader_site_progressBar.graphics.lineStyle(2,0xb6c0df,0.2,false,LineScaleMode.NORMAL,CapsStyle.NONE);
sprite_preloader_site_progressBar.graphics.moveTo(552,423);
sprite_preloader_site_progressBar.graphics.lineTo(734,423);//dont have a width yet
sprite_preloader_site_progressBar.scaleX = 0;
preloader_site_mc.addChild(sprite_preloader_site_progressBar);

//ADD TEXT FIELDS

//create new instance of the font
var preloader_site_font:Font = new Arial_Embedded();

//create a format for the fields
var preloader_site_TextFormat:TextFormat = new TextFormat();
preloader_site_TextFormat.font = "Arial";//
preloader_site_TextFormat.color = 0x57578f;//0xfbda9b;
preloader_site_TextFormat.size = 10;

//create the fields & their attrs
var textField_preloader_site_loadingText = new TextField();
textField_preloader_site_loadingText.autoSize = TextFieldAutoSize.LEFT;
textField_preloader_site_loadingText.selectable = false;
textField_preloader_site_loadingText.name = "preloader_site_loadingText";
textField_preloader_site_loadingText.defaultTextFormat = preloader_site_TextFormat;

var textField_preloader_site_percentage = new TextField();
textField_preloader_site_percentage.autoSize = TextFieldAutoSize.NONE;
textField_preloader_site_percentage.selectable = false;
textField_preloader_site_percentage.name = "preloader_site_percentage";
textField_preloader_site_percentage.defaultTextFormat = preloader_site_TextFormat;

var textField_preloader_site_percentSymbol = new TextField();
textField_preloader_site_percentSymbol.autoSize = TextFieldAutoSize.LEFT;
textField_preloader_site_percentSymbol.selectable = false;
textField_preloader_site_percentSymbol.name = "preloader_site_percentSymbol";
textField_preloader_site_percentSymbol.defaultTextFormat = preloader_site_TextFormat;

//add content to those text fields
textField_preloader_site_loadingText.text = "LOADING DATA";
textField_preloader_site_percentage.text = 0;
textField_preloader_site_percentSymbol.text = " %";

//set the positions
textField_preloader_site_loadingText.x = 550;
textField_preloader_site_loadingText.y = 400;//move above registration point
textField_preloader_site_percentage.x = 700;
textField_preloader_site_percentage.y = 400;
textField_preloader_site_percentSymbol.x = 720;
textField_preloader_site_percentSymbol.y = 400;

preloader_site_mc.addChild(textField_preloader_site_loadingText);
preloader_site_mc.addChild(textField_preloader_site_percentage);
preloader_site_mc.addChild(textField_preloader_site_percentSymbol);

//add to stage
this.addChild(preloader_site_mc);


}


}



}

View Replies !    View Related
Preload Random Images In Main Movie Every 10 Seconds After Load Complete
Hi there,
I am working on a flash web site and I have a hald decent code for it but there are some bugs i cant figure out.
www.fadlighting.com/test
The following is the concept:
Load a random image from the folder on the server. Build preloader that showes size of image and percent remaining to load image. Wait 10 seconds and load new random image.

So far I was able to do so with the expert help of the Bible for Flash.
The following is the code i scrached together, This portion is at frame 1 of main time line
function loadFile(){

images = 13;
directory = "http://www.fadlighting.com/test/random/image_";
image = directory add Math.ceil(Math.random()*images) add ".jpg"
intro_holder.loadMovie(image);
var loadObj = intro_holder;

var initObject = {
_x: intro_holder._x +590 ,
_y: intro_holder._y +240 ,
target: loadObj,
loadExit: null
};

_root.attachMovie("loader","loader",2, initObject);
updateAfterEvent();
setInterval(loadFile, 10000);


}

loadFile();
// setInterval(loadFile, 10000);

// intro_holder.unloadMovie();
// updateAfterEvent();

the following code is in a Movie Clip called intro_holder in the library on frame 1 of its timeline
function checkLoad(obj) {
var lBytes = target.getBytesLoaded();
var tBytes = target.getBytesTotal();
var percentLoaded = Math.floor((lBytes/tBytes)*100);
bar._xscale = percentLoaded;
percent.text = Math.floor(percentLoaded)+"% of "+Math.floor(tBytes/1024)+"KB loaded.";
if (lBytes>=tBytes && tBytes>0) {
if (count>=12) {
clearInterval(checkProgress);
_parent[loadExit]();
obj.removeMovieClip();
} else {
count++;
}
}
updateAfterEvent();
}
checkProgress = setInterval(checkLoad, 100, this);
stop();

the code works but it does not wait for the image to be loaded before starting countdown for 10 seconds... and in between loads something is off... uhmmmm I can email fla if interested to long to post.

Thanks!!!

View Replies !    View Related
Preload Random Images In Main Movie Every 10 Seconds After Load Complete
Hi there,
I am working on a flash web site and I have a half decent code for it but there are some bugs i cant figure out.
www.fadlighting.com/test
The following is the concept:
Load a random image from the folder on the server. Build preloader that showes size of image and percent remaining to load image. Wait 10 seconds and load new random image.

So far I was able to do so with the expert help of the Bible for Flash.
The following is the code i scrached together, This portion is at frame 1 of main time line
function loadFile() {

images = 13;
directory = "http://www.fadlighting.com/test/random/image_";
image = directory add Math.ceil(Math.random()*images) add ".jpg"
intro_holder.loadMovie(image);
var loadObj = intro_holder;

var initObject = {
_x: intro_holder._x +590 ,
_y: intro_holder._y +240 ,
target: loadObj,
loadExit: null
};

_root.attachMovie("loader","loader",2, initObject);
updateAfterEvent();
setInterval(loadFile, 10000);


}

loadFile();
// setInterval(loadFile, 10000);

// intro_holder.unloadMovie();
// updateAfterEvent();

the following code is in a Movie Clip called intro_holder in the library on frame 1 of its timeline
function checkLoad(obj) {
var lBytes = target.getBytesLoaded();
var tBytes = target.getBytesTotal();
var percentLoaded = Math.floor((lBytes/tBytes)*100);
bar._xscale = percentLoaded;
percent.text = Math.floor(percentLoaded)+"% of "+Math.floor(tBytes/1024)+"KB loaded.";
if (lBytes>=tBytes && tBytes>0) {
if (count>=12) {
clearInterval(checkProgress);
_parent[loadExit]();
obj.removeMovieClip();
} else {
count++;
}
}
updateAfterEvent();
}
checkProgress = setInterval(checkLoad, 100, this);
stop();

the code works but it does not wait for the image to be loaded before starting countdown for 10 seconds... and in between loads something is off... uhmmmm I can email fla if interested to long to post.

Thanks!!!

__________________
Anthony Palermo
aderium@bellsouth.net
http://www.aderium.com

View Replies !    View Related
HOW TO PRELOAD MY MAIN SWF (not External Files But My Main)
I've done a main.swf that i use as a big container for my website, in this main.swf i used the document class, where i import all the classes that i need for my interface and i load all the sections from externals .swf, preload this sections is not a problem, but i have this problem: how can i preload my main.swf if i have to put the code for the preloading into the document class, that is not working till its loading is not complete!?!?!? i mean it is like to say to the same object that i'm loading to check the loading of itself, the methods aren't be instanced, so.. looks not possibile to me.. wich way to follow?

View Replies !    View Related
Loading A Movie From A Movie On Main Timeline, To A Specific Frame On Main Time Line
I need help loading a movie from a button in a movie on the main timeline. To a specific frame on the main timeline.
i.e. I have a navigation movie, in it is a load of buttons. I want to load separate movies to a blank movie on a specific frame on the main timeline.
I guess I am having target problems, I can load the movie in the main timeline, but not the frame i want it or the the blank movie in that frame.

View Replies !    View Related
How To Preload An External Swf In Main Swf
Hi I am a beginner as you can understand from my question

The question is:

InI have a "main. swf"; buttons will call the external swf's that they are linked to. Simply Home button calls the "home.swf" inside the "main.swf":

loadMovie("home.swf", _root.pageshere);

How can I write a preloading script to check whether "home.swf" is still loaded or not. I want to use one same preloading animation (which runs in the "main.swf") to the external files.

That's my problem. I will be happy with any help.

View Replies !    View Related
How To Preload An External Swf In Main.swf
Hi I am a beginner as you can understand from my question

The question is:

InI have a "main. swf"; buttons will call the external swf's that they are linked to. Simply Home button calls the "home.swf" inside the "main.swf":

loadMovie("home.swf", _root.pageshere);

How can I write a preloading script to check whether "home.swf" is still loaded or not. I want to use one same preloading animation (which runs in the "main.swf") to the external files.

That's my problem. I will be happy with any help.

View Replies !    View Related
How To Preload An External Swf In Main.swf
Hi I am a beginner as you can understand from my question

The question is:

InI have a "main. swf"; buttons will call the external swf's that they are linked to. Simply Home button calls the "home.swf" inside the "main.swf":

loadMovie("home.swf", _root.pageshere);

How can I write a preloading script to check whether "home.swf" is still loaded or not. I want to use one same preloading animation (which runs in the "main.swf") to the external files.

That's my problem. I will be happy with any help.

View Replies !    View Related
How Do I Preload The Main Timeline Of My FLA?
the title pretty much summed it up....I want to preload the main timeline.
Do I use "root" or what?

plz provide a working example...thx in adv.!

View Replies !    View Related
[FLAMX2004] PRELOAD IN MAIN SWF
FOR A LONGE TIME I SEE IN THIS FORUM SAMPLES AND TUTORIALS ABOUT LOADMOVIE IN MAIN FLASH BUT I DONT DO LIKE SAMPLES.

PLEASE! I TRY IN KIRUPA.com TUTORIALS AND FORUM EXPLANE BUT I'M NOOB MAN!

please help me!
i need create a main flash w/ 5 swf files that load inner main
please

View Replies !    View Related
Preload External Swf's Into One Main Swf
Forgive me for asking what will probably be a very simple question but I have a nasty headache and I am tired of searching the web for the answer.

Basically I used a tutorial from here to add a preloader to my site. The preloader works for my main swf file, but it does not load the external swf files that I call during the movie playback.

Here is the code I used:

FRAME 1

----------------------------------------------------

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)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(3);

-----------------------------------------------------

FRAME 2

-----------------------------------------------------

gotoAndPlay(1);

-----------------------------------------------------

Because everything already works and is very simple and easy, I was hoping there were a couple of lines I could add to the existing script that would allow me to load external movies as part of the overall loading process.

I have searched and put forth an effort to figure this out but I would really appreciate an experts help at this time.

Thank you

View Replies !    View Related
[FLAMX2004] PRELOAD IN MAIN SWF
FOR A LONGE TIME I SEE IN THIS FORUM SAMPLES AND TUTORIALS ABOUT LOADMOVIE IN MAIN FLASH BUT I DONT DO LIKE SAMPLES.

PLEASE! I TRY IN KIRUPA.com TUTORIALS AND FORUM EXPLANE BUT I'M NOOB MAN!

please help me!
i need create a main flash w/ 5 swf files that load inner main
please

View Replies !    View Related
Preload Thumbs - Then Main Image
i've spent 2 days squinting at every preloader example on this site and haven't really found what i'm looking for.

i'm not sure i really understand the relationship between the timeline , the preloader actionscript and the actionscript in the main movie.

i've got a photogallery (gasp!! shock!!) that i'm populating with external .jpgs from an XML file (gasp again! how rare!)

i simply want a preload bar to visible as the thumbnails load. then, once loaded - a preload bar should appear when i click on the thumbnail that loads the main image.

my .fla file is currently only 1 frame so if the solution is multi frame - please let me know what i should put where etc.. i'm a pretty quick study i'm just having trouble relating all these preloaders to my project.

here's my code so far:


PHP Code:




myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.load("tot_lot.xml");
myPhoto.onLoad = function(success) {
    this.firstChild;
    numimages = this.firstChild.childNodes.length;
    spacing = 100;
    _global.thumbs_width = numimages * spacing;
    for (i=0; i<numimages; i++) {
            picHolder = this.firstChild.childNodes[i];
            thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
            thumbHolder._x = i*spacing;
            thumbLoader = thumbholder.createEmptyMovieClip("thumbnail_image"+i, 0);
        setProperty(thumbHolder,_alpha, 70);
        thumbLoader.loadMovie(picHolder.attributes.thmb);
        thumbHolder.title = picHolder.attributes.title;
        thumbHolder.main = picHolder.attributes.main;
            //setting rollover state for thumbs
        thumbHolder.onRollover = function() {
            this._alpha=100;
            };
        thumbHolder.onRollOut = function() {
            this._alpha=70;
            };
        //end rollover
                //set click on thumb action
        thumbHolder.onRelease = function() {
            loader.loadMovie(this.main);
            title_txt.text = this.title;
            };
    }
};







there maybe some extraneous code in there that doesn't actually do antything from my previous attempts at various things. i'll clean it up later!

i've also got some code that handles the scrolling navigation of the thumbnail bar but i left that out because it's not really relevant to the current situation.

i would be most grateful if someone could take the time to walk me through the basic steps (and most importantly - concepts!) to getting these 2 preloaders integrated into this project.

thank you thank you thank you.

dijon

View Replies !    View Related
Flash 9 - How To Preload The Main Timeline
Hi all,
I would like to know how to prealod the main timeline with or without the document class. Any idea?. I know i've to use loaderInfo but don't know where and how.Thanks.

View Replies !    View Related
Flash 9 - How To Preload The Main Timeline
Hi all,
I would like to know how to prealod the main timeline with or without the document class. Any idea?. I know i've to use loaderInfo but don't know where and how.Thanks.

View Replies !    View Related
Preload To Main Page Php...from Flash
Ello ...i just stuck up in the code below..hope someone can clear up for me...i just want to connect to php main page from flash let's say after the status show 100% loading i want to connectto php mainpage....is it possible?then i come up with this code below..but it's seem when it connect to page..it keep open new window...for same page..so how i gonna stop this..i just want connect the page once only....


ActionScript Code:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.getURL("www.blablabla.com/main.php", "_self");
}


any help would be great...

View Replies !    View Related
Login-> Preload-> Main Screen ?
Hey,

Im having trouble figuring out the best way to structure a flash application. Im not sure whether to have the login as a seperate .swf or to have the login and main screen on different frames. Also i want to preload the main screen but I would ideally like to have the login load right away. The main screen is filled with components and remoting methods and the login would also have a few components (text inputs, button) and use remoting (amfphp) as well. I want to be able to pass the resulting userid from the login to the main screen. OH and im using AS2 with most all the code in a seperate class.

Sorry that the question isn't structured better (I obviously have structuring issues), but basically im looking for some advice on how to set up flash remoting applications with a login.

Dan

View Replies !    View Related
[Preload] Main Mov + Level Swf's With % & KB Display
Last edited by ST. : 2003-10-01 at 11:52.
























HI!
I'am in panic.
I have MAIN movie, that have standart preloader script that shows % of loaded data.
The MAIN movie contains few LEVELS, where few movies are loaded.
The problem that when load MAIN movie, then it plays and others movies in LEVELS play with delay.

How to preload main movie + external files, and need to display actual % and KBs of loaded Movies+External movies.

View Replies !    View Related
[CS3] [AS2] Preload ALL External Content In Main Preloader...
Good afternoon, I hope everyone's having a good Sunday...

I've been struggling with this one for a while and despite intense Googling, haven't found anything but unanswered versions of the same question, so I thought I'd ask you guys...

I have a Flash project (CS3 & AS2) that was never intended to go on the net, but I now want to add to my personal portfolio online. It is one main movie that contains the navigation and a whole load of small SWF's that load into the levels above it using "loadMovieNum."

My problem is, is that it is crucial for all these external SWF's to be preloaded when you enter the site, in the main preloader of the main movie. This would mean they would all load instantly when called upon, instead of waiting for an individual preloader on each file.

I've tried combining all the SWF's into one file, which is implausible, and even bodging (with my limited AS skills) a preloader that loads all the movies in the first frame onto their various levels... which doesn't work.

I'm sure this must be a pretty common question and it seems like something that might be either really straight forward, or completely impossible, but any help anyone can offer would be greatly appreciated.

Take it easy,
Kristian

View Replies !    View Related
AS3 Monitor Progress Main Swf Loading (preload)
Never had any problem with loading and monitoring loading progress of external files.
Having some problems on monitoring progress of downloading of the main swf file...

------------------------------
In document class constructor:
I add listeners to loaderInfo of document class...

Code:
loaderInfo.addEventListener(Event.OPEN,openListener);
loaderInfo.addEventListener(ProgressEvent.PROGRESS,progressListener);
loaderInfo.addEventListener(Event.COMPLETE,completeListener);
and I create the object I'd like to use to visualize progression
(using a textfield now, but also tried dynamically drawn graphic bar)

Code:
loaderStatus = new TextField();
------------------------------

Code:
private function progressListener (e:ProgressEvent):void
{
trace("progress");

var percent:int = e.bytesLoaded / e.bytesTotal * 100;
loaderStatus.text = "Loading: " + percent + "%";
}

private function completeListener (e:Event):void
{
e.target.removeEventListener(ProgressEvent.PROGRESS, progressListener);
e.target.removeEventListener(Event.COMPLETE, completeListener);
trace("complete");
stage.removeChild(loaderStatus);
}
the progress and complete listeners give feedback through tracing.

the open listeners doesn't give feedback...
that's why I've moved the creation of the 'progression visualizer'
(whatever it is) inside the constructor of the document class...



I don't get it...
why we have a loaderInfo property accessible in root/document class
if it's useless to track the downloading of the main file


I've tried to search this and other forums
but I've find only info about preloaders in AS2, preloaders for external content
essential actionscript 3.0 from colin moock
has info about making a preloader in flash authoring environment
but it's using frame scripts...

shouldn't be possible to manage all the preloader stuff for the main clip
directly from the document class?
I know that I'm new to all this AS3 world but...

hope someone will read this
have a medium-size project and all my initial assets and class
have a dimension of approximately 300K so I absolutely need
a preloader for the main file


Any hints, suggestions, pointers are really appreciated
Thanks
Jo

View Replies !    View Related
[CS3] [AS2] Preload ALL External Content In Main Preloader...
Good afternoon, I hope everyone's having a good Monday...

I've been struggling with this one for a while and despite intense Googling, haven't found anything but unanswered versions of the same question, so I thought I'd ask you guys...

I have a Flash project (CS3 & AS2) that was never intended to go on the net, but I now want to add to my personal portfolio online. It is one main movie that contains the navigation and a whole load of small SWF's that load into the levels above it using "loadMovieNum."

My problem is, is that it is crucial for all these external SWF's to be preloaded when you enter the site, in the main preloader of the main movie. This would mean they would all load instantly when called upon, instead of waiting for an individual preloader on each file.

I've tried combining all the SWF's into one file, which is implausible, and even bodging (with my limited AS skills) a preloader that loads all the movies in the first frame onto their various levels... which doesn't work.

I'm sure this must be a pretty common question and it seems like something that might be either really straight forward, or completely impossible, but any help anyone can offer would be greatly appreciated.

Take it easy,
Kristian

View Replies !    View Related
Loading Movie Into Main Timeline From Movie Clip Within Main Movie
Hi there,

I'm having major difficulties loading external SWF's into my main movie. The button actions are in a movie clip within the main movie. I've used the following AS to load in my external SWF files on higher levels:-

mybutton_bn.onRelease {
loadMovieNum("two.swf",1);
unloadMovieNum(2);
unloadMovieNum(3);
unloadMovieNum(4);
unloadMovieNum(5);
}

Similarly, my external text files are not loading!

myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
my_txt.htmlText = myLoadVars.myHTMLdata;
}
myLoadVars.load("textfile.txt");


All works fine until I upload to the server. It's really driving my around the bend. Any suggestions will be gratefully received.

Many thanks

Q.

View Replies !    View Related
Can I Preload A External .swf File From The Main Navigation Page.
I need to know if I can have a preloader that works from the main navigation page that will load a external .swf that is not in the the main.swf movie. Please Help!

Detailed:
I am working on a site that the navigation page is its own movie or .fla, and the scenes that the buttons call are in there own .fla (there are 9 scenes). So when I export the navigation movie it becomes index.swf, and the scenes .fla is exported (sense there are nine scenes they are export in there own swf. so I have index_one.swf (which index_one.swf is scene1 and so on).
Now when i click on the button that calls the index_one.swf from the navigation page it sits there and the user does not now if the page is not working or its loading. so can I add any type of script to the main navigation page that would let me preload the index_one.swf. I would like it to show loading on the main navigation page and when it has completed it would go, to the new .swf file.

Thanks Jason

[Edited by motiongraphics on 07-19-2001 at 10:15 AM]

View Replies !    View Related
Control Main Timeline With Movie Clip In Main Movie,,
I could really need your help on this.

http://www.flashkit.com/board/showth...hreadid=465355

View Replies !    View Related
Preload Madness - Preload Movies Clip In A Movie?
hey people... a brought up this subject here a while back but it didn't really go anywhere... now that this sections seems to be a bit more lively perhaps some of you flashers can help me out... I am going to break this down very simple... I haven’t even storyboarded this so this is an extremely rough draft of the idea



I am building a photo gallery



this gallery has eight images which range from 30k-75k (roughly) so I don't want the user to wait for a full load of 240k-600k



I want to first load the thumbnails for the images... and then begin to preload the first image directly after that... then display it



and then from that point when the user clicks a thumbnail the corresponding full image will preload and then display


basicially this is about preloading a movieclip in a movie... I jsut can't wrap my head this... so I will ask for help before I get too deep.... any input on the basics of this idea would be appreciated

thanx!

View Replies !    View Related
Preload Multiple Swf's Into A "dummy Target" In Main Swf
Hi. Greetings from a Flash newbie

I use Flash 4. My website has a main swf and several external swf's. I want to finish preloading all the swf's before starting the main swf. I also want it so that when specific buttons (within main swf) are pressed and corresponding external swf's are called, these external swf's are already 100% preloaded. But the problem is I don't load these ext. swf's into levels, I load them into a dummy target in the main swf. REason I do this: http://www.flashkit.com/tutorials/Op...0/index.shtml. Eddie Carroll said the ext. swf's will remain in the browser's cache if I use targets instead of levels, and hence faster.

I found a good solution to this @ http://www.were-here.com/forum/tutor...oad/index.html
But the problem is this tutorial teaches us to load swf's to diff. levels, not a dummy target. I can't preload all the ext. swf's into the dummy target, right? Cuz the dummy can only store one swf! But then I don't want to have several dummy targets, cuz when a 2nd ext. swf is called I want it to overwrite the 1st one, which is already in "dummy".....

Please help!!!! Thanks in advance!!!!!

View Replies !    View Related
How Do I Jump From A Movie Inside A Movie Back Out To The Main Movie?
Im using MX Pro, i have a flash movie (Movie1) that has a button. I coverted the button to a movie symbol(movie2). i double click that movie symbol(movie2) and it opens into its own smaller movie. i am trying to write the actionscript for a button in the smaller movie (movie2) to take me to scene 2 of the Movie1. PLEASE HELP !!

View Replies !    View Related
How To Preload Movie Which Is Loading Through The Load Movie Action?
I want to preload main movie and the movie, which is loaded later through the load movie action, with the same preloader. The movie which is loading through the load movie action is level 1.
What changes must I aply to the code of the preloader, to do this task right? Here the code of the preloader:

btload = _root.getBytesLoaded();
totbt = _root.getBytesTotal();
sclbar = btload*100/totbt;
sclbar = Math.round(sclbar);
setProperty (_root.orangebar, _xscale, sclbar);
barwid = getProperty(_root.orangebar, _width)
barwid = barwid + getProperty(_root.orangebar, _x)
setProperty (_root.ldper, _x, barwid);
//setProperty (this.ldbar, _xscale, sclbar);
//trace (sclbar);
// trace(bytloaded);
if (btload>=totbt) {
gotoAndPlay ("slide panel", 1);
// trace ("loading complete");
} else {
gotoAndPlay (1);
}


Hope you help!!!

View Replies !    View Related
Why Do The Main Movie/site Close When I Load External Movie In A New Window?
When i want to load an external movie in a NEW window...why do my main site window close?????

this is how i load a movie in a new window...???
what is wront
_____________________________________________
on(release) {
loadMovie("mymovie.swf", _blank);
}
_____________________________________________

this happens when i test the movie

Thanks
Mirrorman

View Replies !    View Related
How To Break A Huge Flash Movie Into Smallers And Call One Another From A Main Movie?
Heeelllllpppppp…

My Flash file is huge. It is beyond 16,000 frames, the Flash size limit, as I was told. Therefore, it is not working ---my long narrations stop working. I have four scenes, so I came with a plan B to save my efforts on trying this file to work. I can break my Flash in 4 smaller files and then, call one from another. Is that possible?
How I do that? I will have a main file from with I will call the others. From a secondary file, can I come back to the main movie?
I looked at my action script book, but could not find a specific (or direct) statement about it.)
Thanks, thanks,

Patricia

View Replies !    View Related
Control The Play On The Main Timeline From Within A Loaded Movie (not A Movie Clip)?
Question... I have a movie (main movie) that loads another movie (movie 2) automatically. Movie 2 contains a button that loads yet another movie (movie3). Now I’m having trouble with this next part... When movie3 loads I want "main movie" to stop where it’s at in the timeline and stop all other loaded movies until the user clicks another button where upon movie 3 will go away and "main movie" will resume. Movie 2 is like the paper clip guy in Word and movie 3 is my help movie. Therefore, it can be accessed at any point during the main movie and I don’t want to use a goTo command to jump to a frame label or scene. Does anyone have any idea how to control the play on the main timeline from within a loaded movie (not a movie clip)?

View Replies !    View Related
How To Load A Movie In Main Scene While The Command Is Inside A Movie Clip?
Hi all,

Well, I have a scene that has a movie clip, and inside this movie clip there is a button. I want to program that button using ActionScript to loadMovie named "1.swf" inside a container in the main scene (which this movie clip belongs to).

Hope the question is clear and hope to get a fast answer as it is urgent..

Thanks alot in advance.


Regards

View Replies !    View Related
Controlling The Main Time Line Of A Movie Via A Button Within A Movie On A Different Level.
Hi there!
I have two movie is two different levels,
Level 5 is my base movie and I am loading another movie on top of this into level 10.
Once the user clicks onto a button within the movie on level 10, I would like the animation in level 5 to stop (the animation runs on the main root timeline of level 5).

Once the user clicks on a different button within the movie on level 10, I would like the animation on the main timeline of the movie in level 5 to start again from the point where it previously left off.
Is this possible?

It would be great if someone could help me out with this.
Thanks, midi_ie

View Replies !    View Related
Loading A Movie From A Remote Location And Reloading The Main Movie
HELP!!! I have a flash movie that loads a movie (at level0) from a remote location.. There are two movies there, one that stops the movie and another that reloads the main flash movie (I just rename the swf's to toggle which one I want loaded). The problem is, when the second remote swf reloads the main flash swf, it just loops back to playing the remote swf again. I've tried using telltarget to make the main movie play a frame after the actionscript that loads the remote swf, but that doesn't work either. Are there any alternatives to doing this? thanks...

View Replies !    View Related
Making Loaded Movie Navigation Work On Main Movie
how do i make a movie(navigation with buttons) that has been loaded into one movie(main movie) control aspects of that movie through button actions.

for example: nav movie button making main movie go to a particular scene and load a movie in it.

View Replies !    View Related
Scrollpane With Movie Needed To Play Frame In MAIN Movie
OK.. still pretty new.

I have a movie in a scrollpane with a button. It needs to tell the main movie/timeline to go to a frame.

How do i do that?

View Replies !    View Related
How To Get A Button Inside Of A Movie Clip Play The MAIN Movie
how to get a button inside of a movie clip play the MAIN movie

( reposted, bad grammer in 1st one)


I got a button, inside of a movie clip.....
How do I get the button to have the MAIN movie play on click, not the MOVIE clip

View Replies !    View Related
Breaking My Movie Into Different Movies That Load Into My Main Movie Using Levels?
how do i break my movie into different movies that load into my main movie using levels? I have this 4 meg .swf introduction at www.geocities.com/reshamrd , it takes forever to load, I have to think of a way to decrease the size.

Thanks,
baljinder

View Replies !    View Related
Stop Movie Clip But Keep Onstage As Main Movie Continues
I have a movie clip of a rotating wheel. In the main movie, a blackboard is being wheeled midstage from the right edge of the movie. I have the graphic symbol of the blackboard onstage with two wheel movie clip symbols. I created a motion tween from the right position to the middle position. Everything works great, but...how do I make the wheels stop rotating once the position of the blackboard is where I want it?

View Replies !    View Related
Center A Movie Contained In A Scrolled Movie On The Main Stage ?
please help, i am a designer not a programmer and yet sometimes i manage to addapt scripts to my needs but this time im really blocked.... in the main scene i have a script making a movie scroll from left to right upon mouse movement, the one I found in flashkit/tutorials called non button scroller... the movie scrolling is composed of several empty target movies in which separate swf are loaded... what i try to do is, while scrolling the entire movie from left to right as a menu, you click on a swf and it grows bigger and centers on the stage... so i made an invisible button over each movie and i added action script with function and 2 variables - the 1st to make it scale on _x and _y and position on _y, and with the second i try to tell it to center on _x , if when clicked it is on the left of the stage center it must go right and stop at the very center, or if it is on the right it must go left etc... the problem is it considers the _x values of the swf movie and not of the main stage and as the the entire menu is being scrolled left and right it never centers and sometimes disappears from the scene... can anybody tell me how to give it the main stage _x values? thanx !

View Replies !    View Related
Addressing The Main Movie Timeline From A Movie Loaded Via LoadMovie.
I have a clip on the main time line of a host movie that I would like to make visible when the second frame of the swf to be loaded, containing an embedded video movie clip loads.

I have this code on the video clip in the movie to be loaded:

code: onClipEvent (load) {
_root.witch_mc._visible=true;

}

Which I had hoped would have addressed the main timeline of the host movie where the targeted clip was – but no joy.

Any help please?

View Replies !    View Related
Calling Functions In Main Movie From An External Loaded Movie?
Hey everyone

I have a preloader function in my main movie, that I would like to be able to use in the different SWF's that I load into new levels using loadMovie....

How do I refer to this? Can anyone take a little time to explain how..

- Rune

View Replies !    View Related
[F8] Movie Clip Actions Inside Main Movie Not Working
I know this HAS to have been answered somewhere here before... I've been doing Flash on and off since it's creation, but it's been a while since I used it. I have Flash8 running on this dev machine and I am adding a little accordion to an old project. I have tried calling the accordion swf from the main movie and loading it in, but this is not working for me.

So, I tried copying all of the frames form the external SWF accordion (it's small), along with it's actionscript to a MC inside the main movie and placed that MC on the timeline in the main file. The MC shows up fine, but the action associated with it is not functioning.... basically I want the text button to pop up the accordion MC and allow interaction by the user to click through the slides within it.

A little definition:
KSB_MC = the container MC on the main timeline that displays the first frame of the MC which is: KSBbutton_MC
KSBbutton_MC = the text MC visible from the main timeline that should launch the KSBanimation_MC (which is the accordion)

This is the AS I have so far that is in the MC I placed on the main timeline:

//first we stop both animations inside KSB_MC from running

KSB_MC.KSBbutton_MC.stop();
KSB_MC.KSBanimation_MC.stop();

//then we make conditional, the button action so that if the button_MC is pressed, the button goes to frame 2 and the animation_MC plays or else stop both animations

KSB_MC.KSBbutton_MC.onPress = function(){
if(KSB_MC.KSBbutton_MC._currentFrame ==1){
this.gotoAndStop(2);
KSB_MC.KSBanimation_MC.play();
}
else{
this.gotoAndStop(1);
KSB_MC.KSBanimation_MC.stop();
}
}



.......first of all, the KSBbutton_MC on hover shows a finger cursor as it should, but does not activate when pressed. Nothing happens after that. I get no errors in the AS checker....
my problem is with layering or something st00pyd. Feelin kinda n00bysh.

Help a brothah out will ya guys?

View Replies !    View Related
Load External Movie Immediatly After Main Movie Loads
I apologize if this is the dumbest question in the world becasue it seems it would be. I know how to load an external movie when you click a button but how do you get it to load immediatly after the main movie finishes loading? I can't figure it out. Is this possible with actionscript 1.0? Thank you.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved