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




Pre-Loading External .swfs



Hi...

As you can tell I'm new here, but I'm not that new to Flash. I'm using Flash MX for my Multimedia course end-of-year project in New Zealand, and none of my tutors have dealt with what I'm doing! I'm making an online visual role-play game (Demo version!) in Flash MX.

My Problem Is:
I have seperate .swfs I'd like to load in one main movie .swf.
Seems simple, and I've read the tute here (Transitional .swfs) but I need to be able to load the majority of .swfs before the movie even starts, in one big preloader at the begining.
Also, none of my RPG scenes have intro/outro sequences (Which would make file size huge!) so I'm not quite sure how to deal with that either.

If you know ~
*how to preload external swfs
*of someone who could help,
*or something similar I could see as an example,
Please don't hesitate to reply!


I'll do some tests and see what happens.
Posting more info later...

</Blue>



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 03-05-2004, 04:17 AM


View Complete Forum Thread with Replies

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

Loading External Swfs Into Externally Loaded Swfs.
ive got some buttons on my main timeline that im using to load external swfs into an empty mc. the buttons are coded with the following:

on(release){
if(_root.currMovie == undefined){
_root.currMovie = "1";
emptyMC1.loadMovie("1.swf);
} else if (_root.currMovie != "1") {
if (emptyMC1._currentframe >=
emptyMC1.midframe) {
_root.currMovie = "1";
emptyMC1.play();
}
}
}


1.swf also has some buttons that load external swfs into a second empty mc. those buttons are coded with the following:

on(release){
if(this.currMovie == undefined){
this.currMovie = "2";
emptyMC2.loadMovie("2.swf");
} else if (this.currMovie != "2") {
if (emptyMC2._currentframe >=
emptyMC2.midframe) {
this.currMovie = "2";
emptyMC2.play();
}
}
}


1.swf loads into emptyMC1 ok, and 2.swf loads into emptyMC2 ok.

when i press any of the buttons on the main timeline, the outro animation of 1.swf plays correctly, but the outro animation of 2.swf does not. is there a way to the buttons so that the emptyMC's unload sequentially?

Loading External Swfs
I have two questions

1) Is there a way to set the main movie at some other level, instead of it being at level_0 all the time?

2) How do i load an external swf into the main movie and have it positioned below the original level? Is that possible or we can only load swfs into layers that are above the original level (0)?

Thanks in Advance,

Shawn

Loading External Swfs
Hmmm.. can't work this one out:

In a game I'm putting together at the moment, I've got a clip called "action", into which I'm loading an external swf ("players.swf") of the player animations.

On the main stage of players.swf, is a clip called "player", which I want to be able to call from the main movie.

I've got it loading in ok, the only trouble is, I can't work out how to call "player" from the main movie, once I've loaded "action" in.

I would have thought that I could do stuff like "action.player.gotoAndPlay(2)" etc, but it's not working.
Any suggestions?

Cheers!

Loading External Swfs
i was wondering if it is possible to load the external swf files i'm using in the background so that when the links are clicked they are already loaded

thanks for the help

Loading External Swfs In A MC
how do i load an external swf into a movie clip? i just want to do it so that the external swfs, which are not too big, load up while the main movie plays. please help

Loading External Swfs
I've made a site design (on my PC) where I have a certain button load
a swf into to an existing MC (using : loadMovie("mySwf.swf", "_root.container"); ... now I know this code works on my pc, but when I test the site on a Mac it takes about 10 times longer to load the swf (plus it does it without showing the preloader).. and then my Mac starts to crash (I thought they were supposed not to, but hey).I haven't got any endless loops in it or anything. (and it can't be a speed problem because the Mac is much faster than the PC). So I'm lost...

Does anyone know what the problem is here, had any experience or experienced something alike?

I know it's a long question, but any help would be great. Thanks.

Loading External SWFs
when loading an external swf file into the main movie, does the ext. swf take on the properties of the main movie, such as the frame rate?

Because my main movie is 12 FPS and the ext. swf is 30 FPS. But when it is loaded, it runs at 12 FPS, instead of 30. When I run the swf by itself, it runs at 30 FPS.

Can anyone shed some light on this? thanks....

