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




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?



SitePoint > Design Your Site > Flash and Actionscript
Posted on: Nov 30, 2005, 12:37


View Complete Forum Thread with Replies

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

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!

Externally Loaded SWFs #2
Is it possible to send instructions from a swf which is loaded in another one, to the one its been loaded into?

I'm using a scrollpane to import SWFs.

Externally Loaded SWFs
I'm trying to load swf1 in swf2, which works, using a scrollpane and this little bit of actionscript:

_root.main1.loadScrollContent("../test/swf_main/swf1.swf");


But, swf1 contains a dynamic text box in a movie which should load an external txt file, using this code:

loadVariables("welcome.txt", this);


Now, when I open swf1, it displays the text from welcome.txt, but when I open swf2, welcome.txt isn't displayed.

Is this even possible? Or what am I doing wrong?

Cant Unload Externally Loaded Swfs Please Help
Hi guys...I have searched the board and read everything to do with loading and unloading external swfs yet I am still having problems unloading some swf's.

My main stage starts by loading an intro.swf and a menu.swf into level1 and level100 respectivly. The menu.swf then has a slideup menu system with buttons that load other external swf's which all work fine. However when I try to unload some of the swf's they dont work.

If I click on a button within the menu I then load a movie into level1 replacing the intro.swf and another set of buttons appears next to the main menu which are loaded into level3.

If I then click the home button to return to the start it should unload the content on level1 and load the intro.swf again whilst unloading the swf on level3 to appear like it is back to the start...the main content unloads fine but the buttons in level3 do not.

on (press) {
unloadMovie("_level3.bottommenu1.swf");
unloadMovie("_level1.op01.swf");
unloadMovie("_level1.patientsleftbox.swf");
unloadMovie("_level4.video1.swf");
loadMovieNum("intro.swf", 1);
}

this is the code to return to the start basically the home button...to see this working please goto http://www.gallstone-surgery.com/site/index.html you can also download the fla's

Are Externally Loaded Swfs Transparent?
Or is there a way to make them that way?

I just need the graphics and text of this swf to show in a window of my site...

Sizing Externally Loaded .swfs?
kind of a newb to scripting. how do you size a movie clip that you want to load into a movie? also, how can i control the location of the loaded .swf? this is the script i've been trying to use:

loadMovieNum("http://www.blabla.com/bla.swf",1);

^not the real url.

i tried putting the code in a movie clip, then scaling the MC on the stage, to no avail.

any help greatly appreciated!

_totalFrames And Externally Loaded Swfs.
Im working on a cd-rom application in Flash for my portfolio which will feature heavy video (enhanced music cd)

Using Sorenson Squeeze I have exported mpeg video directly to a swf.
I have about 10 swfs and each are circa 30mb.

As such they are brought in using loadMovie when requested and attached to movie_mc (a placeholder).

Because I used sorenson I have no ability to add functions (preloader to pass back a totalFrames variable to the main timeline)to these external swfs.

I need to determine the totalFrames in a loaded swf in order to determine when it has finished playing so that it can be replaced with a standard mc.

using a combination of this code:


Quote:




enteredTrack = audioFields_mc.songInput;
loadMovie("musicVids/"+enteredTrack+".swf", moviePlayer_mc.movie_mc);
dynamicTitle = enteredTrack+".swf";
dynamicTitleFrames = moviePlayer_mc.movie_mc.dynamicTitle._totalframes;




Im having no luck.
I know for a fact that this line is wrong
moviePlayer_mc.movie_mc.dynamicTitle._totalframes;
and it is infact reading "dynamicTitle" as part of the path instead of adding its value to the path. How to fix this, I dont know.

Im also concerned that requesting the _totalframes immediately after loading the video in wont work because it will not be fullyloaded from the CD when the function is called.

Help!

Targeting Externally Loaded Swfs
Ok guys here is my problem

I have an empty Movie which i named main.swf. on the first frame of main.swf i load another movie called shell.swf into _level100 of the main.swf this has stop and play buttons located in it....now on this timeline i load another movie into _level2 which is the animation to be controlled by those stop and play buttons. However i cant seem to target the animation correctly whne the stop button is clicked the animation continues to play...

any ideas guys?

Controlling Externally Loaded Swfs
Hello-

I am using AS 2.0 and MX 2004. I have a movie that loads in external swfs and images using the MovieClipLoader to load the element in to a clip called "container".

Now I've been testing within flash with test movie and it works great. as soon as I export my commands that toggle within different frames of the external swf fail.

what I have is:

container.gotoAndStop(frameLabel);

is there an obvious reason why this would stop working on export? or things I could try to figure this out.

I tried loading on to levels instead so I would have:

_level25.gotoAndStop(frameLabel);

and I still have the problem.

I am exporting as Flash 8 and testing in Flash Player 8.

ideas?

