Preload External Multiple SWF Files
hello-
this is how im trying to preload external swf files:
Code: var Count = 5; for (var i = 1; i<Count; i++) { var fileLoad= this.createEmptyMovieClip("fileLoad"+i, this.getNextHighestDepth()); fileLoad.loadMovie("swf/page"+i+".swf");
} i am loading first four swf files from swf directory (page1.swf, page2.swf, page3.swf, page4.swf) - However, I WOULD LIKE THEM TO BE INVISIBLE WHEN THEY ARE PRELOADED TO THE STAGE.. how should i do that.. "fileLoad._visible = false;" does not work- please help!!!!!!!!!!!
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-14-2009, 09:00 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Preload Multiple External Files Beforehand...
Hi all,
I'm an advanced actionscript, to begin. So feel free to answer in as technical a way as possible. This is merely a situation I've yet to work with.
I haven't begun this phase of the project I'm working on, so there's still time for me to figure this out. Still, I figure I'll ask now just in case.
I'm developing a flash web site. I'd ideally like to load about 15 SWF files of varying file size (no more than 20kb at worst) BEFORE the site actually launches...but only one will be viewable at a time.
My experience shows that once a SWF is replaced in a movieclip via loadMovie, it has to completely redownload in order to work. Or does it cache and I'm just mistaken?
Shared Objects MAY be the answer, though I've yet to work with them. Can I only store text variables with them, or do I have the option of storing SWF files if I choose?
Or do you think just creating everything within movieclips in the one FLA file is the solution? This is not ideal, as I'm often moving to different computers at different locations and like the versitility of multiple SWFs.
Thanks in advance.
Preload Multiple Files
How would I go about preloading multiple files all at once with one progress bar?
Thanks.
Preload Multiple Files
Hello -
I suck at actionscripting and I am trying to learn it. Within the site I have my main file which has the opening animation as well as the home animation in it because I didn't want a pause while the home preloads. So when you click home it reloads again and is different which means you have to update both main and home for homepage content.
Is there a way I can preload the main page, and preload the home as well so I can eliminate having to make two pages with the same stuff? Here is the site
http://www.thedesigncompound.com/ikon
Thanks...
Preload Multiple XML Files
Hello all,
Can anyone point me to a bit of code that Preloads mulltiple XML files?
Thanks in advanced!!
Regards,
jc_
How Do I Preload Multiple XML Files?
Hi there
I want to preload multiple XML files using the XML.load method.
I know how to do this for one XML file, but I'm interested in preloading multiple XML files (My data + config settings).
How would one do this?
I thought of 2 ways, but I don't think they're very nice programming:
1. Preload the first XML and do another XML.load within the XML.onload. But that way, you get a lot of nested functions if you want to preload more than 2 files.
2. Preload both the XML files at the same time, and use a counter to check if all the XML.onload are executed.
Are there other ways?
Preload Multiple XML Files
Hello all,
Can anyone point me to a bit of code that Preloads mulltiple XML files?
Thanks in advanced!!
Regards,
jc_
Preload And Cache Multiple Swf Files.
I have one main movie and as you click on seperate buttons on the menu the new movies load on top of each other in different levels. I want to load all these swf files and cache them in advance so that the viewer does not have to wait long for each one to load once the button is clicked. I am loading them into various levels, while the earlier ones r still open below.
Example:- I click button 1 and 1.swf is seen over the main movie. The menu resides on the main movie which is always open in the background. Now if I click button 2, then 2.swf opens on 1.swf and 1.swf is behind 2.swf until 2.swf completely opens up and once 2.swf is completely open and 1.swf is not visible only then 1.swf is unloaded. So I cannot load 2.swf into the same target as
1.swf , because both need to be open at the same time.
So how can I load 6 swf files with one preloader and keep opening them according to the one that is called.
Please Help
Multiple Files Preload Progress?
Hi! I was wandering: how can I monitor the overall preload progress of a bunch of files preloading at once? I took a look to these 2 great classes:
http://code.google.com/p/bulk-loader/
http://code.google.com/p/queueloader-as3/
But I wasn't able to figure out how they can monitor the overall progress. I think you first should at least know the total weight of each file to load, but how could you retrieve it before starting to load it?
Anyone has any idea about the basic method of doing it?
Preload Multiple Files Simultaneously?
Hi! I'm having a problem preloading multiple .swf files simultaneously... I have a class that extends movieClip and I'm trying to use the movieClip loader class to preload content. The problem is that it only preloads the files in the last object. I guess the listener overwrites when new objects are created. How can I get by this problem?
An example of how I want this to work is at:
http://www.lexus-is.ru/
Can anyone please give me some advise or at least point me in the right direction?
Thanks in advance!
How To Preload Multiple Files At Once Using The Loader Class?
I have to load external files, and include a preloader. Usually it's simple:
ActionScript Code:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadprogress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadcomplete);
function loadprogress(event:ProgressEvent) {
var ratio = event.bytesLoaded/event.bytesTotal;
loadbar.width = ratio;
}
function loadcomplete(event:Event) {
trace("loading complete!");
}
loader.load(new URLRequest("http://blahblah..."));
But that's just for one file. Now I have to load several different files at once. The loading bar has to account for ALL of the files, which means the overall ratio should be [sum of bytes loaded]/[sum of bytes total].
The most convient way to start would be for me to put all their URLs into an array. But what do I do from there?
Preload Multiple Swf Files At The Broswer Cache...
hi guys. i cant resist but to post a new thread regarding preloading multiple swf while the main mvoie is playing. i have researched about this and found some helpful tips from websites but to no avail thus im giving you the link to my site and hoping that you could help me fix my problem
http://www.theanimeister.com/PRIME
the multiple swfs that im talking about can be found when you click the portfolio icon at the main menu where each artworks are thumbnailed and when u click on each, it loads the external swf file.
i was wondering if i can have all those external swfs to preload beforehand so when the user reaches that spot, the external swfs are ready to be loaded. i was thinking if they canbe preloaded while my long videos are playing perhaps?
i really need you guys help
peace and thanks
lui
[CS3] Preload Multiple Internal Movie Clips/files
Hello,
I'm relatively new to Actionscripting and have hit a wall - I'm making an overlay for myspace with a television which will have different channels(movie clips) which are changed by a remote control
http://www.doorshutpanik.com/test (you need to mouse over the remote on the floor to use the remote)
Only channels 1 & 2 have any content at present. Basically I need to have a preloader for each channel rather than the whole file and with it being myspace I can't load external .swf's as the channels.
Is this possible, everything i've come across either involves preloading the entire file or loading external files.
Any help/comments are much appreciated.
Preload Multiple External Swf
ive gone through almost every thread on this forum trying to find the answer to this but nobody has an answer that works. im trying to create a preloader to my site that loads external swfs that appear later in the site (like cached into the browser), the problem im having has to do with the particular type of preloader im using, it is found on flash kit tutorials
http://www.flashkit.com/tutorials/In...-855/index.php
i would like to somehow load the external swfs and monitor the bytesloaded and bytestotal, and upon completion not display them, i believe its possible, but nothing i try seems to work, the files are included if youd like to take a look,
thanks in advance for your help
Preload Multiple External Swf
ive posted this once before, but the help i got did not work. heres what im trying to do: i want a main preloader that loads other swfs within itself, but doesnt show them, all i want to do is preload them and have them cached into the browser. ive used all types of methods to get this to work (loadmovie, loadmovienum, getbytesloaded, etc..) but no matter what code i use, the main preloader will not track the total bytes nor the loaded bytes of the external files. ive tried levels ive tried container clips and every variety of getbytesloaded command i can think of. i have no idea what is wrong, im still rather new at this so im probably omitting some small detail thats screwin me up. do i need a preloader on the external files themselves? is this possible? ive read through this forum and many others but nothing ive tried or downloaded works. heres one example of what ive tried:
Actions Frame 1 of main preloader
loadMovie("opening.swf", "container");
actions frame 2 of main preloader
totalbytes= container.getBytesTotal();
loadedbytes= container.getBytesLoaded();
if (loadedbytes == totalbytes) {
container.gotoAndPlay(1)}
and then the gotoandplay 2 frame later on in the timeline, this is just the foundation of what im trying to od, but it still loads immediately in testmovie (even with streaming) and doesnt load or cache anything when uploaded to the web. if anybody has a simple to understand layout of how something like this would work and if my externals need any altering , id really appreciate it.
thanks
PreLoad Multiple External Images
Hi guys.
newbie here hehe.
I stuck a reply to a thread further down but thought maybe posting a thread maybe a better way to go. Anyways...
I was wondering, say you had an xml file of images to load, you loop though those and load them into several instances of the "holder" movie clip. How would you use the method shown in the External SWF Preload tutorial to actually loop through several images at once and pre load each.
Say for example you had 5 external images in a row and you wanted to pre load those images at the same time.
This is the project I’m working on which would need such a solution to pre-load each member picture Smile
http://www.team-dignitas.org/flash_test ... test2.html
Or should I even bother? :P
Thanks
Chris
krak3n
How To Preload External .swf Files?
I've looked through numerous tutorials and newsgroup archives now but can't find anything that specifically answers my problem, or at least that I can understand well.
I have a percentage preloader which calculates percentage loaded, bytes loaded and has a loadbar etc. It uses 2 scenes, the 1st scene is the preload code and the 2nd scene is the content.
I have 2 movies, the 1st is an intro and the second is my main site. The intro is just one movie (eg intro.swf) that is replaced by the 2nd (eg homepage.swf) after it ends.
The preloader works fine for the intro.swf but not for the homepage.swf. The main difference between the 2 movies is that the main site is just a blank one frame movie that loads in all the other elements, such as navigation & visual elements etc, as separate swf files.
I used the following preload code:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 1) {
gotoAndPlay ("Scene 2", 1);
}
All that happens (when I test on the web)is that the preload bar flashes up for a second then a blank screen appears and the browser eventually crashes.
I'm not sure whether I need to add relative paths to each of the separate swf's that I'm trying to load in (there's about 8 in all). And if so how to do this.
Could someone tell me if this is what I need to do or if I'm missing something here.
Thanks for your patience.
Preload External Swf-files
Hi board!
I´m trying to preload external swf-files from my main movie, but I don´t know how to do it.
Can anybody help me, plase???
Preload External Swf Files
hello, i know, i know, the preload thing has been talk to death in just about any flash forum, but still, i just can not get this damb thing to work.
i'm trying to preload an external swf file on mouse klick into an empty movieclip. the loaded swf contaions noting but a sound lood and play once it has fully loaded. ive trying getBytesLoaded/Total, ive tried _framesloaded etc, ive tried ifFrameLoaded, but i just can not get monitor the load the movie clip.
PLEASE HELP, THIS THING IS KILLING ME................................................ .................................................. .................................................. .................................................. ..........
Preload External F4v Files?
n00b alert... I did search the forums, 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 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 and that was all I cared about.
ActionScript 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);
}
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!!
Preload External .flv Files
I have had the hardest time trying to get help with this!..
I have a number of .flv files that I need to play in succession.. I am using the mediaPlayback component in flash.
When Vid1 is done, I am using the mycomponent.setMedia command to call up and play Vid2, which works fine.. The flv's are not streaming, they are local to the main flash file so they play over http.
What I want to do is, when Vid1 is fully loaded and playing, I want to preload Vid2, when Vid2 is playing, preload Vid3 and so on.
Below is my script - the second paragraph is where I attempt to preload the next file. It is not working... Please help!
ActionScript Code:
// Check progress of currently playing .flv
var netDone:Boolean = false;
checkProgress = function (myVidObj) {
var mybytesLoaded = myVidObj.bytesLoaded;
var mybytesTotal = myVidObj.bytesTotal;
var mypercentLoaded = Math.floor(mybytesLoaded/mybytesTotal*100);
if (mybytesLoaded == mybytesTotal) {
netDone = true;
trace("netDone = "+netDone);
clearInterval(poll);
}
trace("mybytesLoaded = "+mybytesLoaded+", mybytesTotal = "+mybytesTotal);
trace("%"+mypercentLoaded+" loaded.");
};
var poll = setInterval(checkProgress, 1000, video_cpnt);
trace(poll);
// if currently playing file is loaded, preload next file
if (netDone) {
preLoader_mp.setMedia("VideoPieces/02.flv");
var poll = setInterval(checkProgress, 1000, preLoader_mp);
}
// if current file has reached end, point component to next one
var listenForEnd = new Object();
var mediaNum:Number = 2;
listenForEnd.complete = function(eventObject) {
if (mediaNum<10) {
video_cpnt.setMedia("VideoPieces/"+"0"+mediaNum+".flv");
} else {
video_cpnt.setMedia("VideoPieces/"+mediaNum+".flv");
}
video_cpnt.play();
mediaNum++;
trace("mediaNum = "+mediaNum);
};
video_cpnt.addEventListener("complete", listenForEnd);
Preload External .swf Files
I'm sure this has been addressed before, but I can't really figure out how to apply the tutorials to my case, what I need is very simple, I have a number of buttons that load external .swf files into an existing movie clip instance
like this:
on (rollOver) {
loadMovie("1.swf", "container");
container._x = 0 ;
container._y = 0 ;
}
and this:
on (release) {
loadMovie("1.1d.swf", "content1d");
content1d._x = 0 ;
content1d._y = 0 ;
}
I don't want to have to change those actions, I just want something very simple to preload all of those .swf files into the cache, at the beginning of the main movie, while a simple "loading" screen displays, progress would be nice but not essential.... and then once the movie starts all the external .swf files will be cached and the rollovers and clicks will produce instantaneous loading
this should be pretty simple, like just loading them all at once off the stage where they can't be seen, but I'm a beginner and don't really know how to go about it, and don't have so much time for trial and error
thanks in advance!
Preload External Files
Hi,
Can anyone give me a tip, in how to make a preload of an external loaded file?
I've got a movieclip that will load the external file, with the command:
container.loadmovie("nameofthefile.swf");
Since the file, is a little heavym i need to make a preload to make it run. The problem is, if I include a preload in the external file, the file when loaded will go to frame 1 of the main movie.
I still didn't catch a way to make this work. Anyone can give me a hand with this please?
All the best.
Preload External FileS To SWF
Hey everyone,
I'm trying to load up 5 swf files into the first frame so that it can be accessed without it trying to retrieve at a later time. Is that possible?
I ask because I made a swf file that loads swfs from a CD rom and would love to prevent the drive from being accessed over and over again and waiting for it to read/load.
Any comments are greatly appreciated!
Preload External JPG Files
Hi I sometimes see on some web sites a slideshow that has a preloader for each image so while your looking at 1 image it is preloading the next and when the preloader reaches 100% it flips to the next image, now I got this working with a Flash mx 2004 progress bar and loader components but when I nest my swf into another movie the preloaders dont work anymore, can someone please help?? I am also open to any other ideas on how I should do this slideshow.
Thanks
W i K
Preload External Files
Hi y´all!
I am trying to preload an external file containing my sound but it is not working.
Here is my code:
frame 5(after my main preloader)
loadMovie("sound.swf",1);
var loaded : Number = _level1.getBytesLoaded() / _level1.getTotalBytes();
bar._width = loaded * 100;
frame 6
if(_level1.getBytesLoaded == _level1.getTotalBytes()) {
gotoAndPlay(7);
}
else{
gotoAndPlay(5);}
what am I doing wrong?
How 2 Preload External SWF Files = ?
I think what I'm trying to is quite simple...however I'm going crazy in the process.
I have an external swf file that I want to load into my main scene through a loadMovie script. But when I click the link to activate the loadMovie action it seems to want to ignore my preloader at the beginning of my external swf and go straight to displaying the picture. So, then when i upload it to my server my site will be blank unitl my picture loads. can anyone help me?
I've searched long and hard for a tutorial on the web but came up short. If you know of one, please help.
Is There Anyway To Preload External Text Files?
I want to use the external text file method for displaying information because its sooper easy to update and implement. The only thing I dont like is the fact that they take a few seconds to load, so theres a ten second lag time after the user clicks before the text is viewable. Is there anyway to preload the text files as well as the movie itself? Any help would be appreciated.
Thanks
-MapexMitch
Is There A Way To Preload External Flash Files
I what to do a percentage preload on a external movie that will be loaded into the main I have tried putting a button on the main with this script on (release) {loadMovie("external_movie.swf","_level1"); it seem to work but the preloader is skipped and the image just shows up here is the script for the external file // Specify how many frames to load before playing.var loadAmount = _totalframes; // If the required number of frames have finished loading...if (_framesloaded == loadAmount) {// ...start the movie gotoAndPlay("beginMovie"); } else { // ...otherwise, display the load status // then go back and check load progress again. // First, determine the loaded and total kilobytes.loaded = Math.round(getBytesLoaded() / 1024);total = Math.round(getBytesTotal() / 1024); percent = Math.round((loaded/total) * 100); // Display the loaded kb, total kb, and percentage of // kb loaded in text fields.bytesLoadedOutput = loaded; bytesTotalOutput = total; percentOutput = percent + "%";
// Set the width of the loadBar to a percentage of // the loadBarHousing. loadBar._width = loadBarHousing._width * (percent / 100); // Now go back and check load progress.gotoAndPlay("loading");
[Edited by montara on 03-04-2002 at 03:16 AM]
Preload Indicator For External Swf Files
Question about preloading external SWF, jpg or any other file.
if I have a swf file that would load some external photos, like phot albums, is there a way to show a preloading screen to user until the external swf loads?
Preload External Files And Still Be Able To Auto Resize?
I have been reading all of the posts on both auto resizing a window for an image gallery as well as the threads on preloading external files...is there anyway to encorporate both?...
example: when I click a portfolio button, an MC slides out and multiple progress bars start to load external files. when they have loaded and you click on the buttons they will auto resize the images borders accordingly.
Anyone have any ideas?
Preload External Files And Still Be Able To Auto Resize?
I have been reading all of the posts on both auto resizing a window for an image gallery as well as the threads on preloading external files...is there anyway to encorporate both?...
example: when I click a portfolio button, an MC slides out and multiple progress bars start to load external files. when they have loaded and you click on the buttons they will auto resize the images borders accordingly.
Anyone have any ideas?
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);
}
Multiple External Text .txt Files In Different Swf Files
I'm trying to have several external files (txt or html) attached to a several swf flash files, loading in different levels of one main movie, for easy updating.
Example is: loadVariablesNum("ext-track.txt", 0);
This I can do, partly working.
Say you click the button for "about" that loads that flash file (in a layer), it fails to load in the relevant external file (the movie loads just not the external text file).
When you open up the "about.swf" on its own, it loads up the external file no problem. It just fails to do it when I am loading it from the main swf movie file that then loads this in a layer.
I can get all the text files working by putting in all the loadVariable parts in the main movie but I need them put into their relevant swf movies.
Does that make sense?
How do you correct, something to do with layers or targetting? I'm sure it'll be easy for you guys, Actionscript ain't my thing.
Thanks.
External Swf Preloader (multiple Files)
I need to create an action script that at the insertion of the CD-ROM im creating it loads all needed external swf files.
However, I do not want this to be evident to the user.
For instance. while distracted with other crap the CD-ROM is preloading:
a.swf to level 1 when finished it preloads
b.swf to level 2 and so on.
kind of an when load (a.swf) complete (play)
let me know if anybody understands this.
Multiple External Files Not Loading On First Try
I need some help, I have 2 swfs being loaded. One is the sound player with a music playlist. The second is the homepage with some text. Each swf loads two separate external text files through LoadVariables. When a user first hits the page, the playlist always loads. But the text for the homepage screen doesn't. If they refresh, both load fine. I'm assuming it's because the playlist is already cached, and now the homepage screen text can load ok.
Can we not load 2 LoadVariables external files to the same Parent timeline at the same time?
I've tried using onClipEvent(load) & onClipEvent(data), and I've tried using the new MX Load component. The behavior repeats under everything I've tried.
Please help!!!
Multiple External Files Not Loading On First Try
I need some help, I have 2 swfs being loaded. One is the sound player with a music playlist. The second is the homepage with some text. Each swf loads two separate external text files through LoadVariables. When a user first hits the page, the playlist always loads. But the text for the homepage screen doesn't. If they refresh, both load fine. I'm assuming it's because the playlist is already cached, and now the homepage screen text can load ok.
Can we not load 2 LoadVariables external files to the same Parent timeline at the same time?
I've tried using onClipEvent(load) & onClipEvent(data), and I've tried using the new MX Load component. The behavior repeats under everything I've tried.
Please help!!!
Loading Multiple External Txt Files
Here is the problem I'm having. I have a page that has multiple txt files loaded into a dynamic box. When I load a file, I can scroll down and read the entire thing. Problem is, when I load the next file, it doesn't load it at the top of the file but rather 1/2 way down. Is there any way to fix this? The example can be seen here:
http://www.thegoheens.com/flash/main.html
It is the "buyers" page. Links on the left, text on the right.
Thanks for the help.
Multiple External Video Files
Ok so here is my question. I would like to create a flash movie player that calls FLVs from an external location (mainly a streaming server), secondly I want it to be able to select from any of the videos (in no specific order).
For instance if I had:
Flash Movie 1
Flash Movie 2
Flash Movie 3
I would want to be able to lets say watch Flash Movie 1 and then Watch Flash Movie 3 and then Flash Movie 2, or whatever other orders there may be.
Thirdly I would like to be able to change the playlist (add/delete) videos from the web page without changing the Flash.
I understand that I may have to go into the Flash file and add one line of Actionscript to call on that file, but I want to try and not do that at all.
Does anyone have any idea how to do this or know of a link or a tutorial where I can find something of this nature.
So I guess I would need a little bit of a skin and be given the ability to to customize a bit.
Best Way To Load Multiple External Mp3 Files
I have several mp3 files I would like to load into an fla. What is the best way to do this with the least amount of code. Would I use the NetStream class and an Array? Using AS 3.0.
[CS3] Load Multiple External Swf Files
I built a loader with three buttons, each of which loads a different external swf. The code works, and all three buttons load the correct swf, but when I click the second button before the first swf is finished playing, the two movies overlap. If I click all three buttons in succession, all three swfs play, one over the other.
How do I code the buttons so they first stop the swf that is already playing, and then play the swf they are meant to load? Here is my code:
var imageRequest:URLRequest = new URLRequest("scene1.swf");
var imageLoader:Loader = new Loader();
welcomeBtn.addEventListener(MouseEvent.CLICK, loader);
function loader(event:MouseEvent){
imageLoader.load(imageRequest);
marker.addChild(imageLoader);
}
var imageRequest2:URLRequest = new URLRequest("scene2.swf");
var imageLoader2:Loader = new Loader();
designBtn.addEventListener(MouseEvent.CLICK, loader2);
function loader2(event:MouseEvent){
imageLoader2.load(imageRequest2);
marker.addChild(imageLoader2);
}
var imageRequest3:URLRequest = new URLRequest("scene3.swf");
var imageLoader3:Loader = new Loader();
sponsorBtn.addEventListener(MouseEvent.CLICK, loader3);
function loader3(event:MouseEvent){
imageLoader3.load(imageRequest3);
marker.addChild(imageLoader3);
}
Thanks!
Multiple Preloaders For External Files
I have designed this site with few external swf. I was wondering how can I preload all the externals swf's file in the same preloader of my first frame and scene. I have this code :
onClipEvent (load)
{
total = _root.getBytesTotal();
}
onClipEvent (enterFrame)
{
loaded = _root.getBytesLoaded();
percent = int(loaded / total * 100);
text = percent + "%";
gotoAndStop(percent);
if (loaded == total)
{
_root.gotoAndPlay(2);
} // end if
}
and I wanna have the name of the swf that is been loaded showing up on the text box with the bar of progress moving especifically for the progress of that external.
Thanks guys....
Loading Multiple External Files
I have a timeline where I have external swf files that play in sequence. I need to know how to preload a few of these files at a time so that there is no break between them.
Preloading Multiple External Swf Files
Hi Guys,
I'm working in Flash MX
I made a site completly in flash.
But to lower file size I made the each section a different swf file
when you click a link you will have to wait for that section to load, it would be good if peoples can see the loading progress while they r waiting.
And i hav added a preloader in each of the external swf file.. and then i realise that if i wanna change or modify the preloader, i will have to change all the preloader too.. this is really kicking axx..
is there a way where on the main page there is only 1 preloader needed to show all the external swf files loading progress? i am using an empty mc as container to load thoose external swf files..
hope you guys can give any ideals or show me some similiar tutorials,
Thanks
Print Multiple External Files
I am trying to find a way that I can print a range of jpgs that aren't currently loaded in my movie.
I have a list of thumbnails of photos (with correlating larger version residing externally)each with a number. I want the user to be able to specify a range they would like to print. I think I've gotten close by trying to create a new cast member and load the jpg into it for each one in the range. However my movie keeps hanging and not responding why I try that method.
Any help would be greatly appreciated.
Also, the movie is currently using AS2.
Navigation On Multiple External Swf Files.
Hello everyone,
I have a file (main.fla) which loads external movieclips on it,using an empty movieclip as loader (loader_mc).Now,I want to create a navigation,with two buttons (previous / next) which will allow me to navigate through the external movieclips.
So,I have created these two buttons.For the "next" button I am using this code,to load the first external swf file (example1.swf):
Code:
on (release) {
if(this._parent.loader == Number(this._parent.loader_mc)){
loadMovieNum("example1.swf",this._parent.loader_mc);
} else {
this._parent.loader_mc.loadMovie("example1.swf");
}
}
This is a simple code,taken from the behavior.
So,everything is fine till now.The first ext.swf loads correctly.
Now,what code do I need to use,in order to be able to load the second ext.swf file (example2.swf) when the "next" button is clicked?
Thanks in advance
Loading Multiple External .jpg Files
Hi All
I want to load multiple external jpg images in one frame.
This works for one image, i want to load at least 6 images.
_root.createEmptyMovieClip("container",1);
container.loadMovie("photo.jpg");
container._x = 50; container._y = 350 ;
I have created 6 layers and changed the x & Y fot each layer, still i only see the last one.
How to do this right ?
Thanks for any input.
Preloading Multiple External SWF Files
hello-
this is how im trying to preload external swf files:
Code:
var Count = 5;
for (var i = 1; i<Count; i++) {
var fileLoad= this.createEmptyMovieClip("fileLoad"+i, this.getNextHighestDepth());
fileLoad.loadMovie("swf/page"+i+".swf");
}
i am loading first four swf files from swf directory (page1.swf, page2.swf, page3.swf, page4.swf) - However, I WOULD LIKE THEM TO BE INVISIBLE WHEN THEY ARE PRELOADED TO THE STAGE.. how should i do that.. "fileLoad._visible = false;" does not work- please help!!!!!!!!!!!
|