External Swf Loaded And Now?
For explaining my self better, I will give an exemple of what I want to do...3 files... main.swf, menu.swf, content.swfThe menu.swf is loaded into the main.swf, and what I want is that when I press a button in the menu.swf, the content.swf is loaded into the main.swfcan I do it ??
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 06-24-2007, 10:08 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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.
Preloader For External Swf That Pauses External Swf Until Completely Loaded
I'm fairly new to all of this stuff, so bear with me . . .
I want to load an external swf into a main swf movie. (This much I can do).
I would like a separate preloader movie in the main swf movie to display the amount loaded.(I've found tutorials for that, so that's not the issue.)
The problem is that I want the external swf not to start playing until it is completely loaded.
If I put a stop on the first frame of the external swf, that will keep it from playing, but, I'm not sure how to get the external swf to recognize that the load is complete.
I could put a preloader in the external swf, but I'm trying not to so that I can reuse the preloader for other external swf files without having to put it in each one.
Maybe I put a preloader without a visual component on each external swf?
Any help would be greatly appreciated.
Thanks.
Preloader For External Swf That Pauses External Swf Until Completely Loaded
I'm fairly new to all of this stuff, so bear with me . . .
I want to load an external swf into a main swf movie. (This much I can do).
I would like a separate preloader movie in the main swf movie to display the amount loaded.(I've found tutorials for that, so that's not the issue.)
The problem is that I want the external swf not to start playing until it is completely loaded.
If I put a stop on the first frame of the external swf, that will keep it from playing, but, I'm not sure how to get the external swf to recognize that the load is complete.
I could put a preloader in the external swf, but I'm trying not to so that I can reuse the preloader for other external swf files without having to put it in each one.
Maybe I put a preloader without a visual component on each external swf?
Any help would be greatly appreciated.
Thanks.
CSS File Loaded In External SWF That Is Loaded In
CSS file loaded in external SWF that is loaded in the main SWF
Main SWF:
has an action
load "external.swf" in mc target > "content"
external.swf
has following code:
var myStyle = new TextField.StyleSheet();
myStyle.onLoad = function() {
myText.styleSheet = this;
myText.html = true;
myText.htmlText = myHTML;
};
myStyle.load("name.css");
myHTML = "<p class = 'contentheading'>HEADING</p>"
myHTML+= "<br><p class = 'content'>Text.</p>."
The problem is that the text wont appear in the textfield "myText".
Probally it can't find the "name.css". or maybe something else.
The same problem occurs when the code, that is in external.swf, put in the main.swf but placed in a mc.
Anyone who can solve this?
Loaded External Image Question: Use Default Image If Loaded Image Not Found?
Hello,
I use the following code to load an external logo into a Flash Movie.
Quote:
var myRequest:URLRequest=new URLRequest(logoPath);
var loader:Loader = new Loader();
loader.load(myRequest);
holder_mc.addChild(loader);
What if the logo file is not find? I wish that if the logo is not found, another default logo will be used, i.e.
if (logoPath is here) {
var myRequest:URLRequest=new URLRequest(logoPath);
} else (logoPath is not here) {
var myRequest:URLRequest=new URLRequest("defaultlogo.png");
}
How can I do that?
Thanks and best regards
Alex
If External Swf Loaded Do?
hi
i have a external MC's which act like pages in my website which i'd like to maybe preload or better..
only show the button as clickable when that -.swf is loaded
i am guessing the algorithm would be somehing like this from the timeline:
===
if the swf_file is loaded
set button property to yelow
else
set button property to grey
===
or if u know any code that calculates if a .swf has finished loading into a MC
cheers, thanks
Loaded External Swf
What I am trying to is have a navigational drop down menu on my main.swf and when a user presses the button in the drop down menu it will load an external swf file into a blank movie clip. This is pretty easy. The hard part is targeting the drop down buttons in the main.swf file to target specific frames of the external swf file. I can do this with variables and have been successful but I want an if statement where if looks to see if the swf is already loaded into the empty movie clip, if it is then just gotoAndPlay and specific frame, but if it's not I want it to go to my preload movie clip and then load the external movie.
is there a way to tell what external swf file is loaded into the movie clip? Something like
if _root.emptymovieclip=externalfile.swf;
_root.emptymovieclip.gotoAndPlay("about")
}else{
_root.preload.gotoAndPlay
How To Tell If External .swf Is Loaded
I would like to load an external .swf from a movie the is loaded in level 1 - into level 2 and once that movie has loaded, unload level 1.
Two questions :
Does unloading level 1 from level 2 unload level 2 too as it was called from level 1??
And is there some simple script to unload level one from level 2 once it has determined level 2 is loaded???
Cant See External Swf's When Loaded After Another
Hi guys,
The site i'm working on loads seperate swf's to view a picture gallery and also a slide show, on one page i load an external swf for the gallery and on another page i load an external swf to view a slide show.
If i click on the gallery first the gallery will load and look fine, if i then goto the slide show page and load the slide show its does not show and vice versa if i click on the slideshow first the gallery does not show, this works fine when testing the movie in flash but when i view the compiled swf it does not work ??
I've tried lots of different instances of loadMovie etc and i'm using unLoadMovie when leaving each page. I think the swf's might be there but hidden by the other. Should i be using levels to load into.
Help much appreciated !
Which External Swf Is Loaded?
I have used the Loader UI Component to load external .swf files. I would like to know if there is a code that will determine which .swf file is currently loaded or if none are loaded at all. None of my books seem to address this question nor any internet searches I have found.
Thank you for any help.
Loaded External .swf
im using the full site tutorial for flash.. and when i click a link an external .swf plays.. how do i set the size for the external .swf? heres the site im workin on.. http://esheclothinginc.com/jon.com/home.html .. the home and bio links are the only ones workin right now.. and they are both http://esheclothinginc.com/jon.com/maincontent.swf .. its so i can see if it works.. it will load correctly and play but the size it very large compare to its file.
My External Swf Isn´t Being Loaded Where It Should Be, Why?
hi!
tryin to load an external swf-movie into my main swf, thou the swf loaded isn´t being placed where i want it.
so i created a main swf and in that swf i made a new layer and made a rectangle called holder, which holds the different movies being loaded. and then i created a layer made a smaller rectangle called loader which is suppose to load the external swf, but the loaded movie isn´t being loaded into the loader-rectangle, it´s being placed somwhere else in the main swf, i don´t understand why.
am i making any sense? haha...sorry,,,kinda hard to explain. however, here comes the code:
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}
mclL.onLoadInit = function() {
loader._visible = true;
loader.percent.text = "";
}
mcl.addListener(mclL);
mcl.loadClip("news.swf",loader);
How Do I Use External Loaded Swf Again?
I have use the Loader class to load the external swf and they are displaying, but now I want to create a DisplayObject and I want it to contain that same external swf. What is the correct procedure in doing this?
Loaded External .swf
im using the full site tutorial for flash.. and when i click a link an external .swf plays.. how do i set the size for the external .swf? heres the site im workin on.. http://esheclothinginc.com/jon.com/home.html .. the home and bio links are the only ones workin right now.. and they are both http://esheclothinginc.com/jon.com/maincontent.swf .. its so i can see if it works.. it will load correctly and play but the size it very large compare to its file.
Controlling Loaded External Swf's
I'm gettin' really frustrated here. I've been working on this pretty big flash website for months now, and wouldn't you know it, it's too big to load all at once on any connection slower than a DSL (it may work on cable). Even though I shouldn't be letting anyone see it yet, it's here http://www.webxinc.com/new_webx13. Keep in mind, it'll probably never load if you're on a 56k modem, but if you're still interested in seeing it, try putting a number lower than 13 after "new_webx" in the adress (like maybe 8). Anyway, my problem....
I've been trying to split this into separate .swf's that'll load into the main one which contains the intro, main page buttons and backgrounds, and content for the top buttons. The "portfolio" and "about us" sections will each be separate .swf's that load into the main one using the "loadMovie" (or "loadMovieNum") commands and be placed in holding MC (or higher level). So I've tried this by making a separate swf out of the portfolio section and deleting the portfolio part out of the main swf (This is not demonstrated in the currently posted version). I put the "loadMovie" command inside of the fisrt client list button inside of the portfolio section, and in that button's object actions, I also tried controlling movie clips that reside inside of the loaded swf. In the Flash 5 Bible, it says that this can be done by specifying the level of the loaded movie and following it with the instance name and then the command, sort of like how the _root command is used. Here's an example:
_level1.pbg.gotoAndPlay(2);
Here, "pbg" is the instance name.
But this doesn't work. For some reason, the MC's within the loaded swf aren't responding to my commands. I need help!!!!!!!!!!!
please
Showing How Much Of An External MP3 Has Loaded
I am trying to make a sound player for my website which downloads external MP3s and then plays them (not streaming) and I want to display the percentage of the file which has downloaded while the user is waiting. I've tried everything I know but can't get it to work. Anyone have any ideas?
Centering External Loaded .swf
hello all, here's my question???
i have learn to load external swf's but for some reason its on the top left corner. i would to center these swf in the middle can some one help pls.
Centering External Loaded .swf
hello all,
i understand how to load an external .swf, but i don't want it to be in the left hand corner of my movie
i know that i have to create a movie clip to hold the newly loaded movie, but where do i create the the mc and how??
If External Loaded - Play
help,
I have a file which loads an external .swf. It should loop in the main timeline until its finished loading this .swf. It works when its viewed locally but not remotely - it carries on playing. It should fade the .swf on when its loaded but it just appears.
i think am using the right code
Code:
loadMovie("ads1.swf", "ads");
_root.ads.stop();
if (_root.ads1.swf._framesloaded == _root.ads1.swf._totalframes) {
_root.play();
_root.ads.play();
} else {
_root.gotoAndPlay (1);
}
i have stripped the .fla down to bare bones so if anyone could take a look i'd be very greatful.
i have tried uploading to space but my servers down so could you leave your email address
thanks
Control Loaded External Swf How To Plz
i used
loadMovieNum("title.swf", 1);
it loads the movie clip into the movie perfectly.
but now i want to control it, since it has no instance name i dont know how to, basically what i want to do is when i click on the button called home,i want to play frame 4 in the movie clip loaded.
any help would be appreciated very much.
thanx
Control Of External Loaded Swf
Hello all, new here and a seeking little help.
Scenario:
i'm successfully loading an external SWF inside a blank "holder" MC.
A link to the exact code i'm using is here...
http://www.angelfire.com/electronic2...rentframe.html
(note: not my code, it was shared by a kind member on these
boards in an old post and has been very helpful - big thanks
to catbert303)
What i'd like to be able to do:
1) control the loaded SWF with Pause/Play and Restart buttons.
2) have the SWF auto unload when it reaches the last frame.
3) be able to re-load the SWF again by the original load movie button.
I'm guessing #1 is just a matter of getting the control buttons
to communicate with the loaded SWF (or rather, the blank MC the
SWF is loading into). As for #'s 2 & 3 I'm guessing
an if _currentframe == _totalframes evaluation will sort it out.
Thanks for listening. If you are interested in helping with
this please take a quick peek at the code link provided and
let's work from there as a frame of reference.
Any tips are greatly appreciated.
-Tvu
How To Cache External Loaded Swf 's ?
Hi all!!
I´m doing a site entirely in flash and each section has an external .swf attached with loadMovieNum("section.swf", level);
The problem is that I don´t know which is the way to cache the loaded .swf´s in order not to load each movie every time you enter a section.
I´ve been thinking about loading each .swf into a different level and detect with a variable which was the previously active section and make that level invisible until it´s selected again, but I´m sure there is an easier way of doing this...
Please, I need help. Any ideas?
How To Cache External Loaded .swf ´s?
Hi all!!
I´m doing a site entirely in flash and each section has an external .swf attached with loadMovieNum("section.swf", level);
The problem is that I don´t know which is the way to cache the loaded .swf´s in order not to load each movie every time you enter a section.
I´ve been thinking about loading each .swf into a different level and detect with a variable which was the previously active section and make that level invisible until it´s selected again, but I´m sure there is an easier way of doing this...
Please, I need help. Any ideas?
Recognizing When An External Swf Is Loaded
How do I get the root movie to recognize when an external swf loaded into a target mc has finished loading?
My conditional statement seems to only be able to recognize the target mc, not the external swf.
if (_root.target._framesloaded >= _root.target._totalframes) {
_root.gotoAndPlay(26);
}
Thanks much!
Recognizing An External Swf Has Loaded
How do I get the root movie to recognize when an external swf loaded into a target mc has finished loading?
My conditional statement seems to only be able to recognize the target mc, not the external swf.
if (_root.target._framesloaded >= _root.target._totalframes) {
_root.gotoAndPlay(26);
}
Thanks much!
Zoom Into External Loaded Jpg
I have a movieclip that loads an external jpg image into it. How can I now add a button to my movie that lets me zoom into it.
How To Tell The Player It Has Loaded That External Swf Before
this external swf im loading have an animated intro. The problem is i don't want the users to see that intro everytime they come into that area. I just wan't them to see that particular animation one time only.
I had that same problem with the home page. I solved that problem making a second Home page Mc, so whenever a user wanted to go to the home page the button they pressed would load "home2.swf" instead of
the initial home page that had an animation that the user would see for the first time not everytime they went back to the home page.
Thanks for reading my question.
Samito
San Juan , Puerto Rico
Determine When An External Jpg Is Loaded
When using the load movie function to load an external jpg, the swf continues to play regardless of whether or not the external jpg has loaded. Is there any way of determining when an external jpg has loaded? The usual pre-loaders don't work for this problem.
Check If External Swf. Is Loaded
I'm using this to load external images as background on different frames.
loadMovie("flash/images/back1.swf", "_root.loader");
Frame 1-8 have back1.swf as background.
Frame 9-12 have back2.swf as background.
I don't want to load the swf. all the time I'm in a different frame, I want to be able to check that if I'm in Frame 2 and back1.swf is loaded not to load it again.
However if I jump to frame 10 It needs to load back2.swf.
Thanks.
External / Loaded JPG Quality
Hope someone has run into this before and can help me out. I've loaded an external JPG into a movieclip on stage.
Is there a way to alter the JPG quality using actionscript (similar to the Quality adjustment in the Library when you open up a JPG)?
Thanks in advance!!
Stopping External Swf Until Loaded
How would I go about doing this? I know how to preload, but I don't want the external swf to start playing until it is fully loaded. Anyone know how?
External Swf Not Working Once Its Loaded
Thanks in advance if you're able to help me out. Ok so I have a main scene with slide in menus. On one of the slide in menus I have an empty MC that loads an external swf via loadMovie... the external swf already has the nextFrame and prevFame actions all included. When I open the external swf seperately the buttons controlling the frame advancing work. Now when I load the the same swf externally the buttons show that they are working because of the rollover effects, but they no longer control the swf. They don't go to the next or previous frames. You can go to my site to check it out.... www.jessecocozza.com if you click on portfolio and then portrait you see the gallery slide in, but the image gallery won't go to the next frames. Sorry for the novel. Jesse
Stop External Loaded Swf
Hi
Im trying to load many swfs in one swf.
With Cursor Left Right you can jump to the next swf or go one back.
I also want that if i press Space the movie should stop.
But it seems that nothing works
Even if I make a second layer in the clip where the clip is loaded and say stop, Flash seems to ignore it.
Anyone can help?
How To Tell When External Data Is Loaded
using an example i found in a magazine, i've been toying with a dynamic gallery that calls an external text file with all of the image names and descriptions, and then displays them on the flash page.
when tested locally, everything works fine. but online i have a bit more of a problem. my function to show the photos is called before all of the variables are even loaded into the swf. the example supposedly shows how to get past this using the following code:
Code:
var gal = new LoadVars();
gal.onLoad = showPhotos;
gal.sendAndLoad('photos/gallery.txt', gal, 'POST');
according to flash help files, the line
Code:
gal.onLoad = showPhotos;
should only be executed once the entire file is loaded. or at least that's what i understand. it would appear that's not the case because when i test the exact same file, all of my variables are undefined.
please help me out.
thanls.
Check Loaded External
what code do i use to stay on one frame til an external jpg file has loaded on another frame?
Reposition Loaded External SWF
Hello there this is the files that I have..
Main.swf | News.swf
In the news.swf, it contains the information and you can scroll up and down. I want to load the news.swf into the main.swf. I have tried using the loadMovie() function but for some stupid reason it doesnt display the text. Its so stupid. But when I use the loadMovieNum() function it loads everything including the text content and I can scroll up and down. But my big problem is I wish to use the loadMovieNum() function but I cant reposition it to where I want. I would like to know exactly how I can reposition the file. Here is the coding that I have in an empty movie clip called "loadmovie" in the main.swf file
loadMovieNum("news.swf", 1, "POST");
How To Control A Loaded External.swf ?
im loading an "external.swf" into an
empty movieClip in "main.swf".
that part works just fine.
i want to run a chunk of code when the "external.swf" is done playing,
or
// if (externalSWF._currentframe == lastFrame) {.....
how can i do this ???
i've tried figuring the total number of frames in the external.swf,
but since a single-frame movieclip is loading it,
the main.swf always returns the number of frames as "1".
How To Control A Loaded External.swf ?
im loading an "external.swf" into an
empty movieClip in "main.swf".
that part works just fine.
i want to run a chunk of code when the "external.swf" is done playing,
or
// if (externalSWF._currentframe == lastFrame) {.....
how can i do this ???
i've tried figuring the total number of frames in the external.swf,
but since a single-frame movieclip is loading it,
the main.swf always returns the number of frames as "1".
Resizing Loaded External SWF
I want to change the size of a movie clip containing an externally loaded image by changing the width and height instead of scaling the image.
The image does not show up if I change the width/height properties, but does show up when i alter the xscale/yscale properties
Code:
_root.v.a3.createEmptyMovieClip("imageHolder", 1);
imageHolder.loadMovie("images/hyun.jpg");
imageHolder._width=50;
imageHolder._height=50;
any suggestions?
Loaded External SWF's Not Showing Up
I have a host flash movie, which I have several external (sub) swf's that I wantto load into movie clips. The A.S. is by the books, and when I test it locally it works; however, when I upload it to my server and test online they do not load or show up? I have all the swfs in the same directory (flash). Any input.
Thanks.
HELP Resize An External .swf Once Loaded Into An MC?
Hi all (again), je,je...
Well, now my problem is that I want to load an external .swf with "loadMovie", and I do something like this:
advertisement_holder.loadMovie("advertisement.swf" );
I do it fine, but I´d like to resize the loaded swf in order to fit a space inside the movie.
Thank you in advance Regards!
Controlling A Loaded External Swf
I have a base movie that is a simple container and is mostly in the stop position. This movie has two buttons that load external swf files into a target MC (container1) on the _root of the base movie. the base movie also has an exit button which unloads the movies and returns the playhead to frame 1 and stops.
Both loaded swf files load and play correctly. But....
When unloading one of the movies and returning to frame 1, the base movie which should be stopped, starts playing on its own.
I'm pretty sure that this is because the particular loaded external swf file uses some code to pause the movie in places. the code looks like this:
function pause(){
play();
clearInterval(timer);
};
and this where I want it to pause:
stop();
timer = setInterval(pause, 1000);
Other external swf files that I load which do not have this code, do not have this problem.
I have tried this code on my exit button, but it doesn't help:
on (release){
_root.container1.clearInterval(timer);
container1.unloadMovie();
gotoAndStop("start");
}
Do I have the clearInterval targeted wrong? Could this code be the culprit and if so, why is this code hanging on after the swf is unloaded?
thanks,
Dennis
[CS3] External SWF Plays Before It's Loaded?
I am externally loading a SWF into a holder with a preloader. My problem is that shortly after the preloader begins the SWF begins to play as well.
How do I get the SWF to play after it has completely loaded?
Here is my code:
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL.Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}
mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}
mcl.addListener(mclL);
mcl.loadClip("swf1.swf",holder);
b1.onRelease = function() {
loader._visible = true;
mcl.loadClip("swf2.swf",holder);
}
The SWF itself is 30MB with audio (I'm not sure if it has anything to do with the SWF buffering instead of completely loading before playing?).Or would it need an "if" statement?
This is really important so I hope that someone out there has the answer.
[CS3] External SWF Plays Before It's Loaded?
I am externally loading a SWF into a holder with a preloader. My problem is that shortly after the preloader begins the SWF begins to play as well.
How do I get the SWF to play after it has completely loaded?
Here is my code:
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL.Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}
mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}
mcl.addListener(mclL);
mcl.loadClip("swf1.swf",holder);
b1.onRelease = function() {
loader._visible = true;
mcl.loadClip("swf2.swf",holder);
}
The SWF itself is 30MB with audio (I'm not sure if it has anything to do with the SWF buffering instead of completely loading before playing?).Or would it need an "if" statement?
This is really important so I hope that someone out there has the answer.
External SWF Loaded, Now How Do I Access It's MC's?
I have successfully loaded a external swf with something similar to:
Code:
var request:URLRequest = new URLRequest("content.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);
this external SWF file has a movieclip (that diplays just fine in both files) named "testMovieclip_mc".
So from the parent movie shouldn't I simply be able to communicate with this one by something like?
Code:
trace(testMovieclip_mc.x);
For some reason that doesn't work.
I've tried every kind of syntax I could think of like:
Code:
trace(loader.testMovieclip_mc.x);
trace(loader.content.testMovieclip_mc.x);
and tons more and nothing works.
I've also searched the entire net after a solution..
Does anyone know?
External .swf Loaded Into Main .swf
Hello,
I have an external .swf "biography.swf" loading into my main movie. When I test the biography.swf before loading it into the main movie, it works fine. But when loaded into the main movie, it loads OK but the movieclip within the biography.swf does not work.
I'm using:
on (release) {
_root.createEmptyMovieClip("container", 1);
loadMovie("Biography.swf", "container");
}
Any thoughts on why the movie clips in the Biography.swf are not working?
Thanks.
|