SWF Object And Externally Loaded .swfs
Anyone know of any difficulties using the SWF Object method (http://blog.deconcept.com/swfobject/) to place a .SWF which loads external .SWFs into itself into an .html document?

The project is a Flash only site that in which the .SWF file displayed on the .html page is a shell for various externally loaded .SWFs. All .SWF files reside in the same folder and the file structure was not changed when the main .SWF was placed in the .html file using SWF object.

Thanks

HTML And Externally Loaded Swfs
I have a Flash movie where I'm loading in external swfs. When I preview in Flash, it works fine. When I publish in HTML (from Flash), it works fine. When I try to embed my Flash movie into a different HTML page using Dreamweaver, the external files don't load. I've done this a hundred times in the past, but I'm having this problem with a few different Flash Movies -- Only the ones that load external content -- any ideas??

Communication Between Externally Loaded SWFs
Hi

I have a problem with working with loading different SWFs into a main SWF file. I have one main SWf file (menu.swf) and then several external files (Game1.swf, Game2.swf, Game3.swf etc).

The main SWF starts off and loads Game1.swf into the main SWF. After a user finishes Game 1 he clicks on a button inside the Game1.swf and thats supposed to unload Game1 and loads Game2 into the menu swf.

The trouble is I have no idea how to reference methods in the main SWF with the loaded SWF. Anyone have any ideas?
I tried root.parent but that wouldn't compile.

Maybe there's a better way of doing it?

Any help would be greatly appreciated.

Externally Loaded Animated Swfs
I am loading swfs dynamically, but their animation starts and stops halfway? Whats is going on? How do I correct this?

Masking Problems With Externally Loaded Swfs
I'm loading external swfs into a target movieclip ("clip a"). That target is nested inside another movieclip ("clip b"). I have an animated mask applied to "clip b" (the animated mask is contained within a graphic symbol). When I do this the mask layer doesn't seem to work properly (sometimes it doesn't use the animation, other times the externally loaded swf doesn't show up at all). I have tested to see if it would work without loading the movie from an external swf and it works fine. Its only when I use loadMovie() that it seems to fail. I've also noticed that if I publish as flash player 6 it works fine (I can't use 6, though, due to client restrictions). Has anyone had this problem before and created a work around for version 5? Any help or a simple explanation of why this happens would be greatly appreciated.

(Simple?) Problems With Externally-loaded .swfs...
I've got a jukebox thingy that allows the user to choose a track (an external swf) into a target mc (using loadMovie). Only one target is used. It all works, but...

...5% of the time they just don't load.

Could this possibly be because the button has a fair chunk of code on it (if track == 1 if quality == "high" loadMovie "track1url", _root.swfholder etc.) and Flash occasionally fails? Does this happen? Do I need to repeatedly ask for the swf until I'm sure it is loading? Or is the server simply not processing the request?

...if I change track too quickly (as some users presumably will...) the connection slows to a crawl.

This is the bigger of the two problems. If I load a swf into a target and then unload it before it is fully loaded will it continue loading regardless? If I quickly select track-one-then-three-then-seven is my connection receiving three swfs simultaneously? Shouldn't they replace each other?

Help please!

Controlling MCs Inside Externally Loaded SWFs
I am loading a SWF file on layer1 of my project, and I'm attempting to position it from my _level0 "root" timeline with:

_level1.pledge._x = 256;
_level1.pledge._y = 144;

Alas, I can't make it work. The only MC inside the loaded SWF file has the instance name "pledge", so I figure this should work. What am I doing wrong?

Using SendAndLoad And OnLoad() From Externally Loaded SWFs?
My site basically uses movieclips to load things in a similar method to HTML frames...I have set up a simple forum using php and mySQL, and everything works fine...provided that the forum's swf is loaded as _root...however when i have the index.swf up and load in the forum's swf as a movieclip, nothing works properly...what it is supposed to do is through a sendAndLoad kick out the forum name that should be retrieved to a php script, then return the text and display it in a dynamic text field...simple...and working when layers are not in the way...it still sends the data properly...but the text does not return, or at least does not display...

on (release) {
sendout.forum=topic.getValue();
sendout.sendAndLoad("HIDDEN FOR POSTING", read, "POST");
}

is the button's code and

read = new LoadVars();
sendout = new LoadVars();

read.onLoad = function(success) {
if (success) {
forumtext.text = read.displaycomment;

}
};

is on frame 1...the variable returned by php is 'displaycomment' and on the stage the dynamic text box is 'forumtext'....

as i say, when this swf is loaded in the browser all is well...but when it is loaded into the main swf, it all falls appart...

any help would be greatly apperciated...

index: www.ancalagon.net/index.swf
standalone: www.ancalagon.net/whatwassaid.swf

[MX] Pause/play Externally Loaded Swfs?
Hi,

I've found a few threads about doing this for audio, but they don't seem to work with a full swf? Basically I have a selection of swfs that load into targets and what I want to be able to do is have a button that either says 'stop this specific swf' then next time you click says 'play this specific swf', or, as they all play on their own frames one that says 'stop any external swfs' and then 'start any external swfs'. It sounds pretty simple, but for some reason nothing I've tried seems to work and the threads I've found asking the same thing have no responses?

