Loading Other Swfs From Loaded Swfs
Flash - 8 : Above is an example of what I would like to do/have done. I've gotten as far as loading the "loaded.swf" into the "start.swf" but my problem is I'd love to use that little loading action I made earlier without copying and pasting into the new movie the same actions for a different link. So, how do I load "loaded2.swf" into "loaded.swf" via the link in "loaded.swf"?If you need anything just ask, also, any help is useful.Thanks
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 08-02-2006, 01:11 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading External Swfs Into Externally Loaded Swfs.
ive got some buttons on my main timeline that im using to load external swfs into an empty mc. the buttons are coded with the following:
on(release){
if(_root.currMovie == undefined){
_root.currMovie = "1";
emptyMC1.loadMovie("1.swf);
} else if (_root.currMovie != "1") {
if (emptyMC1._currentframe >=
emptyMC1.midframe) {
_root.currMovie = "1";
emptyMC1.play();
}
}
}
1.swf also has some buttons that load external swfs into a second empty mc. those buttons are coded with the following:
on(release){
if(this.currMovie == undefined){
this.currMovie = "2";
emptyMC2.loadMovie("2.swf");
} else if (this.currMovie != "2") {
if (emptyMC2._currentframe >=
emptyMC2.midframe) {
this.currMovie = "2";
emptyMC2.play();
}
}
}
1.swf loads into emptyMC1 ok, and 2.swf loads into emptyMC2 ok.
when i press any of the buttons on the main timeline, the outro animation of 1.swf plays correctly, but the outro animation of 2.swf does not. is there a way to the buttons so that the emptyMC's unload sequentially?
Loading SWFs Into FLAs And Making The SWFs Transparent HELP
I have a set of buttons inside a movieclip, inside a movie clip (if that makes sense).
When the buttons are clicked I need them to load a content .swf file into frame 2 at at specified position (x=20, y=140)
I also need the .swf being loaded in to have a transparent background.
How can I achieve this?
I cannot include the .fla files for your perusal because the KirupaForum uploader can't upload bigger than 2mb and my zip file is 5.28mb or something like that.
Loading SWFs Into FLAs And Making The SWFs Transparent HELP
I have a set of buttons inside a movieclip, inside a movie clip (if that makes sense).
When the buttons are clicked I need them to load a content .swf file into frame 2 at at specified position (x=20, y=140)
I also need the .swf being loaded in to have a transparent background.
How can I achieve this?
I cannot include the .fla files for your perusal because the KirupaForum uploader can't upload bigger than 2mb and my zip file is 5.28mb or something like that.
Loading Bar For All Loaded Swfs
hi
For some reason im getting 'NAN' for my percentage loaded (per):
What didi I miss??
Thanks
Code:
function getTotal() {
for (var b:Number = 0; b<=_root.ammountOfRisors; b++) {
for (var s:Number = 1; s<=5; s++) {
toLoad += (_root["risor"+b+"_"+s].actualRisor.getBytesTotal());
}
}
for (var b:Number = 0; b<=_root.ammountOfRisors; b++) {
toLoad += _root.allRisors.scroller["risor"+i].actualRisor.getBytesTotal();
}
return toLoad;
}
function getLoaded() {
for (var b:Number = 0; b<=_root.ammountOfRisors; b++) {
for (var s:Number = 1; s<=5; s++) {
loaded += (_root["risor"+b+"_"+s].actualRisor.getBytesLoaded());
}
}
for (var b:Number = 0; b<=_root.ammountOfRisors; b++) {
loaded += _root.allRisors.scroller["risor"+i].actualRisor.getBytesLoaded();
}
trace(loaded)
return loaded;
}
function checkLoading() {
var per:Number = Math.round(getLoaded()/getTotal()*100);
if(per==100){
clearInterval(checkLoadingInterval);
}
trace(per+"%")
}
checkLoadingInterval = setInterval(checkLoading,100)
Controlling Loaded Swfs, From Other Swfs....
alright on my site, i have a loaded movie clip with sound, which is the main bg music, and i have a samples page, and i want each sample to load up on press or whatever. now i need to know how to not just unload the mian bg music swf, but make that swf go to and stop on frame 3 (1 is loader, 2 is play, and 3 is stop) thanks alot!!
Loading Swfs Into Swfs: Undesireable Result
Situation:
I am using one swf to import other swfs dynamically based on user input (menu with buttons that are dynamically configured once the SWF has loaded).
I built the framework/base (I will refer to this as mainframe.swf) movie in Flash, I then built the populating SWFS in Swish Max (they will be called ad.swf).
When I load the swish max movies into the flash, they show up in the right location and everything, but if the imported movie (ad.swf) has items/shapes that over hang the bounds of the movie, the show up in the framework swf.
and example can be seen here, the issue is in the second ad (CFP):
https://fieldnet3.massmutual.com/fnm...ig002-temp.xml
I want to restrict the visible area of the loaded movie to the original movie that is it populating ( I replace a content holder.swf with ad.swf using a loadMovie). In the movie I am loading int the framework, I have created a white mask to block anything outside of the grey box. This just proves to obscure the buttons, title etc. in the mainframe.swf
The buttons are loaded dynamically as movie clips and I have assigned them to a level 10 levels above the movieclip that holds the ads, this doesn't seem to make them take precedence....
Any one have any ideas on how I can make the movie clip on the edges or make the buttons raise up?
Code availabe as needed.
Allen
Loading/Unloading - Swfs Inside Of Swfs
Here we go...
---------------------------------------------
I have a main.swf.
Main.swf contains 4 buttons(about, portfolio, contact, clients).
These for buttons call in external swfs(ex. portfolio.swf) into an empty movie clip on the main.swf stage.
inside portfolio.swf are three more buttons(print, web, logos)
When you click on one of these buttons they need to call in another external swf(web.swf) and also remove itself(portfolio.swf)
---------------------------------------------
That is where I run into my problem.
this is the code i am using for the original buttons on the main.swf:
Code:
function initMovieLoad(path) {
movieToBeLoaded = path;
if(!initializedExternalMovies) {
initializedExternalMovies = true;
loadNewMovie();
} else {
target.gotoAndPlay('midpoint');
}
}
_global.loadNewMovie = function() {
target.unloadMovie();
target.loadMovie(movieToBeLoaded);
target._y=-130;
target._x= -160;
}
var mc:MovieClip = this.createEmptyMovieClip('target', this.getNextHighestDepth());
initMovieLoad('intro.swf');
this.homeBTN.onRelease = function() {
initMovieLoad('home.swf');
}
this.aboutBTN.onRelease = function() {
initMovieLoad('about.swf');
}
this.portfolioBTN.onRelease = function() {
initMovieLoad('portfolio.swf');
}
this.clientsBTN.onRelease = function() {
initMovieLoad('clients.swf');
}
this.contactBTN.onRelease = function() {
initMovieLoad('contact.swf');
}
I thought I could just place this code inside the portfolio.swf and boom, everything would be set. but it didnt work.
I need to know how to call from the main.swf that web button inside of the portfolio.swf to bring in the web.swf
Any ideas would help at this point. THX
Loading External SWFs Vs. Loaded Movie In Mc's?
I guess what I'm really asking for, is which method is quicker for loading, having a certain degree of control over, and requiring less action scripting?
I understand that there are several factors to consider such as the complexity and size of a SWF. If anyone can either give me a better definitive answer between the 2 methods or send me a link describing such, I would be most appreciative.
Thanks!
Dynamically Loading & Checking For Loaded.swfs
Dynamically Loading & Checking for loaded.swfs
In detail: Running _level0 I would like to be able to check if additional .swf files are available in the flash directory containing movies to be loaded and loop through them accordingly.
Can this be done?
Loading Swfs Into Swfs...
this may be a silly question but i've tried a few different things and i seem to be stuck... i was wondering what the proper action and/or path was for loading a swf into another swf in the same dreamweaver document... i have buttons on the left and an empty movie clip on the right and i'm trying to make the buttons on(release) load the little movie clips into the empty mc... they are separate flash files in one dreamweaver document...
any help would be much appreciated...
Loading AS3 Swfs Into AS2 Swfs?
I have some ActionScript 2.0 swfs that I (now that we have AS3) would like to load ActionScript 3.0 swfs into.
Code:
fscommand("fullscreen", "true");
function firstRun() {
firstRunSO = SharedObject.getLocal("firstRun");
if (firstRunSO.data.firstRun == undefined) {
trace("This is the first time the program has run");
System.showSettings(1);
firstRunSO.data.firstRun = false;
success = firstRunSO.flush();
stop();
} else {
trace("This is not the first time the program has run");
}
if (success) {
trace("Write successful");
}
}
firstRun();
var theMapMovie = this.createEmptyMovieClip("theMapClip", this.getNextHighestDepth());
theMapMovie._xscale = 80;
theMapMovie._yscale = 80;
theMapMovie._x = 200;
theMapMovie._y = -40;
var theChartMovie = this.createEmptyMovieClip("theChartClip", this.getNextHighestDepth());
theChartMovie._xscale = 80;
theChartMovie._yscale = 80;
theChartMovie._x = 200;
theChartMovie._y = 200;
loadMovie("maps/milestonemembers_map.swf", theMapMovie);
loadMovie("Charts/SpreadSheet.swf", theChartMovie);
stop();
The milestonemembers_map.swf (AS2) loads fine but the SpreadSheet.swf (AS3) doesn't. Can this even be done. Did I overlook that in the release notes? Will I have to re-write all my AS2 apps?
Thanks.
Navigation Through Flash Site, Old .swfs Remain Behind New .swfs
need to unload the .swf files, not sure how to do this. All my swf interlace with each other
heres the code
Code:
stop();
about.buttonMode = true;
contact.buttonMode = true;
portfolio.buttonMode = true;
var ldr:Loader;
about.addEventListener(MouseEvent.ROLL_OVER, overAbout);
about.addEventListener(MouseEvent.ROLL_OUT, outAbout);
about.addEventListener(MouseEvent.MOUSE_DOWN, downAbout);
function overAbout(MouseEvent):void{
about.gotoAndPlay(2);
}
function outAbout(MouseEvent):void{
about.gotoAndStop(1);
}
function downAbout(MouseEvent):void{
/*var request:Loader = new Loader();
request.load(new URLRequest ("AboutMe.swf"));
loadMC.addChild(request)
*/
var request:Loader = new Loader();
request.load(new URLRequest ("AboutMe.swf"));
loadMC.addChild(request)
gotoAndStop(2);
}
portfolio.addEventListener(MouseEvent.ROLL_OVER, overPortfolio);
portfolio.addEventListener(MouseEvent.ROLL_OUT, outPortfolio);
portfolio.addEventListener(MouseEvent.MOUSE_DOWN, downPortfolio);
function downPortfolio(MouseEvent):void{
var request:Loader = new Loader();
request.load(new URLRequest ("Portfolio.swf"));
loadMC.addChild(request)
gotoAndStop(2);
}
function overPortfolio(MouseEvent):void{
portfolio.gotoAndPlay(2);
}
function outPortfolio(MouseEvent):void{
portfolio.gotoAndStop(1);
}
contact.addEventListener(MouseEvent.ROLL_OVER, overContact);
contact.addEventListener(MouseEvent.ROLL_OUT, outContact);
contact.addEventListener(MouseEvent.MOUSE_DOWN, downContact);
function downContact(MouseEvent):void{
var request:Loader = new Loader();
request.load(new URLRequest ("Contact.swf"));
loadMC.addChild(request)
gotoAndStop(2);
}
function overContact(MouseEvent):void{
contact.gotoAndPlay(2);
}
function outContact(MouseEvent):void{
contact.gotoAndStop(1);
}
any help would be excellent!
How To Make Sure Randomly Loaded Externals Swfs Are Fully Loaded [F8]
I am randomly loading external swfs into my main movie. I've got the random part working. However, I don't know how to make sure the random swf is fully loaded before jumping to a specific frame in my main movie.
I have a preloader inside each external swf, but I don't know how to make my main movie understand that the random swf is completely loaded before the main timeline should gotoandPlay("start").
What I Have So Far:
I have a blank MC (named "location") on the main stage, which I am using to hold the random swfs. On the first frame inside this MC, I have the following code:
choice = Math.round(Math.random()*2);
switch (choice) {
case 0 :
location.loadMovie("image0.swf");
break;
case 1 :
location.loadMovie("image1.swf");
break;
case 2 :
location.loadMovie("image2.swf");
break;
}
Loading the random swfs is working perfectly. But after the external swf is fully loaded, I want to move onto a frame labeled "start" on the main stage. I just don't know how to make sure the random swfs are completely loaded before I say gotoandPlay("start").
I've tried piecing together bits from so many tutorials, and I just don't know what I need to do to make it work with my current code.
Thanks so much!
Gap Between Loaded Swfs
I have a movie clip into which different swfs are loaded and everything works properly. The only problem is a small gap between the swfs. Is there any way to elminate this gap or empty frame?
Loaded Swfs
what would be the easiest way to find the height and width of a swf file loaded into a movie clip?
Thanks
Controlling Loaded SWFs
Is it possible to control SWFs that you have loaded into your main movie? Like tell it to change frames for example?
_quality For MC Or Loaded SWFs?
Hey,
Does anyone know if there is a way to set the _quality of a specific movieclip in Flash. I undestand that the _qiality is a global variable for the current player - is this correct? Is it possible to load a SWF into a different level and set the quality of that SWF in that level without having it effect the _root level's quality?
If anyone knows a runaround or a way to achieve this effect please let me know.
- Mick
Questions Re: Loaded Swfs
I am loading an swf with the load movie command.
The swf has a stop action at the beginning of it but just plays right through it.
It also loops, even though I have a stop action on th last frame. Is this normal?
Interaction Between Loaded Swfs
Hello,
I want to make interaction between two swf files. I have one container file and another swf file is loading when user will click on container file's any button. This swf is loaded perfectly but what i want is variable from that loaded swf to container swf. I have set some variables When user will click on loaded swf's buttons and i want this variable to be displayed in container swf.
so please help me It's very urgent!!!
Regards,
Paresh
Centering Many Loaded Swfs
I'm loading in swfs into a blank MC but I want the new swf to be centered on
the stage. I've read through the archives and is seems easy if you know the
dimensions of the swf which is to be loaded. Unfortunately I'm gonna be
using different sized MCs although they will be all loaded into the same
holder MC.
Does anyone have any ideas how this can be done?
Thanks
Controlling Loaded SWFs
Can anyone help?
I'm new to actionscripting.
I am loading several SWFs into a target successively, each one calling the next. Call them MC1-MC4. Each has several scenes.
Here is my challenge:
I need to program a Rewind, Stop, Play, and Foward button on the host movie that control whatever movie is currently loaded in the target.
NOTE: The Rewind and Foward button only need to take the user to the begining of the previous/next scene.
Like I said I'm very new to ActionScripting. Does anyone have an example script I can look at? Can this be done simply?
Thanks!
Wut Will Loaded Swfs Do When They're Uploaded?
ok i hav this game that i want to submit to newgrounds.com. but the game loads 2 seperate swfs onto 2 levels of the main movie. what will the movie do if i wer to upload it? would it just b a blank white screen?
Controls For Loaded Swfs?
Hi
I'm making a cdrom where I will load a lot of different .swf movies into a empty MC(movieHolder). I have no problem with play, pause and stop.
But I also like to have a dragable slider that shows the progress of the loaded movie and I have no idea how to do this. Is there any tutorails regarding this or can someone give me a simple example?
So far I use simple code like this for the contols(play button):
on (release) {
movieHolder.play();
}
Cheers
Magnus
Help With Controlling Loaded Swfs
Hey guys,
I'm making a site in mx, and I have got it set up so it loads and external swf when you click on each section. I have an animation coming into each section and going out aswell. I have each swf with a stop at about frame 10, where the page stays for viewing. I want it so that when you are viewing a section, lets say the "about me" section, and you click on say "links", it will play the rest of the about me.swf, when it gets to the end, load links.swf in its place.
Levels With Loaded Swfs?
if i load a swf into a movie clip how can i refer to it from the loaded swf?
for instance
"contact.swf"
Code:
_level5.name = "example"
if(_level5.name == "test"){
trace("test")
}
but when this is loaded into a mc the references are off. understand?
Controlling Loaded Swfs
I have a main clip, and inside of it I'm loading movies externally (into an empty clip called "host".)
I have frames labeled "01", "02" and "03". After I've loaded externalMovieA into the host clip in frame "01", I want externalMovieA to play to its end. When externalMovieA is ended, I want the main clip's root timeline to go to lable "02" and load externalMovieB.
I can't seem to control an externally loaded clips.
Any help? I'll include the main FLA.
Thanks.
No Sound With Loaded Swfs
I have a main swf loaded onto a web page with an audio stream. The main page plays fine.
The user can click on a secondary menu that loads another swf. The swf's load fine but the audio does not play.
The model works fine on the development machine but fails to play any audio from secondary swfs over the web. What am I missing?
Yes I have checked the paths. All the files are in the same directory. The publish settings appear to be the same for both swfs as well.
Starting Up Loaded Swfs
Hi,
I've got a swf which loads variables from a database when it starts. I wanted to embed it in another swf with the loadMovie action.
The embedded swf is coming up okay in the outer swf, but it's not performing any of the first frame load actions.
Any ideas how I start it running? This is my first attempt at embedding swfs within swfs so I'm probably missing something obvious.
Problems With Loaded Swfs
Help
My site has a main template swf with separate content swfs loaded into the centre for each page. www.poipoi.info/mike/index.html
The sound in the content swf does not play when loaded into the template, yet everything works fine if it is played on its own.
Is there a simple explanation for this??
Thanks
p.s the sound i want to be hearing is televion static - not the background music which is in the template.
Issues With Loaded SWFs
Hey I am building my first full Flash website and I came across an issue with the actionscript. The preloader I use refers to the _root frame. That is also how I refer to the mcHolder that holds the images in my photo gallery.
So each SWF works perfectly when it is independent from the other. When I load one into the other, anything with the root frame becomes useless. Any thoughts how I can fix this? Thanks
Displaying Loaded Swfs
Hello,
I'm building an application that loads in a series of external swfs using the MovieClipLoader class. I've got an onLoadStart function that hides the target for the loaded clip and an onLoadComplete that unhides it, so the swfs are only available when fully loaded.
Now I want to add an animation to the main application and I only want the loaded swfs to be made visible when this animation is complete.
In other words I want my swfs to be made visible when they are fully loaded AND when the animation is complete - sometime the animation will end before the load is complete and sometimes vice versa.
I think event listeners might be the way forward but haven't used them before, anyone got any hints/tips/examples?
ta.
BitmapData And Loaded Swfs
Guys,
I'm having a little problem with the BitmapData class. Here's the deal.
I'm loading some swf's into my main game engine. I have done the many times before and I can allways get to the library assets of those loaded swf's.
I used to work with movieclips and would do this:
movieClipIntoWichTheSwfWasLoaded.attachMovie("TEST ", "T", 5);
At this point this still works. I can get to the movieclip in the library with linkageID "TEST".
But when I try to do this for bitmaps with linkageID:
var S:BitmapData = BitmapData.loadBitmap("TILE1");
It tells my S is undefined and I can't attach it to a movieclip.
Anybody has encountered this thing or knows what I'm doing wrong?
Greetz, Gilbert
Communicating Between Loaded SWFs
Hi, this is my first post here; hope someone can help a n00b.
Trying to learn/use AS3; I think I'm over-complicating the situation somehow, but I'm out of ideas.
Basically, I'm trying to get the SlidePanel to load external xml files based on which button is clicked in Buttonz. Make sense?
I have made an example to illustrate (see attachment). It is the same document structure as my actual project file, sans other code that is irrelevant to this specific issue.
Overall document structure is:
Code:
Compository (main container clip)
|
SlidePanel<--SlidePanel.as, LoadXML.as, BtnVar.as
||
||
Background|__example(1,2,3).xml
|
Buttonz<--Buttonz.as
Problem With Loaded SWFs
Hello,
I'm having an issue with my Flash file once it is uploaded into a browser. I have a targeted movieclip within my main movie that I am loading SWF files into based on whatever button is clicked in the main movie. Each of the SWF files is comprised of two scenes. The first contains a preloader, the second contains the content. If given time to fully load, the files act appropriately, but if I click on a button to load a different file into the target while an SWF is loading, it goes haywire. Once the new file loads, it loses its "stop();" function in the second scene and keeps going back and forth between the two scenes. From then on, if I try to click a button to load a file, the same things happens.
Is there anything I can do to fix this? Maybe change how I've set up the preloader?
Thanks!!
Controlling Loaded Swfs
Hi,
Complete noobie here and just getting to grips with AS 3.0 so apologise if this is a dumb question.. Anyway, trying to load and then control an external swf with this code:
var myrequest:URLRequest = new URLRequest("Left.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);
//check loads completed
function swfLoaded(e:Event):void{
stage.addChild(myloader);
var mycontent:MovieClip = e.target.content;
trace(mycontent);
mycontent.x = 100;
mycontent.y = 100;
mycontent.gotoAndStop(10);
}
//add event to loader class
myloader.contentLoaderInfo.addEventListener(Event. COMPLETE, swfLoaded);
evrything works - x and y of movieclip get set but problem is that the movie doesn't stop at frame 10 - it just keeps playing through?!
Anyone any idea why this could be so??
Unloading Xml Loaded Swfs
Hi All,
I have my file nearly complete, but can't seem to figure out how to unload the swfs in as3 once you click a button to load a new one.
My file works great, with the exception of the videos playing over each other. slight bummer.
I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.
I uploaded all the files here, including two test flv files. the files were too big to upload to the kirupa forum.
http://www.graphicmuse.com/web_help/unload.zip
Thanks!
Controlling Loaded Swfs
Hi All,
I tried yesterday to sort this out, but didn't explain it very well and I think everyone lost interest. So I'll try once more.
What I'm trying to do is create buttons in one swf that load another swf and also give instructions to begin playing from a certain frame in that swf. The target swf has a preloader on frame 1 and then a movie clip that contains a video in frame 2. Depending on which button the user presses the video will be cued up ready to play at different frames.
I think it may need an if statement ie if x=34 then goto frame 34, but I can't seem to pass the variables to the loaded swf.
In the zip file is an example of what I'm trying to do. I would really appreciate any help on this.
Help With Multiple Loaded .swfs
Hi-
So...I've got a problem.
On my main timeline, I have a header that loads an external .swf.
To the left of that, I have a menu that takes you to other frames in the movie while leaving the header where it is.
I would like the header to play UNTIL you click on another button that loads a video.
That sounds really confusing, so anyone who is willing to help might just want to look a it...
http://www.borderless.us/clients/roxanntaylor
if you go to 'market a property' or 'buyer representatives' and click on a headshot, the original movie keeps playing, and I would like it to stop.
if you feel up to it, you can lok at or edit my .fla
http://www.borderless.us/clients/roxanntaylor/index.rar
any help would be amazing. thanks!
ClearInterval -loaded Swfs
when loading/unloading external swfs into a container movie,i`ve noticed that any intervals (within the loaded files)i`ve used are not being cleared despite the movie being unloaded causing errors when the same swf is reloaded. Without manually clearing all intervals is there a way round this?
Interactivity And Loaded Swfs
If an external swf is loaded into a main movie, is there a way that changes that take place within the loaded movie, i.e. a button press, can change the flow of the main movie. In essence how do external movies and the main movie communicate.
e.g. contactForm.swf.instance-this doesn't work by the way.
Any ideas around?
Loaded .swfs Running S L O W L Y. Please Help
Hi,
I have a main interface which loads up a series of animated .swfs, one after the other into an empty movie clip, under a mask layer on my main timeline.
My problem is with the loaded swfs running really slowly. Without them being loaded into the interface, they run fine, as I have tested them online. But once they are within the interface, they run really slowly, especially when the redraw regions are biggest.
I'm just using
loadMovie("FirstMovie.swf", "_root.empty_mc");
In my main timeline to load the first movie, then
this.loadMovie("SecondMovie.swf");
...on the final frame of the first movie, and so on.
As you can see, I havent put any numbers or channels in, as I'm not sure how they work. Could this be why my swfs are running so slow? Please help if you can, cheers.
Loaded .swfs Running S L O W L Y.
Hi,
I have a main interface which loads up a series of animated .swfs, one after the other into an empty movie clip, under a mask layer on my main timeline.
My problem is with the loaded swfs running really slowly. Without them being loaded into the interface, they run fine, as I have tested them online. But once they are within the interface, they run really slowly, especially when the redraw regions are biggest.
I'm just using
loadMovie("FirstMovie.swf", "_root.empty_mc");
In my main timeline to load the first movie, then
this.loadMovie("SecondMovie.swf");
...on the final frame of the first movie, and so on.
As you can see, I havent put any numbers or channels in, as I'm not sure how they work. Could this be why my swfs are running so slow? Please help if you can, cheers.
I'm using Flash8 by the way.
Unloading Swfs Within A Loaded Swf.
Unloading swfs within a loaded swf.
My main movie has buttons to load and unload a number of swfs.
All works fine except for one particular loaded swf(let's call this "loaded. SWF", which also loads and unloads its own swfs.
Sometimes, after unloading "loaded. swf" from the main movie, I get the following:
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
The object it refers to is in an swf loaded into "loaded. swf", which I assume has not unloaded along with it's parent.
From the main movie, how can I tell my loaded .swf child assets to disable themselves, prior to unloading loaded.swf itself?
Duplicating Loaded SWFs
My problem is I have a custom class which uses a Loader class to import an external SWF. I would like to provide a function, getSprite():MovieClip, where when called will return a copy of the SWF within the class. Right now when I call the function, it does not copy the SWF, so rather then getting a new MovieClip object I just get the reference to the stored one.
I'm having difficulty duplicating this clip, trying the new sprite.contructor(), where sprite is the clip I want to dup, results in an empty movie clip.
Any ideas?
Thanks
Percent Loaded Of Two SWFS
Hi,
I was wondering if it was possible to have a preloader display the %loaded of both of them..I load two swfs at one time..a background swf and the swf that sits on top of the background. Right now I have a preloader on just the foreground swf which works fine. Can I make it so it displays the progress for both?
ActionScript Code:
__slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);__slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
...........
ActionScript Code:
private function loadProgress(event:ProgressEvent):void { var percentLoaded:Number = event.bytesLoaded/event.bytesTotal; percentLoaded = Math.round(percentLoaded * 100); pcttxt.text = percentLoaded + "%"; } private function loadComplete(event:Event):void { trace("Complete"); }
my other loader would be __bgLoader
PLEASE HELP: Unloading Xml Loaded Swfs
Hi All,
I have my files nearly complete, but can't seem to figure out how to unload the swfs in as3 once you click a button to load a new one.
My file works great, with the exception of the videos playing over each other. slight bummer.
I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.
Thanks!
Background Of Loaded Swfs
I'm sorry if this is a dumb question or has been asked before but I'm in a hurry and I don't have time to look through a 1,000 threads. But answer this, if I'm loading an external .swf file into a movie clip will the background thats in the .swf show up on top of the document/movie clip it's being loaded into or will the contents of that .swf (buttons, graphics, etc) just show up as if the .swf is transparent. Okay..maybe I'm not making sense..my main movie has a background on it..I'm making different sections in a seperated flash file to load external .swfs into the main document..the main document has a background..the seperated file/.swfs have a blackground..will that black background in the external .swf show up on top of the background that I have in the main movie, or will only the contents of that external movie show up since it's being loaded into a movie clip. If not is there anyway to achieve a transparent background in flash? Last time I made a site with all the MC's in one file it came out to be huge so I'd rather have the external clips load into a main movie..thanks in advance.
|