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




Load External SWF In Main From External SWF...



Ok, Here's my problem... Can someone explain to me how to load an external swf from an external Swf into the main, and what level it should go on? My example: I have a main where MENU loads as an external SWF on the initial load... On MENU there is a button to load GALLERY back into the main... I want it to replace level 1. I have placed an empty container for the GALLERY with the instance name "mygallery" on my main. What is the code to put on the button... so far I have: on (release){_root.mygallery.loadMovie("gallery.swf", 3);} I am calling this to load on level 3... should I be doing that? Also, could someone please tell me what code I should have on my main for the container. I have: createEmptyMovieClip("gallery_holder", 3); I hope I explained this well enough, I'm kinda new at this and trying to learn my best... THANKS!



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 05-02-2005, 12:23 PM


View Complete Forum Thread with Replies

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

Trigger External Swf To Load Into Main Swf From Button In Another External Swf
I'm really stuck with this and it seems like such a simple problem to solve.

I am trying to get a nav button in one movie (main_nav.swf) to target a my main movie (index.swf) and load a sub nav movie (metals_subnav_infinite.swf) into it. The sub nav movie will do a similar task - loading a portfolio swf into main movie (index.swf).

Here is the file breakdown of my working files:

index.swf - main final movie which loads "main_nav_infinite3.swf" on start

main_nav_infinite3.swf - loads main nav "main_nav.swf" and scrolls it infinitely (infinite menu)

main_nav.swf - main nav with buttons that trigger sub nav "metals_subnav_infinite.swf" to load into index.swf

metals_subnav_infinite.swf - loads sub nav "metals_subnav.swf" and scrolls it infinitely

metals_subnav.swf - sub nav with buttons that trigger "folio.swf" (have not created this file yet!) to load into "index.swf"


The script I was focusing on is in main_nav.fla and it is:

metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);
this.enabled = false;
_level1.sub_nav_content_mc.loadMovie("metals_subna v_infinite.swf");
};

I haven't yet activated all the buttons yet just the "Metals" button as the first to get working.

I have attached the FLAs.


exxie!

Load External SWF In Main From External SWF...
Ok,

Here's my problem...

Can someone explain to me how to load an external swf from an external Swf into the main, and what level it should go on? My example:

I have a main where MENU loads as an external SWF on the initial load... On MENU there is a button to load GALLERY back into the main... I want it to replace level 1. I have placed an empty container for the GALLERY with the instance name "mygallery" on my main. What is the code to put on the button... so far I have:

on (release)
{
_root.mygallery.loadMovie("gallery.swf", 3);
}

I am calling this to load on level 3... should I be doing that? Also, could someone please tell me what code I should have on my main for the container. I have:

createEmptyMovieClip("gallery_holder", 3);

I hope I explained this well enough, I'm kinda new at this and trying to learn my best... THANKS!

Load External Swf Under Main
I have a menu in a main movie that i want to stay OVER my loaded external swf's that are loading into level 1, 2,3 etc.,

how do you set the level for stuff in your main movie?
so i can get the main nav at level 10 and the external swf's loading underneath?
at the moment they just cover the main movie.

External Swf Nav To Load To Mc In Main
I can't seem to figure this out- I have a nav bar that I need to load as an external swf into a mc in the main stage- I can't get it to work
nav.swf
navload_mc

thanks for your help

Load External .swf And Controling Main MC
Hello!
Im building a web site (Flash 6) and I load an external .swf files with preloaders in scene1 and content on scene 2 in the main movie where I have placed movie clip "holdMovie" (holding container). Everything works great until I push some button (on the main timeline) while the external file is preloading in the main movie (in the container). When I do that the main movie start to work wery confused and so the loaded .swf.
Imagine: You have the main timeline and there is some buttons with AC code:

on (release) {
_root.gotoAndStop("splošno");
}

("splošno") means "inroduction" and there is also two other buttons with lets say lebels "products" and "general"!
On the layer below on each frame (where the lable is) they have movieHold containers with action:

loadMovie(clipUrl, movieHolder);
stop();