Any help with this would realy be appreciated as I've spent all day messing about with it and still no luck..

Tom

How To Access Vars From Externally Loaded SWFs
Hey all,

Pretty much as stated. I have an FLA I'm working on, and I want to load several SWFs into it, with the paths being generated by a PHP page query, which spits out an XML file.

I got all this working just fine, but I can't quite get to the next step. There are some variables that reside in each of the SWFs that I need to get access to (reason being, I would like to have specific events happen based on which clip they are, but be controlled by the "MotherSWF"). So as I said, I have this all working, up until the point that I try to get the vars from the children (Imported SWFs). Tracing the var itself results in the whole "undefined property" mumbo jumbo, and trying to trace the var via the Loader simply returns "undefined". Here's the code (Note, I'm NOT classing this out at this point, as I'd rather learn the methods of how to do everything prior to trying to hotwire a bunch of classes right now. I think that's just opening up another can of worms, which I don't need to do at this point. More worms == more problems):


ActionScript Code:
stop();

import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.xml.*;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
import flash.net.URLRequest;

var avatarBuilder_stage:Stage = this.stage;
var avatarBuilder = this;
var myResult:XML;
var testingNum:Number = 0;
var loadArray:Array = new Array();

var buildHolder:MovieClip = new MovieClip();
buildHolder.x = 410;
buildHolder.y = 150;
buildHolder.scaleX = 1.40;
buildHolder.scaleY = 1.40;
avatarBuilder_stage.addChild(buildHolder);

function LoadingXML() {
    this.loadXML();
}

function loadXML():void {
    var loader:URLLoader=new URLLoader();
    loader.addEventListener(Event.COMPLETE,completeHandler);
   
    var myRequest:URLRequest=new URLRequest("test/stephen/avatarBuilder/swfParser.php");
   
    try {
        loader.load(myRequest);
    }
    catch(error:Error) {
        trace("unable to load requested URL");
    }
}

function completeHandler(event:Event) {
    var loader:URLLoader=URLLoader(event.target);
    myResult=new XML(loader.data);
    avatarBuilder.gotoAndStop("loaded");
}

function initMovie() {
    var headHolder_mc:MovieClip = new MovieClip();
    buildHolder.addChild(headHolder_mc);
    headHolder_mc.x = 97;
    headHolder_mc.y = 100;
    var headLoader_mc:MovieClip = new MovieClip();
    headHolder_mc.addChild(headLoader_mc);
   
    var mouthHolder_mc:MovieClip = new MovieClip();
    buildHolder.addChild(mouthHolder_mc);
    mouthHolder_mc.x = 98;
    mouthHolder_mc.y = 134;
    var mouthLoader_mc:MovieClip = new MovieClip();
    mouthHolder_mc.addChild(mouthLoader_mc);
   
    var noseHolder_mc:MovieClip = new MovieClip();
    buildHolder.addChild(noseHolder_mc);
    noseHolder_mc.x = 96;
    noseHolder_mc.y = 104.1;
    var noseLoader_mc:MovieClip = new MovieClip();
    noseHolder_mc.addChild(noseLoader_mc);
   
    var eyesHolder_mc:MovieClip = new MovieClip();
    buildHolder.addChild(eyesHolder_mc);
    eyesHolder_mc.x = 97;
    eyesHolder_mc.y = 67.5;
    var eyesLoader_mc:MovieClip = new MovieClip();
    eyesHolder_mc.addChild(eyesLoader_mc);
   
    var hairHolder_mc:MovieClip = new MovieClip();
    buildHolder.addChild(hairHolder_mc);
    hairHolder_mc.x = 97.5;
    hairHolder_mc.y = 80;
    var hairLoader_mc:MovieClip = new MovieClip();
    hairHolder_mc.addChild(hairLoader_mc);
   
    loadArray.push(noseLoader_mc);
    loadArray.push(headLoader_mc);
    loadArray.push(hairLoader_mc);
    loadArray.push(mouthLoader_mc);
    loadArray.push(eyesLoader_mc);
   
    for (var i:Number=0;i<loadArray.length;i++) {
        loadPiece(i);
    }
   
    //avatarBuilder.gotoAndStop("allContentLoaded");
}

function loadPiece(i) {
    var mcl:Loader = new Loader();
    var tempClip:MovieClip = loadArray[i];
    var loadURL:String = myResult.swfPath.(@id==i).piece.(@id=="0").path;
    var loadURLReq:URLRequest = new URLRequest(loadURL);
    mcl.load(loadURLReq);
    mcl.contentLoaderInfo.addEventListener(Event.COMPLETE,initImage);
   
    function initImage(event:Event) {
        trace(mcl.content); //returns [object MainTimeline]
        var loadedClip:MovieClip = new MovieClip();
        tempClip.addChild(mcl);
        switch (i) {
        case 0 :
            tempClip.x = -25;
            tempClip.y = -25;
            break;
        case 1 :
            tempClip.x = -100;
            tempClip.y = -100;
            break;
        case 2 :
            tempClip.x = -140;
            tempClip.y = -115;
            break;
        case 3 :
            tempClip.x = -60;
            tempClip.y = -37.5;
            break;
        case 4 :
            tempClip.x = -60;
            tempClip.y = -37.5;
            trace(mcl.eyeNum); // This is where I have been trying to grab the var values...
            //blinkInterval = setInterval(blink, 333);
            break;
        }
    }
}

