|
-
Senior Member
[RESOLVED] loadMovie("my.swf")
Hello,
I am trying to load a SWF file into another one. In the main one I have this:
PHP Code:
web.loadMovie("webb.swf");
In webb.swf I have this:
PHP Code:
var i:Number;
for (i=0; i<4; i++){
attachMovie("title","web"+i,10+i);
_root["web"+i]._x = 20;
_root["web"+i]._y = 20+20*i;
}
But when I open the main swf and it loads webb.swf, the movie clips of webb.swf are not displaying as I am trying to make them display.
In other words, why are not the MCs in their x and y place?
-
Developing For Dunkets
You're using _root, which is wrong. Swf's have their own levels. the _root of a swf is level_0. But, if you load a swf into another swf your _root of the loaded swf is now level_1, but _root still points to level_0. Try this:
var i:Number;
for (i=0; i<4; i++){
var a:MovieClip = attachMovie("title","web"+i,10+i);
a._x = 20;
a._y = 20+20*i;
}
-
Senior Member
Thanks a lot for the script, it works perfect, and for the level trick.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|