The external .swf have two scens: first is a preloader with code:

stop();
myInterval = setInterval(preloader, 10);
function preloader() {
if (getBytesLoaded()>=getBytesTotal()) {
play();
clearInterval(myInterval);
}
loadBar._xscale = (getBytesLoaded()/getBytesTotal())*100;
display.text = "Prenešeno ... "+Math.round(getBytesLoaded()/getBytesTotal()*100)+"%";
}


on the second scene is just few frames with buttons to control the movie forward and backward, nothing special!
I try so many things no for 4 days that I dont have any more ideas so if there is anyone who can help me .... please!

So again my problem is when the external swf is preloading and I push some button with code under I lost controle of the whole movie (main and the one that I preload)

Thanks!

For better uderstanding what I mean go to:
www.roxel.si/new

enter the Slovenian flag (the first one)
When you are on the page click on "Vzrdževanje" (second button) and you will get submenu. On this menu witch is stil on the main timeline push the button "čiščenje" (the second one) and when the external swf starts to preload push the third buttton "zaščita", wait a few seconds and you will see my problem!

Load An External At The End Of The Main Timeline?
Im sure there is a simple answer....I have a button that loads an external clip...but i also want that clip to appear once my main stage animation has finished....so its the first thing displayed once the display area is up.....

help me again someone

Load External SWF's Into My Main Timeline
Hi,

When I try to load external SWF's into my main timeline, I lose the ActionScript functionality of those files. Do I need to export the ActionScript and import it into the main timeline? If so, how do I do that?

Cheers,
Lucas

Main Swf Flashes Before External Swf's Load
Hello,
I am using the loadMovie command to load my external swf into a container clip on the main timeline.
My action script is as follows....

on (release) {
_root.contents.loadMovie("places2.swf");
}

I have been reading that when you loadMovie into a container clip that all the swfs will be loaded onto the same level. So that they should completely cover the swf that precedes it. So you should not be able to see any of the other swfs once the next one has loaded.

My problem is that the once I have left the original swf ("home.swf") and I am on a new swf ("places2.swf" The original swf ("home.swf") appears for a quick second then "places2.swf" begins to play.

It does not make any sense to me that you would be able to see "home.swf" if I am loading into a container clip on the same level.

I am using a mac, I have read that the loadMovie command has problems with macs, but I have used loadMovie on macs before and it was fine!
I noticed that another user on this forum has asked pretty much the same question, but it wasn't answered on that thread so I am asking it again.

Thanks for any help, this is really frustrating.
christina

Possible To Load External Swf While Viewing Main?
Hi All,

I have several files (video/sound) that I need to present in Flash format. Currently I have tried two methods to display these movies:

1) Combine all the video/sound in one projector file.
- This takes over two minutes to load on a decent computer.

2) Break the movies up and load them individually as swf files from the main projector file as they are needed.
- This causes long delays (30 seconds) between movies and makes the user think the app is broken.

Is there any way to preload the swf files in the background while the main movie is being seen? I tried loading the different sections to different layers after the primary has begun, but once they are loaded they immediately play. Is there a way to load them and ensure they don't play (video or sound) until called from within the main file?

Thanks for any assistance!!

Newly

Load Text In External Swf From Main.swf
Hi
I'm trying to load a external txt into a swf which is loaded in main.swf .
In the text.swf standalone the text appears, but once loaded into main.swf the text doesn't work anymore.

text.fla includes a MC which is used to load the txt for scrolling


PHP Code:



onClipEvent (enterFrame) {    if (down == "1") {        this.textField.scroll += 1;    }}onClipEvent (enterFrame) {    if (up == "1") {        this.textField.scroll -= 1;    }} 




the buttons used to load external txt use this
Code:
on (press) {
loadVariables("/texts/general.txt", "_root.text_box");
}
I think the problem is with "_root.text_box" in any way, just don't know how.

any help is apreciated

the MC is called textBox

Main Swf Flashes Before External Swf's Load
Hello,
I am using the loadMovie command to load my external swf into a container clip on the main timeline.
My action script is as follows....