/////////////////////////////////////////////Load the XML file in the first frame////////////////////////////////////////////
LoadingXML();

So that's for the parent. This is for the child. They live in frame 1 of the SWF:


ActionScript Code:
var eyes1 = this; /*not sure if this will work, but I used to get around
complicated timeline pathing and having to load vars in from external SWFs
with an "_global.myTimeLine = this;" in the first frame. Then I could simply
access anything in that SWF by accessing the _global... But those are
gone... :(  However, I want to see if something similar will work. If you have
a better/cleaner solution, I'm all ears on that too!! :D*/
var eyeNum:Number = 1;

Thanks in advance!

S

Properly Closing Externally Loaded SWFs
Hey,

Leading on from my previous post, how is the correct way to go about completely removing an externally loaded swfs?

I ran a test by having a simple SWF with a timer that runs every second, then another SWF that loads it up...


Code:
var thisRequest:URLRequest = new URLRequest("flash_1.swf");
var thisLoader:Loader = new Loader();
thisLoader.load(thisRequest);
stage.addChild(thisLoader);
So then once it loads up flash_1.swf and you see the traced messages popping up every second you then click a button in the main SWF and it runs the following code:


Code:
thisLoader.unload();
stage.removeChild(thisLoader);
thisLoader = null;
I thought that would remove the SWF from the scene, as the SWF vanishes from the stage, however the timer keeps ticking, so it is still using up resources behind the scenes... Do i have to wait for the GC to clean it up or is there a "correct" way to clean up after yourself?

Button Addressing In Externally Loaded Swfs
I have a swf loaded into a container swf that has buttons and various other interactive elements. I'm seem to be having issues with addressing. I can't get the buttons within these loaded swfs to work the way I want them to. How would addressing be handled in these situations? Any help in this regard is greatly appreciated.

AS3 - Stopping Sound In Externally Loaded SWFs
Hi folks...I've spent hours trying to solve this; to no avail.

I've built a Flash movie that demos a new website. The Flash movie loads 14 external SWF files, each of which contains a single narration sound clip.

I can get the external SWFs to load just fine, but when I load the next clip, the sound from the first clip keeps playing. I can use SoundMixer.stopAll();, but that has the unfortunate effect of also stopping my soundtrack, which plays in the main timeline of the container file.

I've heard there is a way to stop sounds contained in external SWFs, something about NetStream, but haven't been able to get it to work.

Complicating the matter: I can't edit the set of 14 external SWF files. Whatever solution I use must be implemented from the main container Flash file.

Can anyone help me with this? Here's a sample of the code I use to load in each SWF:

one_mc.addEventListener(MouseEvent.CLICK, go1);

function go1(myevent:MouseEvent):void {
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
}

And here is the preloader code I use:

function showPreloader(event:Event):void {
addChild(myPreloader);
myPreloader.x = stage.stageWidth/2;
myPreloader.y = stage.stageHeight/2;
}

function showProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
myPreloader.loading_txt.text = "Loading - " + Math.round(percentLoaded * 100) + "%";
myPreloader.bar_mc.width = 198 * percentLoaded;
}
function showContent(event:Event):void {
removeChild(myPreloader);
addChild(myLoader);
myLoader.x = 20;
myLoader.y = 155;
}

Thanks!!

Access Properties Of Externally Loaded Swfs?
Once an external swf is loaded onto my currently running swf using the Loader class:

1) Can the loaded swf access properties of the swf that loaded it?
2) Can the swf that perform the loading access properties of the loaded swf?

If any or both of the above is true, I would also appreciate a word or two about the process of access the other swf's properties/methods.

Thanks.

Externally Loaded .SWFs - Button 1 -> Movie 1
New question.

I understand the concept of the loadMovie() function. My issue now is that I've created several segments to the interface - The two I'll name here is A. the navigation movie which incorporates all my buttons and is loaded externally to the main movie and aligned accordingly with AS, B. the first movie I've created in a series of movies which has no other function than to look pretty and transition from photograph to photograph - also which is currently being loaded/positioned into the mainmovie directly under the navigation bars.

So my conundrum is now, how can I make button 1 call movie 1 when both are externally loaded and button 2 call movie 2, etc.? I became lost on a few AS tutorials that seemed to hint on how to make this happen, uncluding the Random Movies one I read on kirupa.com that doesn't seem to apply so much.

(please understand, the external loading effect will go hand in hand with a number of preloaders I plan to put into the site to direct the eye to each frame and basically individualize each piece of content as it appears)

Killing Processes In Externally Loaded SWFs
Hi,

