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




Loading External Swfs Who's Filename Is Partially The Same...



Hello Yous Guys,

I am wondering if it is possible to load an external swf who's filename is only partially equal to what the loadMovie script tells it to load.

eg. loadMovie("Oak.swf", ExtMovieLoader);

This script needs to be able to load a file named OakMellowRP530.swf.

If anyone knows of any sollution, or where I could start looking please let me know.

Cheers,

Sven



FlashKit > Flash Help > Flash General Help
Posted on: 11-09-2005, 12:41 PM


View Complete Forum Thread with Replies

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

Loading External Flash Files Using A Variable As Filename
ok I have made a flash file and what I want it to do is take a variable like path and use that to load the movie. For example the url will be "www.example.com/1.swf?path=2.swf" that will set path to the file I want to load into my movie how do I use loadMovie() to load the file using that variable. also once I load the movie how do I place it in my flash file. and how do I set where it goes ect.



Max

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?

Partially Loading Movies
Hi,
I am having a problem with loading seprate movies. It seems the orginal movies is always in the background. I can get new movies to load and unload previous ones but the first one is always in the background. Is there a way to define the original movie so that when a new movie loads it disappears?????

Thanks in advance

[F8] Issue With Swf Not/partially Loading
I am using an xml framework, and for whatever reason the swf simply will not load the menu.

I have been at this for nearly 3 days, and I am going right insane. The site can be seen here:

www.skysurfboards.com

I have the fla files, and can quote the code. I also attached the zip with the file. Can someone look at it and tell me where I am fudging up?

Loading Sound Partially
This is really a tough cookie for me, since I've never really worked with dynamic sounds, but now a project came along and the client is starting to get quite upset, so I come to you looking for help.

So here's the problem: I have a simple music game where the user must guess the name/artist of the loaded composition in 15 seconds time. So what I have now is a queue loader, that loads all levels of the game in sequence, but it loads the whole song while I only need 15 seconds that are randomly determined. I was thinking about using simple streaming sounds, but that doesn't seem to work with preloading the consecutive levels.

So the question is: how do I go about preloading a part of a sound?

Thanks in advance!

Ps. Sorry if my english is a bit weird, I'm not a native speaker.

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.

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