Groups | Blog | Home
all groups > flash actionscript > november 2006 >

flash actionscript : External SWF Load Problems


timbronze
11/24/2006 3:34:54 PM
Hello,

I am creating a Flash movie that loads an external swf. The external SWF loads
in itself some text information.

The problem I have is this. When I run the SWF the background of the external
swf is visible... however the text information is not being displayed.. If I
run the separate SWF on its own the text is displayed.

If I place the external SWF load and capture movieclip on the root scene the
data can be found, however when I place it where It is required...[ SCENE >
CHANNELS MC > ABOUT MC] The data is missing....

Is there something that I could be missing.

I currently run this code when directed to this page.

loadMovie("about.swf", "_root.channels.about");

Kind Regards

Tim

loadMovie("about.swf", "_root.channels.about");
kglad
11/24/2006 3:41:12 PM
in your external swf attach to frame 1:



timbronze
11/24/2006 3:53:01 PM
Thanks for the Speedy response kglad, however this hasn't done the trick. I have been stumped on this for a while now.

timbronze
11/27/2006 12:00:00 AM
shikozel
11/27/2006 12:45:54 PM
must be issue with your level I just dont get it all in your email

timbronze
11/27/2006 1:21:49 PM
What happens is this...

I have the MainMovie.swf.

When this is open I run the following based on pressing a key pad... to
activate the if I have to type "101".

if (textbox.text.indexOf("101") != -1)
{
_root.channels.gotoAndStop(1);
//trace ("Load About Movie");
loadMovie("about.swf", "_root.channels.about_MC");
textbox.text = "0";
display_flag = 0;
display = "101";

}

This then opens up the moveclip channels and stops on frame 1.

On frame one I have placed "about_MC" which is where I want my external swf to
load.

When viewing the swf the external swf seems to load, but it does not have the
content being loaded. But if you run the external swf separate it shows the
text being grabbed from a text file.

I hope this makes more sense.

kglad
11/27/2006 3:48:06 PM
timbronze
11/27/2006 4:45:06 PM
I am trying something new now....

I have embedded the fonts on the external about.swf. and rather than loading
the external swf deeper in.... I am opening like so

if (textbox.text.indexOf("101") != -1) // If typed in 101 do following....
{
//trace ("Load About Movie");
this.createEmptyMovieClip("emptyMC", 0); // Create new Movieclip
emptyMC._x = -130; // X
POSITION
emptyMC._y = 60; // y
POSITION
_root.emptyMC.loadMovie("about.swf"); // Load into emptyMC -
External SWF
display = "101";
}

Still the external swf's text is not being displayed..... I just don't get
it....

:confused;
timbronze
11/27/2006 5:23:32 PM
shikozel
11/27/2006 9:22:34 PM
should work like that. try to debug
put this trace command to make sure you have the reference to the emptyMC


if (textbox.text.indexOf("101") != -1)
{
//trace ("Load About Movie");
this.createEmptyMovieClip("emptyMC", 0);
emptyMC._x = -130;
emptyMC._y = 60;
trace(_root.emptyMC)
_root.emptyMC.loadMovie("about.swf");
display = "101";
}


if you dont have refference to the emptyMC try that:

if (textbox.text.indexOf("101") != -1)
{
//trace ("Load About Movie");
emptyMC=this.createEmptyMovieClip("emptyMC", 0);
emptyMC._x = -130;
emptyMC._y = 60;

emptyMC.loadMovie("about.swf");
display = "101";
}
kglad
11/28/2006 3:40:37 PM
AddThis Social Bookmark Button