I'm working on a page and I have found a little problem.
The splash page loads an external SWF containing a timed slideshow. When I unload that SWF and load a new one, the timer still loads images in the background.

Is there a way to kill all processes of an external SWF on unload??

Thanks

KD

Cross Fading Externally Loaded Swfs
Hey All,
I know this sounds similar to other posts. But, this is alittle different. I have used transitions between swfs where the first swf plays the intro, when the user clicks a button the first swf plays the 'outro' and loads the second swf intro. This not what I am looking for. I want the swfs to cross fade. I was thinking of using different layers. I have found a tutorial that seems to work but the action is on a button that loads the next swf in the array. I want to be able to pick any swf and have it cross fade with the one loaded in the holder.
Any Ideas? I will have at least 5 swfs to load.


//tutorial by Rich Shupe, FMA. http://www.fmaonline.com
/*
array of possible content to pick from. This article answered a question about swapping loaded SWF files with a transition, but this technique will also work with jpgs, without having to make swf files from them.
*/
swfArray = new Array("red_bird.swf", "chinatown_dragon.swf", "working_beast.swf");
//create two MovieClips that will hold the loaded files
this.createEmptyMovieClip("target1", 1);
this.createEmptyMovieClip("target2", 2);
//load first movie into clip 1 to start with the first image
target1.loadMovie(swfArray[0]);
//set clip2 alpha to zero so it can fade in
target2._alpha = 0;
//variables that store current clip and current content index
activeTarget = target1;
currentIndex = 0;
/*
movie-level enterFrame event handler that will fade down object 1 (if it's alpha is higher than zero), and fade up object 2 (if it's alpha is less than 100)
*/
this.onEnterFrame = function() {
if (obj1._alpha>0) {
obj1._alpha -= 10;
}
if (obj2._alpha<100) {
obj2._alpha += 10;
}
//enable trace to watch memory used by each loaded movie. this will illustrate the
// benefits of unloading the faded movie.
//trace("clip1: " + clip1.getBytesTotal() + " clip2: " + clip2.getBytesTotal())
};
//button script that swaps load target focus and loads the next movie
nextButton.onRelease = function() { // I want to put the action on individual buttons
//toggles values of object 1 and 2 between clip 1 and clip 2
if (activeTarget == target1) {
obj1 = target1;
obj2 = activeTarget=target2;
} else {
obj1 = target2;
obj2 = activeTarget=target1;
}
//assigns content of object 2 as next item in the content array, unless the
// end of the array has been reached. in this case start over at first item
if (currentIndex<swfArray.length-1) {
currentIndex++;
} else {
currentIndex = 0;
}
//load content into second clip
obj2.loadMovie(swfArray[currentIndex]);
//to reduce possible RAM and performance overhead, add an onEnterFrame
// event handler to object 1 to unload it once it has faded out.
//once the movie has unloaded, delete the onEnterFrame event handler
// to prevent future loads from unloading.
obj1.onEnterFrame = function() {
if (this._alpha<=0) {
this.unloadMovie();
delete this.onEnterFrame;
}
};
};

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

Externally Loaded SWFs Display Objects Outside Their Border
I have a MC on my master SWF that's say, 500x300 pixels. I'm loading other SWFs into this MC, and I noticed that, if the loaded SWF has objects that move off the stage during the course of its animation, then those objects are visible outside the boundary of my placeholder MC on the master SWF. Why in the world would that happen? How do I prevent it?

Syncing Sound In Multiple Externally-loaded Swfs
hey ho peeps,

i need your advice.....

i'm making a sound toy at the mo, and i've got three blocks in a horizontal line, that each load in a choice mini swf from 33.