Loading External Swfs
can i load external swfs from other folders? i'm wanting to load a movie that doesn't reside in the same folder that my projector is in. i've tried this and it doesn't work:

loadMovie ("../folderName/file.swf",1);

why not?

Loading Various External .SWFs
My picture album is a scene with an action on each frame to load an external .swf (with preloader). It can be seen in action at http://www.tiptoeschool.com.br/tiptoe/tiptoebig.html under the PHOTO section.

Although I put a stop after each frame, whenever you open the photo section all the external .swfs (pictures) load, and not just the first one. Can anyone explain to me why this is happening.

Thanks for the help!
ghjr

Loading External Swfs Into Fla?
This is probably pretty simple, but can`t seem to find an explanation of how to do this...!

I`ve got an image heavy flash site, and basically need to load in other swfs (with preloaders) to reduce the size of the main swf.

How do you do this?! And once loaded how do you position the imported swf in your main fash file?

Any help or pointers / tutorials would be much much apprec.

Thanks people.

Hamburger.

Loading External SWFs With Different FPS
Hello all,

I'm trying to load an external SWF into a movie that has different FPS.

Example,

Movie 1 has 50 FPS
Movie 2 has 15 FPS

But when I load Movie 2 into Movie 1, Movie 2 plays at 50 FPS instead of 15 FPS.

The odd thing about this is that if I leave the audio encoded in Movie 2, it will play at 15 FPS within Movie 1. But if I take the audio out, Movie 2 plays at 50 FPS within Movie 1. And I want Movie 2 to play at its original 15 FPS instead of 50 FPS.

So I'm just wondering if this problem has anything to do with the audio stream.

Any ideas?

Thanks,
Nelson

Loading External Swfs
Hi

I am trying to figure out how to load multiple external
swfs into my main movie (main.swf)

I want my background image to always show, because it
is my template and holds the menu button.

I can pull movies in when I use a button