on (release) {
_root.contents.loadMovie("places2.swf");
}

I have been reading that when you loadMovie into a container clip that all the swfs will be loaded onto the same level. So that they should completely cover the swf that precedes it. So you should not be able to see any of the other swfs once the next one has loaded.

My problem is that the once I have left the original swf ("home.swf") and I am on a new swf ("places2.swf" The original swf ("home.swf") appears for a quick second then "places2.swf" begins to play.

It does not make any sense to me that you would be able to see "home.swf" if I am loading into a container clip on the same level.

I am using a mac, I have read that the loadMovie command has problems with macs, but I have used loadMovie on macs before and it was fine!
I noticed that another user on this forum has asked pretty much the same question, but it wasn't answered on that thread so I am asking it again.

Thanks for any help, this is really frustrating.
christina

Possible To Load External Swf While Viewing Main?
Hi All,

I have several files (video/sound) that I need to present in Flash format. Currently I have tried two methods to display these movies:

1) Combine all the video/sound in one projector file.
- This takes over two minutes to load on a decent computer.

2) Break the movies up and load them individually as swf files from the main projector file as they are needed.
- This causes long delays (30 seconds) between movies and makes the user think the app is broken.

Is there any way to preload the swf files in the background while the main movie is being seen? I tried loading the different sections to different layers after the primary has begun, but once they are loaded they immediately play. Is there a way to load them and ensure they don't play (video or sound) until called from within the main file?

Thanks for any assistance!!

Newly

Load Text In External Swf From Main.swf
Hi
I'm trying to load a external txt into a swf which is loaded in main.swf .
In the text.swf standalone the text appears, but once loaded into main.swf the text doesn't work anymore.

text.fla includes a MC which is used to load the txt for scrolling


PHP Code:



onClipEvent (enterFrame) {    if (down == "1") {        this.textField.scroll += 1;    }}onClipEvent (enterFrame) {    if (up == "1") {        this.textField.scroll -= 1;    }} 




the buttons used to load external txt use this
Code:
on (press) {
loadVariables("/texts/general.txt", "_root.text_box");
}
I think the problem is with "_root.text_box" in any way, just don't know how.

any help is apreciated

the MC is called textBox

Trying To Load External Swf's Into Main Swf Using Xml Preferably.
I am determined to figure this out, and it should be pretty simple all I need is for somebody to help me with the finer details.

O.K. I have a main swf which in which I would like to load external swf's inside. The reason for this is that if I put all the swf's inside one movie it is gonna take 3 years to load! It is a large furniture site and requires a whole alotment of little swf movies to be loaded one at a time on click when required.

The swf's will are all the same format and size, and all end up being displayed in the same placement, like a slideshow.

What I need is for someone to break down the process involved so that I can get this bugger on the road to completion!

O.K. - figured it out!

External Load Swf In To Main Movie Through Weblinks
Hi

In my web page there is a main movie with target mc .

there are html links on webpage, where on click it loads external swf in to main movie.

Screen shot for my requirement is here

Pls help.

Sabs

Load Main Movie Clip In External Swf
Help kirupans!

I have a main swf now theres a button to load an external .swf. Now what I wanted to do is, once the external .swf is loaded and when i pressed back it will go back to the main .swf inside a movieclip in frame no 4.

Want To Load Different External Videos Into Main Flash
Hello,

Can anyone tell me how to set up a flash movie so that upon clicking different buttons a different video would load into a target empty movie clip? I'm guessing it's best to have these videos be SWF files. And, I'd like to see how once a video is loaded one can control it (pause, volume, etc) with one set of such controls below the one window where each video will be playing.


Thanks!

Rob

Load Text To External.swf File From Main.swf
So, I am tryig to load text from the loaded xml file on the main.swf and target a text field in another loaded swf file

main.swf loads xml and loads external content.swf trying something like this:

function showPage() {
stopAllSounds();
_level0.ui.content_area.content.loadMovie("content/" + contentItems[currentContentItem].attributes.FILENAME); //this part loads the external swf file
this.body_txt.htmlText = "com'on!!!"; //this part is not targeting the swf text field right?!?!?!
if (contentItems[currentContentItem].attributes.audio != "") {
// create a new sound object
var soundHolder = new Sound();
// load mp3 into the sound object
soundHolder.loadSound("content/" + contentItems[currentContentItem].attributes.audio,false);
// play the sound
soundHolder.start(0,99999);
}
}

Load Main Movie Clip In External Swf
Help kirupans!

I have a main swf now theres a button to load an external .swf. Now what I wanted to do is, once the external .swf is loaded and when i pressed back it will go back to the main .swf inside a movieclip in frame no 4.

Help Load External Mp3-xml Player (swf) Into Main Flash Mov
I have an external mp3-xml player (it's a .swf movie) I need to load into the main .swf movie. All my attempts have failed... It doesn't work! However, if I test the mp3Player.swf independently it works like a charm! I hope someone can help me with this issue.

You can find the source files here:
http://www.natachafernandez.com/downloads/MP3Player/

External SWF To Load Under Some Content Inside The Main Movie...
Hello my forum friends... I have another little question and seems I can't find the way around this... is it that simple that I don't see the solution in front of my eyes, lol ?

Here is few images to explain what I am trying to do...

Thanks in advance !

Getting Movieclips From An External Swf To Load Image On Main Stage
hello!

ok, i have a question. is it possible to make a movie clip thats loaded externally, show a clicked image on the main swf stage??

if it is possible, could someone please show me the source to do it??

Load And Play External Swfs In 1 Main FLA File?
Hello! I have one main file that I'm using as my main 'loader' file for 7 external swf files that are like 'mini movies' that I want to play inside my main loader file. I wrote the code to play one movie just fine and I can even write the code to load them all into the main code. The problem is that they load and don't stop and wait for each one to play and then move onto the next one.

I'm new to AS3, coding of any sort actually, so I'm really hoping someone can help me. I'm attaching my fla file for the main loader so you can see how far I've gotten. I know that if I can get the code portion for one of the movies, it's then just a matter of cutting and pasting for each additional movie but I'm stuck.

Please help in any way! Thank you!

Load External Swf (quiz) Into Main Flash 8 Timeline
Hi there,
I am creating at learning module in Flash 8 on Mac OS X, I have four external swf quizzes created from the template. To load it into the main timeline, I made a movie clip, and successfully loaded the swf quiz into my main timeline, using loadMovieNum, and to get it to unload, I put in the unloadMovieNum script, but once the short quiz is completed, it does not go back to the main timeline. It just sits there at the end. I guess you can tell I'm new at this

If anyone knows what i should add to the movieclip actions to get my swf to go away and put me back on my main timeline, I'd really, really appreciate it!

Thanks so much!
Connie

External Movie, Load Button In Main Timeline
Hi there,

Just new on this forum and hoping to get some help!

I've build a website that loads an random banner every time the page is reloaded. This is done bij the loadmovie function that loads randomly external .swf files.

I hope to establish, that when people click on the banner they get redirected to a certain point in the main timeline. So the external swf file is containing a button and when pressing it must work for the main timeline.

Doe anyone has a suggestion?

Thanks Rik

How Do I Load External SWF Video Files Into Main Flash?
Hello,

I need to know how to be able to load external SWF video files into a main flash movie via buttons on the main flash. What I am trying to do is to show video clips in a window on the main flash movie. I know I need to convert the video clips to flash first. Could someone tell me how should I convert them in flash professional 8, then have on the main flash movie different play buttons which can each bring a certain clip to play in a window. I'd like to be able to also allow the viewer to control the audio of each clip, as well as pause the clips, start them over again, etc. I'm just trying to allow my viewers the choice of which clip they want to play into a window on the main flash movie and be able to control them as well. I'd really appreciate it if someone would help me. It's really hard to find a solution anywhere else.

Thanks!

Rob

Load An External Image From A Movie Clip To A Main Scene
Hi Guys
I want to make an image gallery I have put 4 button in a movie clip and when the user click on any button a big image will open in front of the main scene and user can close that window as well to see other images
a quick reply shall be highly appriciated

Thanks & Regards

Atif

How To Sequentially Play/Load External Video Clips (in SWF Format) In Main Timeline?
Hi,

Does anyone know how to sequentially play external SWFs loaded into the main timeline?

I have several SWF files with short videos embedded in them. I wish to load these external SWF files into my main timeline as follows:


User Presses Button -> Play Video Clip in External SWF#1 -> Once Video Clip in External SWF#1 has Finished -> Play Video Clip in External SWF#2.


I tried achieving this by adding: “var endmovie:Boolean = true;” to the end of each video clip inside the external SWF’s (e.g. “1.swf”) then cycling through an if statement in the main timeline to see when this condition was meet:


ActionScript In Main Timeline:

Code:
var mc_Loader = new MovieClipLoader();
mc_Loader.addListener(this);

this.createEmptyMovieClip("Container", this.getNextHighestDepth())
Container._x = 0
Container._y = 0

button_mc.onRelease = function () {

mc_Loader.loadClip("1.swf",Container);

function onLoadInit(target_mc:MovieClip) {

myInterval = setInterval(cycle,30);
function cycle() {

if (Container.endmovie == true){
mc_Loader.loadClip("2.swf",Container);
}

}

}

}



To my surprise, this code does actually work - until you add the "button_mc.onRelease = function () {" part!

How is the best way to go about achieving this? Am I on the right track? (By the way, using .FLV files or one long external SWF file is not really an option due to long loading times...I think...)

Please Please Help!

Loading External SWF From External SWF Onto An Empty MC On Main Timeline?
Hi Everyone,

Please bear with me while I explain. I have an external swf that loads into a frame in the main timeline, into an empty MC. I can do this just fine. Once this clip is loaded, I have a button in this clip that loads another external swf into a different empty MC on the main timeline. I'm using loadMovie, and I need to load these movies into specific empty MCs. In other words,

I have the following:

MainStage: frame 5, contains empty MC "ClipA"; frame 6, contains empty MC "ClipB"
External swf: "Movie1"
External swf: "Movie2"

"Movie1" goes into "ClipA" of frame 5 on Main Timeline; and "Movie1" has a button that loads "Movie2" into "ClipB" of frame 6 on Main Timeline. I need help loading "Clip B" into "Movie2" from a button in "ClipA."

I'm sorry my message is so roundabout - it's not really a complicated situation, but explaining it makes it seem so.

Thank you in advance for any help - I'm assuming it's some sort of _root or _parent issue things I'm not quite understanding.

Thanks!
macgirl

External Text In External Swf Not Loading In Main Swf
Hi. I'm kind of new to Flash, and am trying to make external text load into an external swf which is loaded into my main swf.

What I have is a swf file where I have buttons that load external text. I then loaded this swf into another main.swf and now the external text will not load. The code i have in the external.swf to load external text is this


but4272005.onRelease=function(){
loadVariablesNum ("4272005.txt","0");
}
but4282005.onRelease=function(){
loadVariablesNum ("4282005.txt","0");
}
but532005.onRelease=function(){
loadVariablesNum ("532005.txt","0");
}


This swf works by itself, but when i load it into the main.swf it doesn't.
I'm sure it has something to do with the "0", but I'm not sure what to put there to make it load correctly in the main swf.

The dynamic textbox i'm trying to load into is named "index_txt". The name of the loader in the main.swf is named "content". Any help would be appreciated.

External Text In External Swf Not Loading In Main Swf
Hi. I'm kind of new to Flash, and am trying to make external text load into an external swf which is loaded into my main swf.

What I have is a swf file where I have buttons that load external text. I then loaded this swf into another main.swf and now the external text will not load. The code i have in the external.swf to load external text is this


but4272005.onRelease=function(){
loadVariablesNum ("4272005.txt","0");
}
but4282005.onRelease=function(){
loadVariablesNum ("4282005.txt","0");
}
but532005.onRelease=function(){
loadVariablesNum ("532005.txt","0");
}


This swf works by itself, but when i load it into the main.swf it doesn't.
I'm sure it has something to do with the "0", but I'm not sure what to put there to make it load correctly in the main swf.

The dynamic textbox i'm trying to load into is named "index_txt". The name of the loader in the main.swf is named "content". Any help would be appreciated.

Loading External Swf Into Main From Another External Swf.
I am trying to load external two.swf into the main.swf FROM external one.swf. If this makes any sense, can someone please explain to me how I can do this? Thanks!

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

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.

Main Mc Loads External Swf, Then Main Swf Buttons Stop Working
I have a portfolio site that I am building. The main site swf has a navigation menu, and a empty movieclip. Each of the buttons on the menu calls up an external swf to load into the main empty mc. When you click on 'home', the 'home' swf loads.. when you click on 'about', the 'about swf loads, I can switch between them, no problem.

This is where my problem comes in... I just created another external swf that has a gallery in it. The gallery consists of thumbnails and a larger image that are calling from an XML file. When this swf loads into the main mc, everything is fine. But then, the buttons on the main swf menu stop working! The buttons all work going between one another, except when you load the gallery and then you can't go anywhere else. Help!

let me know what code you need, if any. MUCH APPRECIATED in advance :)