Each of the 33 plays a different audio-visual loop when clicked. on clicking on one of the blocks to load in a swf from the 33, i need it to wait for the others (if they've already been clicked on and something's subsequently been loaded in and started playing), to come to the start of the loop before it starts to play. each mini swf will prelaod on click, so after this it then needs to queue up to wait for the next point to start playing. this will be every 2000ms or so. Imagine the swf waiting for the next bus to come along, to hop on to join his/her other two swf friends, if you would (if they're on the bus at this point).

I know setInterval is notoriously bad at accurately calculating loop lengths on different pcs/macs of different processor power, so onSoundComplete seems like the best bet, though the code for each sound is set in each mini swf, where each's library mp3 loop is stored and attached from.i think this might be an issue?

here's the structure:



blockHolder.swf
blockA.swf
mini1.swf...
mini33.swf
blockB.swf
mini1.swf...
mini33.swf
blockC.swf
mini1.swf...
mini33.swf

i've checked Franky B's bits which, though they're very informative, i'm not sure of how specific they are to this issue..


any help would be much appreciated.

thanks boys and girls


khav

Externally Loaded SWFs Make Movie Slower
I'm having a weird problem with some externally loaded SWFs that contain only audio. They were created with Squeeze 4.3.

When I load them into my movie they drastically slow down the animation of the entire movie. As soon as I stop the audio in the external SWF the rest of the movie's animation goes back to normal. But if I start the SWF again it slows down again.

My questions are:
- Is anyone else encountering the same problem with audio only SWFs?
- Does anybody have any advice on publishing settings for the audio SWFs that may fix the "slow down"? Or any other methods for publishing audio only SWFs?

Distinguishing Between Externally Loaded MovieClips And SWFs In The DisplayList
Hi. I hope the answer to this question is not so obvious that I have overlooked it.. but...

I am trying to create a graphical representation of the DisplayList of a flash site that is loading many external swfs. I want to be able to filter what is displayed (ie. Show only textfields, or show only images, or show only whatever). I have not been able to find a way to distinguish or select only the swfs. I would like this to be able to list ALL the swfs that are used in this projects and nothing else...Im sure this is possible - but it is escaping me,,,Thanks!

Having Problems With Externally Loaded Swfs When In HTML [renamed]
alright.

i've got a flash site that uses externally loaded .swfs to change the pages

(i.e. news.swf, shows.swf, merch.swf - that are loaded in when you press the corresponding button)

when i open the main .swf that the external .swf's are loaded into the site - it opens, animates and runs perfectly.

when i put the .swf into a HTML page (using Dreamweaver) the external movies stop loading at all.. when a button is clicked or when AS tells it to load a movie.

WHY IS THIS HAPPENING?

furthermore, there is an eCard that is used for the splash page. it's been done for weeks and has been online with people viewing it. it works perfectly where it's been online for the past few weeks AND works fine on my computer.

however NOW that i'm putting it into another HTML page to use it for a different splash page it's not loading external .swf files either!!! nothing was changed about the eCard, it's been done for weeks!!!!!

WHY IS THIS HAPPENING?

this is all completely new and out of left field. i've built SEVERAL flash sites using the exact same configuration and Dreamweaver.. and they've all been totally fine.

WHY IS THIS HAPPENING?

thanks,

mikey

Syncing Sound In Multiple Externally-loaded Swfs
hey kirupers,

i need your advice.....

i'm making a sound toy at the mo, and i've got three blocks in a horizontal line, that each load in a choice mini swf from 33.

Each of the 33 plays a different audio-visual loop when clicked. on clicking on one of the blocks to load in a swf from the 33, i need it to wait for the others (if they've already been clicked on and something's subsequently been loaded in and started playing), to come to the start of the loop before it starts to play. each mini swf will prelaod on click, so after this it then needs to queue up to wait for the next point to start playing. this will be every 2000ms or so. Imagine the swf waiting for the next bus to come along, to hop on to join his/her other two swf friends, if you would (if they're on the bus at this point).

I know setInterval is notoriously bad at accurately calculating loop lengths on different pcs/macs of different processor power, so onSoundComplete seems like the best bet, though the code for each sound is set in each mini swf, where each's library mp3 loop is stored and attached from.i think this might be an issue?

here's the structure:



blockHolder.swf
blockA.swf
mini1.swf...
mini33.swf
blockB.swf
mini1.swf...
mini33.swf
blockC.swf
mini1.swf...
mini33.swf

i've checked Frank Baumgartner's bits which, though very informative, i'm not sure of how specific they are to this issue...though maybe i'm wrong here...


any help would be much appreciated.

thanks boys and girls


khav

Externally Loading SWFs....HELP
Ok here's the dealio, i'm re-building my site, fullscreen this time etc.

The portfolio section is gonna be better, but I have a prob with externally loading my swfs:

Basically I have a main file. There are buttons in it which, when clicked, load the sections (about, portfolio, services, contact). I'm basically trying to externally load files into the externally loaded portfolio section. I'v kinda managed to do it, but when you click on the buttons it just re-loads the swf!

Heres the code I used:

For each button:


Code:
on (release) {

if (currMovie == undefined) {

currMovie = "portfolio_ngdlondon";
container2.loadMovie("portfolio_ngdlondon.swf");
} else if (currMovie != "portfolio_ngdlondon") {
if (container2._currentframe >= container2.midframe) {

currMovie = "portfolio_ngdlondon";
container2.play();

}

}

}
At the end of each swf, this is there:


Code:
container2.loadMovie(currMovie+".swf");
In the main file, there's _root. before some of the stuff so I took it out for the portfolio section otherwise it would load it into the wrong container....

Why the crapola dosen't it work?

Flash MX Problem W/ Music Playing & Externally Loaded Swfs
Hi,

I was wondering if anyone could offer any advice on a problem I am having. I have 2 movies, one which holds a navigation menu and some music playing options, and the other which is my main movie. The main movie has an empty clip which loads the navigation and sound into it. However the music does not play in the main movie

Does anyone have any advice on why this may be?

Thanks!

Nelly

Storing Externally Loaded Object (swfs, Images, Sounds)
Hi

hopefully someone can help me with this.

I am creating a full site in flash... with a gallery and a media page... everything is working as it is... but the question i have is this.

If you load any external file into flash like an image or a sound file how do you make it not have to reload evertime you move to another page and then go back to it?

example

i have a gallery page that loads in images using xml... the each have there own preloader so it shows that its loading and thats great...

the problem is if i go to another page on the site example the news page... then i return back to the gallery page, the images have to reload again... is there anyway to fix this so if you load it once you dont have to load it again?

Any help would be appreciated

Thanks

Flash MX Problem W/ Music Playing & Externally Loaded Swfs
Hi,

I was wondering if anyone could offer any advice on a problem I am having. I have 2 movies, one which holds a navigation menu and some music playing options, and the other which is my main movie. The main movie has an empty clip which loads the navigation and sound into it. However the music does not play in the main movie

Does anyone have any advice on why this may be?

Thanks!

Nelly

Loading & Transitioning SWFs Externally
HI,
I'm using the "Transitions between external SWFs" tutorial, but I want to take it a few steps further. (But I'm not sure how or even if I can do what I'm thinking).

Basically here's the structure I'm looking for:

ROOT
Container 1
Container 2

Inside Container 1: SWF's with buttons that are able to load/unload swfs in and out of Container 1. Also inside SWF's in Container1 buttons that load/unload swf's in/out of Container 3 (Located within swf in container1) with buttons able to load/unload swfs in ROOT.Container2

Inside Container 2: SWF's loaded from buttons located within Container1.someswf.Container3

I hope that all makes sense. It actually isn't a super complicated structure, but I don't know how to target everything correctly. Can anyone help?

Transitions Between External SWFs - Looks Crap As The Size Of External SWFs Grow
http://www.kirupa.com/developer/mx2004/transitions.htm

regarding this tutorial I started my site (http://technoportsolutions.com/technoflash/) to get some trasition effects but im getting somewhat different since the external SWFs take time to load. isn't it better to create "intro and outro" on the same time line instead of loading external SWFs bcos once the movie loaded as a whole will lead to smooth and contineous transitions. If anyone ever did something better or how can I use some transition effects (like intro and outro) without using external SWFs ? is my current problem.

Problem With "Flashing" Between Externally Loaded SWFs
I have the buttons at the bottom of my site load each "section" of the site from external swf files in the same directory as the main movie. When you switch back and forth between the sections there is a flash (like its loading the swf file every time you press a button maybe?). I have each section loading into the same container. I tried multiple containers but I couldn't figure out how to stop one from loading over the other, then you couldn't see the previous swf anymore (once a new one loaded it was on top of the others and I don't know how to fix that). Basically I just need some help with loadMovie and containers I guess. Here is the work in progress. The buttons load the external movies on release into a container.

>>> Flashing External SWFs <<<

What I want is a nice transition that you don't notice. With that flash you can basically tell its loading a new clip in. I want it to be seemless to the viewer. Any help is much appreciated.

Problem With "Flashing" Between Externally Loaded SWFs
I have the buttons at the bottom of my site load each "section" of the site from external swf files in the same directory as the main movie. When you switch back and forth between the sections there is a flash (like its loading the swf file every time you press a button maybe?). I have each section loading into the same container. I tried multiple containers but I couldn't figure out how to stop one from loading over the other, then you couldn't see the previous swf anymore (once a new one loaded it was on top of the others and I don't know how to fix that). Basically I just need some help with loadMovie and containers I guess. Here is the work in progress. The buttons load the external movies on release into a container.

>>> Flashing External SWFs <<<

What I want is a nice transition that you don't notice. With that flash you can basically tell its loading a new clip in. I want it to be seemless to the viewer. Any help is much appreciated.

Transitions Between External SWFs - Close Button For External Swfs
I recently created a site using the "Transitions between External SWFs" tutorial for Flash MX 2004. I use this to load the sections of my site into the main movie file. Each section is an External SWF file. When a viewer clicks on a navigation button, the specific external swf move will load and play. Currently, a viewer would need to click on another navigation option to close the current external swf file. I would like to add a close button to each of the external swfs so that a view has the option to close the window without clicking on a naviagtion link. Anyone have any suggestions? I am fairly new to actionscript and not quite sure how to accomplish this.

Thanks in advance for you help!
-RhynoDesign

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.

Trouble With Loaded External Swfs
I am currently building an all Flash website (my first) using MX2004 Pro, and am having trouble with some loaded swfs. I’ve created a navigation file, mgnav_no.fla. mgnav_no.fla uses 6 movie clips (swfs imported into the library) that play consecutively – home, about, etc. mgnavHome_mc has the following scripts:

Frame 3: _root.mgnavAbout_mc.gotoAndPlay(2)
Frame 10: stop();

This tells the next navigation movie clip to play. Other than the addition of a stop(); in frame 1, mgnavAbout_mc has the same script telling the third navigation movie clip to play, and so on. All 6 of the navigation movie clips have been placed on their own layer in the main timeline (one frame), and have been given invisible buttons on a separate layer. Rolling over the buttons gives you a text description elsewhere on the stage by loading an external swf with the following code:

mgnavHome_btn.onRollOver = function(){
holder_mc.loadMovie("mgnavOverHome_no.swf");
}

mgnavHome_btn.onRollOut = function(){
holder_mc.unloadMovie();
}

I’ve tested this and mgnav_no.swf works perfectly. The navigation elements show up consecutively and the rollovers work.

Now my main movie, client.fla (currently one layer with one frame), loads the external mgnav_no.swf. If I use loadMovieNum("mgnav_no.swf", 2); everything works, but I have been unable to figure out how to position a loaded movie using loadMovieNum(). So...

Question 1: Is it possible to position a loaded movie on the stage using loadMovieNum()?

Unable to find the answer myself, I decided to try something different that I new would allow me to position the movie:

_root.createEmptyMovieClip("mgnav_mc", 2);
mgnav_mc.loadMovie("mgnav_no.swf");
mgnav_mc._x = 0;
mgnav_mc._y = 510;

Problem solved? Not quite. Yes, it loads mgnav_no.swf in the position I want, but only the first navigation element, home, shows up. Obviously the script on mgnavHome_mc telling mgnavAbout_mc to gotoAndPlay(2) is no longer working. I’m guessing the problem is with using _root in the syntax, but I was under the impression that each swf has its own root so I don’t understand why this doesn’t work. Also, the rollovers for all the navigation elements work, so why not everything else?

Question 2-3: What’s wrong here? And, since I’d like to learn, why doesn’t what I have work?


And just in case you’re curious, _no is simply to differentiate between language versions (no being for Norwegian).


Thanks for any help,
Adam

[mx] Getting Loaded External Swfs To Loop
Whats ups,

i still have the same problem, i cant get the swfs that are load to play and then start agian from the begening.
Kortex was kind enough to suggest a few lines of code but it didn't work, i dont know if its cause i f***ed it up, or cause of some other reason.

anyway heres the code'

code: // Create Emptymovieclip.//
_root.createEmptyMovieClip("swfPlayer", 0);
// set movieclip Parameters.//
swfPlayer._x = 31.6;
swfPlayer._y = 189.4;
swfPlayer._width = 312.9;
swfPlayer._height = 230.2;
swfPlayer._xscale = 50;
swfPlayer._yscale = 50;
// in the root movie create a function;
_root.count_num = 1;
movie_1 = "swf/openingShot.swf";
movie_2 = "swf/Pop-upShot.swf";
movie_3 = "swf/dustShot.swf";
movie_4 = "swf/MazeShot.swf";
_root.total = 4;
function LoadNextMovie(which_one) {
swfPlayer.loadMovie(which_one);
}
onEnterFrame = function () {
if ((swfPlayer._currentFrame == swfPlayer._totalframes) and (swfPlayer._totalframes>0) and (_root.count_num<_root.total+1)) {
LoadNextMovie(_root["movie_"+_root.count_num]);

if (_root.count_num == _root.total) {
_root.Count_num = 1;

}else {
_root.count_num += 1;
}
}
// call the function manually//
LoadNextMovie(_root["movie_"+_root.count_num]);
// unload final movie//
LoadNextMovie(_root["movie_"+_root.count_num]);
}



now the code works for loading the swfs, but the problem is when the for swfs play through, the last one(fourth) will keep looping. once the last movie plays i want it to unload and start at the first one again and play through and continue to loop like that indefentialy.

the code that Kortex sugested is this;

onEnterFrame = function () {
if ((swfPlayer._currentFrame == swfPlayer._totalframes) and (swfPlayer._totalframes>0) and (_root.count_num<_root.total+1)) {
LoadNextMovie(_root["movie_"+_root.count_num]);

if (_root.count_num == _root.total) {
_root.Count_num = 1;

}else {
_root.count_num += 1;
}
}
}

-also for some reason the first swf plays twice before it loads the second!
if any one can see why could you please point that out.


again anuy help would be greatly apperciated, and would help me continue on with the project.

Variables Between Loaded External SWFs
Hey guys,
I have a SWF with a preloader to a preloader.
It is a website that has a spinning chalk board effect per page click.
example: Click About Us, chalk board spins, and contents show up.
Obviously this is huge so I have:

1). LOADER.SWF (main swf)
2). MAIN.SWF (intro/holder swf)
3). VARIOUS ANIMATED CHALKBOARD PAGES (home.swf, about.swf, ect ect)

I have successfully preloaded home.swf, although on the home page, there is a neat lil animation the first 60 frames of MAIN.swf before the first chalkboard movie clip is supposed to load, but my preloader loads EVERYTHING AS A WHOLE and skips right to the chalkboard spining.

I hope this makes sence.

IS there a way to create say, a boolean var on the frame where the first chalkboard clip is supposed to load that only sets true AFTER the MAIN.SWF animation?

Basically, how do I communicate variables between external swfs?
Help.

Controlling External Swfs Loaded Into An MC
Hi, quick question.
what actionscript could i use to make an movies loaded into a movieclip play. tried _root.holderMC.play(); holderMC being the movieclip the external swf is loaded into, doesn't seem to work! searched the internet too but no lucky, so any suggestions would be awesome.

Thanks alot
TOM

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