m1_btn.onpress = function() {
_root.container.loadMovie("mod1.swf");
(this code goes inside my menumc)

But my template goes away (my main movie background)
I don't think its getting covered up because my external movies
are smaller than the main.

And, I need to figure out how to loadmovies from the
main timeline into an emptymc. but they won't be called from a button and they need to load one after the other.

Anyone know how I can accomplish this?

Any help will be greatly appreciated
thanks

Loading External Swfs
Hello,

If I import a video clip and export it as it's own .swf, is it possible for me to load this swf from another swf? If so, how is this done and how do I control the position where it loads?


Cheers,
Mike

Loading In External Swfs?
hi im creating an application for a cd-rom

at the moment it consists of an exe and loads - 20+ external swf's

would it be better to integrate these external swfs into the exe so the cd rom does not have hundreds of files???

what are your thoughts?

loading external swfs is ideal for online but for cd it should be ok to bundle everything into the exe???

what are your thoughts?

Loading External SWFs
Hi everyone,

I was wondering how much flexibility you have when you load an external SWF. From my understanding, you use actionscript to tell your main SWF file to load an external SWF file at a given frame into a movie clip target, right? So, can you load that SWF below some of your layers? Do the dimensions of the external SWF have to match the dimensions of the target movie clip? I have a menu on my main SWF that overlaps some of the 'content' portion of the site where I'll be loading the external SWFs, and I'm basicaly wondering if external SWFs will behave basically like movie clips in the main SWF.

Thanks, and sorry if this was a trivial question.

About Loading Two External Swfs
Hi all!!

I have two external swfs - swf1 and swf2.

When I press BUTTON1 in the main movie, the swf1 loads inside the main movie, it plays and stops.

Now what I am trying to make is that, when i press BUTTON2 in the main movie, swf1 then completes its rest of the animation and then loads swf2.



Please help me . Thanks.





Kallol

Loading External Swfs, One After Another
This is hopefully a pretty straightforward question.

I am loading an external swf into a dynamically created movieclip. I would like to load another swf as soon as the first one has finished playing, but I don't know how to monitor the progress of the first clip.

Is there a way for ActionScript to determine when a movie clip has reached the end, so it can load another without having to put in a "continue" button, or anything like that?

Here is how I am loading the first movieclip:

code:
this.createEmptyMovieClip("animation_mc", this.getNextHighestDepth());
animation_mc._x=0;
animation_mc._y=124;
animation_mc.loadMovie("text/intro.swf");


Thanks for any help!!

Loading External Swfs
I'm trying to randomly load from a list of external swfs:

img1.swf
img2.swf
img3.swf
img4.swf

home_pic.swf is a blank swf with a one frame action:

choice = Math.ceil(Math.random()*4);
loadImage.loadMovie("img"+choice+".swf");

I understand how the randomize works but I'm confused by the most basic thing which is how to load the external swfs. It runs without any errors but I have a feeling that my extreme lack of actionscripting fundamentals is making me do something ridiculously stupid. Any suggestions would be greatly appreciated.

Cheers

[F8] Loading External Swfs
Whats the best way to load external swfs?

I'm developing a site fully in Flash and want each area to load only when the user visits that specific area.

I tend to build my flash with mc's in mc's in mc's so there is no real use of scenes or anything. I've tried a few of the tutorials on FlashKit but can't seem to get the preloaders to work.

Can anyone point me in the direction of a good tutorial for this type of thing???

Thanks.

Loading External Swfs
Hi there,

I have a main movie and I want to load external swfs that contain one image each in.

When you click on the next swf to load I want the previous swf to fade out while the next swf is loading, so the fade will take as long as the load of the next swf. I understand that this will involve some sort of listener to check how much of one swf is loaded like getbytesloaded and then fade out accordingly, but I am new to listeners and am not sure how to work it.

Anyone have any ideas?

thanks,

bob
info@bobcooper.org.uk
www.bobcooper.org.uk

Loading Into MC/external Swfs
Hey...i not too sure how to do this.

For this example, i have the 'main.swf' and a loaded 'test.swf'

On the main time line a have a empty mc 'infobar'.
From the test.swf i load menu.swf into the mc 'infobar'...which works fine.

On the menu.swf i have another empty MC 'text', that i want to load into from the test.swf...which i have no idea how to.

To try and clarify...how do i loadmovie from the test.swf, via a button, into an mc 'text' thats in a swf called menu.swf?

I hope someone could help....if you can understand!

Thanks in advance

Loading External Swfs With XML
hey guys,

im creating a website, and on one page i need to load an external swf with a XML menu, it works fine if i run it from the main swf, but as soon as i put it all together and run it from a html file, i get an UNABLE TO LOAD XML DATA ERROR. could anyone shed some light on this problem?

as of right now im using a simple loadmovie() command....obviously its not so simple...

any help would rule


thanks

Loading External Swfs
Hi

What is the bes way of loading external swf's to main swf? Using xml or loading component or is there any other better option. tnx in advance

regards

Luka

Loading External Swfs
Hi,

I wanted to know if anybody had a clue as to why when I've created a small site which loads external swfs upon the release of a button - it takes about three seconds for the corresponding swf to initialize. I'm using the loadMovie function.

It's just that there seems to be a 3 second delay for some reason?

Thanks!!!

Loading External Swfs From As3
Hi guys,

I have a question, is there possible way to load swfs created in as3 through as2?
I'm creating a portfolio website and would like to include some of my new projects that I have created in as3 also.

Thanks in advance,

Loading External .swfs
Hello,

I think this has been asked before but I'm stuck and have been looking for a resolution for a few days now.

I have a main movie(main.swf) - this is where I would like everything to load.

Then I have a nav.swf which loads into main.swf -- There are several buttons in nav.swf that when clicked I would like a movie (also external .swfs) to load into main.swf.

Here is the code that appears in nav.swf for each of the buttons:


ActionScript Code:
function InLoad(event:MouseEvent):void {
trace("you clicked me");
var loadit = new Loader();
loadit.x = -100
loadit.y = -500
addChild(loadit);
loadit.load(new URLRequest("1.swf"));
}

For the most part...this works...only it is loading into nav.swf. Since the menu is a drop down...the swf that is loaded with the AS above moves up and down when the nav menus are clicked.


If my explanation was not clear enough here is the AS2 of what I was trying to accomplish:



ActionScript Code:
on (release) {

//Movieclip GotoAndStop Behavior
_root._root.gotoAndStop("M_2");
this._parent.gotoAndPlay(11);
//End Behavior
}

Loading External Swfs
Hi

What is the bes way of loading external swf's to main swf? Using xml or loading component or is there any other better option. tnx in advance

regards

Luka

Loading External Swfs
Hi

What is the bes way of loading external swf's to main swf? Using xml or loading component or is there any other better option. tnx in advance

tnx regards

Luka

Loading All External Swfs
Ok.. I have a a movie that unloads a swf (level 0) and then loads another swf on the same level. How can I load all the external swfs at once so I don't have to make a load for each one and so you dont have to watch the loader durning transitions (netween one swf to the other)?

Thanks!

Loading External Swfs Only Once
When loading external swfs into a target onto the stage, how do i make it so that once the movies have been loaded into the target for the first time, they are not reloaded once the button is pushed a second time.
Otherwise as you can imagine the person is going to have to wait for each movie to load every time.
Thanks for any help in advance

Loading External SWFs
I have external SWFs that I need to load into my main movie. Some of these SWFs (client provided) have helper SWFs and assorted files. When I load the external SWF it plays the first portion, but does not play the helper SWFs. Those helper SWFs are located in the same directory.

My question is this:

Is there anyway I can load the SWF so that it sees and plays all of the helper files associated?

Main file --> Main.exe
SWF to load --> Submovie.swf
Helper files --> Helper1.swf, Helper2.swf

See the attached code I am using below.

My problem is this, the first movie "Submovie" plays just fine. It's an intro. When the intro is over, it should go on to play Helper1.swf. However is just plays Submovie without going to the next Helper1.swf. Any ideas? I may not have access to the .FLA files.

Thanks in advance for your help-
rossimo










Attach Code

this.createEmptyMovieClip("Submovie_mc", 1998);

var my_mcl:MovieClipLoader = new MovieClipLoader();

my_mcl.loadClip("SWFs/O1-02-Reading.swf", Submovie_mc);

Pre-Loading External .swfs
Hi...

As you can tell I'm new here, but I'm not that new to Flash. I'm using Flash MX for my Multimedia course end-of-year project in New Zealand, and none of my tutors have dealt with what I'm doing! I'm making an online visual role-play game (Demo version!) in Flash MX.

My Problem Is:
I have seperate .swfs I'd like to load in one main movie .swf.
Seems simple, and I've read the tute here (Transitional .swfs) but I need to be able to load the majority of .swfs before the movie even starts, in one big preloader at the begining.
Also, none of my RPG scenes have intro/outro sequences (Which would make file size huge!) so I'm not quite sure how to deal with that either.

If you know ~
*how to preload external swfs
*of someone who could help,
*or something similar I could see as an example,
Please don't hesitate to reply!


I'll do some tests and see what happens.
Posting more info later...

</Blue>

Loading External Swfs...
Hello all,

Still having the same troubles placing everything correctly. How do I load external swfs into the correct position? Or how do I place a loaded movie in the position I want? To test, I made a new file and loaded a blank movie clip, named "blankhost" and another movie clip with just a box on it, named "host". Then I made 2 buttons, with the code:

on(release){
loadMovie("movie.swf", "blankhost");
}

on(release){
loadMovie("movie.swf", "host");
}

I can get the movie to load into the new page, however the placement is not where I want it. For example, how does kirupa load this little 'crosshairs' graphic in just that little area?

http://www.kirupa.com/developer/actionscript/index.htm

or how does this wall bounce swf, stay in the little area on the page?

http://www.flashcircle.com/display.php?storyid=46

I'm trying to use loadMovie but cannot get the placement right of the external swfs. Thanks for any help!!8]

Loading External Swfs
can someone give me the AS for loading external swfs into a movie? the swf name is slideshow.swf. (i am trying to load a slideshow into the movie using AS so that when the keyframes his the "stop();" function, the slideshow does not stop) or is their a better way of accomplishing this?

Loading External SWFs
Alright, so I'm making a flash website. My content is a bunch of my animations, and in my new version of my website I want to have them load directly into the site inside a little viewing screen, I'm starting out simple.

I have this movie clip, named Happy_Screen, and on the frame is the action
stop();
loadMovie("Movie.swf",Happy_Screen);

It loads the movie just fine, but with the wrong dimensions and way off center. How can I control where and how large the external SWF loads?

Loading In External Swfs'
ok this is my problem and it may sound confusing but please hear me out

on my teams websiite www.t2klive.com , so that the actual site loads faster i have every section loaded in externally.

now, i got the coordinates in but this is my problemm, in one of my new sections that im working on now, i want to load in an external swf inside another external swf thats gonna go into the main site..

for example: main site> xternal section> new external section with the movie inside.

now the reason i want to do this is because i have a movie thats 27 seconds long and when the person clicks the button on the main site, i dont want that section to take long to load so i made the swf with the movie an axternal one so that when the user click on the button that has the movie in it it comes from another outside swf that will land on the 1st extrnal swf that has the button.....

confused???...ive had to retype this like 2wce confusing my **** self LOL

so i think ive made this clear..

now on with my problem, im sure that the coordinates im putting for the 2nd external swf with the movie in it is correct but when i load it in it shows up somewhere else...i think that since the 1st swf has the other coordinates that go with the main site are prolly interfering....some one help me im going nuts

Loading External Swfs
Hey fellas, this shouldn't be too tough.

I am using Flash MX by the way...

Heres the low down....my preloader kicks in, loads the main movie. The loadbar tweens into a big black box...at some point on the main timeline this is no longer a graphic but a movie clip. What I want is all of my content to load into this "black box" movie clip....and at the frame on the main timeline it turns into a movie clip I want to load in the first external swf "news.swf". Note: all my external swf's have their own preloaders right now.

If anyone can help...ill give you a hug!

Frankie B

Help With The Loading External Swfs...
First off, i am a complete noob at this. Just thought i would let everyone know. Anyways, I was attempting the transition between extrenal swfs and have been having a problem with it. I downloaded the source for it so I could see with my own eyes how it was done. I went to preview it, but an error kept poping up saying it could not load the first swf. All the files are in the same folder, but I really have no idea what is going on. Did I miss something completely??

Any help would be great.
thanks

Loading External Swfs
alright I know how to create a emptymovie clip container to load external swfs....but how do I control how to control the size of the .swf that loads and create a static menu (home, about, portfolio, contact, etc) that stays on top and allows users to navigate.

does anyone possibly have any example .fla's i can look at and weed through....i find this very helpful ...thank you

Loading External Swfs Or MC's
I was browsing turorials on loading external .swfs or creating empty movie clips and came across one which I downloaded and have attached. If someone could fix one of the buttons for me so it loads a external swf or movie clip in the main area I would appreciate it. This will help me understand how to complete these functions a little better

Loading External .swfs From A MC
Hi

I have a sliding page navigation system and am trying to dynamically load external .swf's into that movieclip and am having major problems can anybody tell me how to load them.

I basically want it so that once the user clicks the button on the main screen a sliding page MC slides open (which I have done) and within that MC I want to load an external.swf

thanks in advance

Dips

Loading External SWFs And MCs
Hi everyone!

So here's my question:

On a release action for a button, I'm loading an SWF and in that SWF, I want to go to a particular movie clip. I tried this and well, it doesn't work ....
--------
loadMovieNum ("main.swf", 1);
_root.contact.play();
--------

Any answers? Thank YOU!
Peter

Loading External SWFs
I'm doing the tutorial for "transitions between external SWFs", but I'm having a problem because in the tutorial all of the buttons are on the main timeline, but in my site the buttons are on a different timeline. This is the actionscript that the tutorial tells me to use....

on (release) { if (_root.currMovie == undefined) { _root.currMovie = "work"; container.loadMovie("work.swf"); } else if (_root.currMovie != "work") { if (container._currentframe >= container.midframe) { _root.currMovie = "work"; container.play(); } } }
But that only works if your buttons are on the main timeline. How do I reference a different timeline? Any help would be greatly appreciated...Thanks!!!

Help Loading External SWFs
Hi:
I need to load external swfs into a mc. They will play in sequence, as soon as one ends, the next one will start. When running it blows by the first external swf (start.swf) and the rest of the external swfs will not continue to load and play after the objectives.swf. Could someone take a look at my code and tell me what I’m doing wrong?

I’ve created controls that will allow me to play, pause and stop the external swfs while they’re playing (however, these buttons do not seem to have any effect on the external swf when it is playing). I think it is a scope issue, but I am not sure.

Also, there’s a combo box at the bottom, which allows the user to jump to any external swf (it actually jumps to certain labels on the main timeline) at any time. The combo box appears to work OK.

The FLA is located at: www.digitalhorizonstudios.com/exstream/newplayer.fla

By the way, this presentation is a fullscreen .exe file when in use, not a swf played in an html file.

Thanks SO MUCH for any help on this one.

Loading External SWFs - Help
Hi all,

So I'm using this tutorial I found on kirupa.com: http://www.kirupa.com/developer/mx2004/transitions.htm

I've had success with this in the past, however I'm working on a flash site where my buttons aren't on the main time line, they're inside movieclips (the movieclips are on the main timeline, though).

Any idea how to get the buttons INSIDE the movieclip to target the container on the main timeline?? If I can get that working, then the swf's will load no problem.

Loading External Swfs With Xml
Hi,

I am trying to load external small swfs into my main swf using an xml file.

I have referred http://www.kirupa.com/developer/acti...pdown_menu.htm which is close to what I am doing - but it just links to .html files which opens in new browser windows.

NOW HOW DO i DYNAMICALLY LOAD SMALL SWFS INTO MY MAIN MOVIE USING AN XML FILE?

Please help...

Loading External Swfs
Hi all!

recently i run into trouble trying to load external swfs into a main swf, however i have tween motion that want the landing screen to play before loading the appropriate swf. my question is how do i achieve this! right now i need to press enter to achieve this and also i dont want the tween to play when any of the swf have been loaded.

Thanks

Loading External Swfs
Ok I have spent the last few hours looking through all the posts and couldnt find an answer to my question so if its already answered please just give me the link.

Ok so I am loading in external swf's:


Code:

var myrequest:URLRequest=new URLRequest ("home.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);


myloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progresshandler);
function progresshandler(myevent:ProgressEvent):void {
var myprogress:Number=myevent.target.bytesLoaded/myevent.target.bytesTotal;
bar_mc.scaleX=myprogress;
myTextField_txt.text = Math.round(myprogress*100)+"%"
}

myloader.contentLoaderInfo.addEventListener(Event.COMPLETE, alldone);
function alldone(myevent:Event):void {
addChild(myloader);
removeChild(myTextField_txt)
removeChild(bar_mc)
}
So when I get home.swf loaded in I have a few problems. First if I test the preloader for a slower connection the flv thats on home.swf plays before its finished loading (usually 50%). Second if I code buttons on home.swf they will load in the swf fine but home.swf is still there. And I cant figure out where I am going wrong so if you can please help that would be great. My last question once that is working is how to play an animation before the next swf is loaded. For example if home.swf is loaded in when you click a button the content on home.swf is tweened off the stage and then next swf starts loading. I hope I explained myself well enough and I am sorry to be asking this question I just changed from AS2 to AS3 and its alot harder than I thought. Thanks for anyone who can help me.

Loading External Swfs
when I load in external swf's how do I access all my stage elements(mc/btns,etc). Does the code have to be on the main.swf thats loading in content or can I leave it on each external file. Right now when I view an external swf the rollover effect works fine but as soon as I try to load it in I have issues.

Also when I click something I want it to load into the main.swf file. I have seen may post but I really cant figure this out and have been working on it for a week now. Thank you for anyones help.

Loading External Swfs
I'm attempting to load external swfs into a another swf, which is in a dreamweaver file.

The main swf works file when I test it in flash- it loads the external swfs without a problem.

When I put the main swf into dream weaver, it works, however does not load the external swfs.

Everything is in the same folder, it just seems like once the main swf is in the html file, it can't "see" the external swfs.

Here is the as I'm using.

btn_mc.btn3_mc.onRelease = function () {
loader_mc.loadMovie("bio.swf");
}


Any suggestions?

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