example of whats happening:

http://christinevanetten.com/index2.html





























Edited: 04/18/2008 at 08:30:55 AM by christineski

How Do I Load An External Swf In The "main.swf" From A Loaded Swf?
Hi Hope this isn't too confusing to understand what I'm getting at. Basically I have a "main.swf" file and within this file I use the loadMovieNum to load external swfs into levels. Ie "upcoming_events.swf" and "contact_us.swf" etc

In the external file "upcoming_events.swf" I want to add a link that will load the "contact_us.swf" external swf into the main.swf.

Can anyone tell me if it is possible and maybe some idea of how to do it.

Any help is appreciated.

Thanks

Main Flash Loading External Swf Then Back To Main
SOLVED



Heres a rather complicated situation I am in.

I put together an after effect file and exported it as an swf. Work perfectly. There is no FLA


In my flash file, frame 1 is a preloader. Frame 2 is an Action script that says

loadMovieNum("page1.swf", 1);


And voila, the movie start to play.


Problem is, it doesn't go back to the main on frame 3.




Solution-
Using sorenson squeeze theres an option to load/unload movies that you compress into swfs. There was a stop at the end of my movie with no fla file.

Load External Text Inside An Already Loaded External Movie
here's the problem as simply as I can explain it.
there's a main.swf, a news.swf and a text.txt
the news.swf is loaded into the main.swf and I want to load the text.txt into the news.swf

