Groups | Blog | Home
all groups > flash data integration > april 2005 >

flash data integration : attachMovie-createEmptyMovieClip-loadMovie


cloudyadjectives
4/20/2005 3:47:20 PM
Hi there,
I have some troubles in Flash MX

in my Movie :

_root.main. I attach a MC called "InfoWin"
in this I create a MovieClip called "vr"
and in this "vr" - MC I load a movie with loadMovie("empty.swf")

Already is working right now to this point.

In my empty.swf I wanna call some variables from the parent movie and it
doesn't work

trace (_parent) gives me an undefined.
trace(this) gives me the right path : _root.main.InfoWin.vr
I have a variable in _root.main and this variable I need but I can't reached
it.
trace(_level0.main.Name); gives me an undefined

is there anyone who can explain this ?

if I made some variables as global it doesn't work.

greetz


patrick
Pilipo
4/20/2005 9:56:40 PM
Hi Patrick,

I tried this and it worked for me. Steps I took:

1) Created empty test.fla with a movieclip named "main" on the stage.
2) main has two AS commands:
var Name:String = new String("TestVar");
attachMovie("infoWin","infoWin",0);
3) infoWin has two AS commands:
createEmptyMovieClip("vr",0);
vr.loadMovie("empty.swf");
4) empty.swf has three AS commands:
trace(this);
trace(_parent);
trace(_parent._parent.Name);

The output I get is:

_level0.main.infoWin.vr
_level0.main.infoWin
TestVar

Don't know why it works for me and not you. Hope you figure it out!!
cloudyadjectives
4/21/2005 12:00:00 AM
Thanks for your help,
I'm a little bit confused, why I can't see the variables.
I try it in a new project, sometimes it helps. ;-)
Maybe I should try to use other depths.

AddThis Social Bookmark Button