everything works when I just load the text into the news.swf without loading it into the main.swf, so I know the text.txt part is loading.

[F8] External Text Files Wont Load Into External Swf File...
Hi,

I'm making a Flash website in Flash 8 (mac).

Structure: There is 1 main file that loads external SWF files depending on what is clicked on.

One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.

I made that particular SWF on my mums computer running Flash MX 2004. The flash file itself uses the Scrollbar component from MX.

Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.

I've attached the files in question. Its a 200kb ZIP download. Do tell me if you need to know more.

Thanks

Loading External Movieclip From An External Movieclip Library Into Main Movie?
How do you load an external movieclip from an external movieclip library into a main movie?

I have an external movieclip loaded within a main movie. I then want the external movieclip to be able to take a movieclip from its own library and the load this into another container ind the main movie.

In other words:

A contains B

B contains C

I want a button in B to place C directly in A

How is this done?

Preloading External .swf's And The Main .swf All In The Main .swf's Preloader
Hello everyone

My question is would anyone know how to preload external .swf's and the main .swf all in the main .swf's preloader? All feedbacks are welcomed. Thank u.

toneDigital

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?

How To Load An External Movie Using A Link Within An External Swf - Urgent
Hi all

Flash CS3 but coding in AS2 - mac.

I believe I have asked this question before but i was using loadMovie() - I am now using loadClip and the MovieClipLoader class and obviously I have managed to break something.

I have a number of external swfs which load fine, with preloaders using MovieClipLoader, into an empty MC on the stage called holder_mc. In one of the external swf's, there are two links to separate external swf's - if you click on either of them, the current swf is unloaded and the new one is loaded. I used:


Code:
myButtonWithinSwf.onRelease = function() {
this._parent.loadMovie("newMovie.swf");
}
However now that I am using a different code (because before, evrything wasnt preloaded, i just had a white space until it appeared) the code within the swf obviously has to change. The only problem is, I cant for the life of me work out what it is, I have tried all sorts of combinations and probably missed the most obvious one. I do not want to create empty movie clips, I want the movie to load into the MC which I have defined - holder_mc - and usually I would tell it to unloadClip() before loading the new one, but it cant load a new one if it has unloaded itself. I hope that makes sense!
This is the code I am using on the main timeline to control the preloading of the external swf's:


Code:
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
loadListener.onLoadStart = function() {
holder_mc.stop();
};
loadListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number) {
pleaseWait._visible = true;
var preloaded:Number = Math.floor(loadedBytes / totalBytes * 100);
preloaderMC._visible = true;
preloaderMC.loadText.text = preloaded.toString() + "%";
preloaderMC.loadBar._yscale = preloaded;
};
loadListener.onLoadInit = function() {
preloaderMC._visible = false;
pleaseWait._visible = false;
holder_mc.play();
};

/**** register listener object with MovieClipLoader object ****/
mcLoader.addListener(loadListener);

anotherButton.onRelease = function() {
mcLoader.unloadClip(holder_mc);
mcLoader.loadClip("anotherMovie.swf", holder_mc);
}
my preloader is called preloaderMC and pleaseWait is just a movie clip that is placed on the other side of the screen for another reason. loadText and loadBar are the dynamic text and loading bar within the preloaderMC.

I really hope someone can help me ASAP as this was all working before with loadMovie() and now suddenly I cant get it working!

Thanks in advance

Theo

Load External Swf From Html Formatted External Text?
Hi to all,

new to this forum, not so new to flash, but deeper AS...

I searched a while before asking now but didn#t found a solution for what i want to do.

may be someone can give me a hint to this:

I have a html formatted external text file and i want to call from this a external swf movie like

Code:
<a href="loadMovieNum("products.swf",10)">products</a>
I guess i need a asfunction for this?

So i read this:
http://www.macromedia.com/cfusion/kn...fm?id=tn_15639

But still get not the trick how to..?

I tried this:
in 1. Frame of movie i placed:

Code:
function myFunction () {
loadMovieNum("products.swf",10);
}
and changed html text in:

Code:
<a href="asfunction:myFunction">products</a>
when i publish and add a trace function is still got the comment i gave in trace but external swf is not loaded.
I get no error in output window, but not loaded.

Any ideas or hints?

Would be great.

Thank you for a hint.

all best
cyrano

How To Load An External Movie Using A Link Within An External Swf - Urgent
Hi all

Flash CS3 but coding in AS2 - mac.

I have asked this question before but i was using loadMovie() - I am now using loadClip and the MovieClipLoader class and obviously I have managed to break something.

I have a number of external swfs which load fine, with preloaders using MovieClipLoader, into an empty MC on the stage called holder_mc. In one of the external swf's, there are two links to separate external swf's - if you click on either of them, the current swf is unloaded and the new one is loaded. I used:


Code:
myButtonWithinSwf.onRelease = function() {
this._parent.loadMovie("newMovie.swf");
}
However now that I am using a different code (because before, evrything wasnt preloaded, i just had a white space until it appeared) the code within the swf obviously has to change. The only problem is, I cant for the life of me work out what it is, I have tried all sorts of combinations and probably missed the most obvious one. I do not want to create empty movie clips, I want the movie to load into the MC which I have defined - holder_mc - and usually I would tell it to unloadClip() before loading the new one, but it cant load a new one if it has unloaded itself. I hope that makes sense!
This is the code I am using on the main timeline to control the preloading of the external swf's:


Code:
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
loadListener.onLoadStart = function() {
holder_mc.stop();
};
loadListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number) {
pleaseWait._visible = true;
var preloaded:Number = Math.floor(loadedBytes / totalBytes * 100);
preloaderMC._visible = true;
preloaderMC.loadText.text = preloaded.toString() + "%";
preloaderMC.loadBar._yscale = preloaded;
};
loadListener.onLoadInit = function() {
preloaderMC._visible = false;
pleaseWait._visible = false;
holder_mc.play();
};

/**** register listener object with MovieClipLoader object ****/
mcLoader.addListener(loadListener);


anotherButton.onRelease = function() {
mcLoader.unloadClip(holder_mc);
mcLoader.loadClip("anotherMovie.swf", holder_mc);
}
my preloader is called preloaderMC and pleaseWait is just a movie clip that is placed on the other side of the screen for another reason. loadText and loadBar are the dynamic text and loading bar within the preloaderMC.

I really hope someone can help me ASAP as this was all working before with loadMovie() and now suddenly I cant get it working!

Thanks in advance

Theo

Load External SWF1, Then Load External SWF2
I'm trying to load two different swfs, one after the other. After the first swf is loaded into it's own container (containerA) and is displayed to the viewer, I want to load the second SWF into its container (containerB) which will end up on top of the first SWF (the first SWF acts as a background layer).

Here is my code:
Code:


var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);

myListener.onLoadProgress = function(target_mc:MovieClip, loadedBytes:Number, totalBytes:Number) {
   loadText._visible = true;
   var preloadPercent:Number = Math.round((loadedBytes/totalBytes) * 100);
   loadText.text = preloadPercent + "%";
};

myListener.onLoadComplete = function(target_mc:MovieClip) {
   loadText._visible = false;
}
//load in first swf
myMCL.loadClip("sand.swf", "loadBackground");


It makes sense to me to use an if statement, indicating "if sand.swf is loaded completely, the go ahead and load in movie.swf". But I everything that I have attempted fails. Can someone point me in the right direction as to how I can load in the second movie after the first one has been successfully loaded in.

Perhaps it's a matter of loading them at the same time, then displaying one after the other? I don't know.

Need help!
- popkes01

External Clip, External Variables Don't Load
hi all,

I'm having some trouble with external variables and external movie clips. I have a main movie, and one part of it is an external movie, the main movie has a bunch of variables stored in a text file. This works fine. The external movie also has a bunch of variables in a different text file. When I play the external movie on it's own it works fine too. When I load the external movie from my main movie, the movie loads but the variables don't. Is there a special way to do this with more movies, do I have to load variables on different levels or something?

I generally use this to load variables

loadVariables ("roznet.txt", "");

I have tried using absolute paths as well (http://) but the same thing. It works by itself but when it is within my main movie the variables don't load. Any ideas? Thanks.

How Can I Load External JPEG From External File?
I know I should read manual.., but I don't have now.
So please someone help me.
I am trying to load JPEGS from external file into MC.

Loading External Swf Which Load External Txt File
Hi,
My main movie loads an external swf with the following:
code:
createEmptyMovieClip("contRight_mc", 5);
contRight_mc.loadMovie("contHome.swf");
contRight_mc._x = 485;
contRight_mc._y = 0;


contHome.swf loads an external text file and stylesheet:
code:
loadVariablesNum("contHome_no.txt", 0);

globalStyle = new TextField.StyleSheet();
globalStyle.load("global.css");
hdrHome00_txt.styleSheet = globalStyle;


hdrHome00_txt is a dynamic text field with the variable hdrHome00, which is used in the loaded text file:

hdrHome00=<html><body><hdr>text</hdr></body></html>

All files are currently in the same directory. When I test contHome.swf (the swf loaded by the main movie), everything works. But when I test the main movie the text does not load, or at least it does not show up as I receive no errors in the output window, and I can't figure out why. Can anyone help?

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