Hi , i posted something earlier but it looks like my post was too complex and long so i made a second version of it using shorter example:
I have a loaded .swf menu. This menu is loaded in my Main file on the first frame.
I load it inside a [COLOR=#0000ff]MovieClip [/COLOR]called [COLOR=seagreen]“mastermc” [/COLOR][COLOR=black](I created this one by hand on the stage)[/COLOR]
i also create, within the script, a [COLOR=blue]MovieClip[/COLOR][COLOR=blue] [/COLOR]called [COLOR=seagreen]“vidmc”[/COLOR] , and place it using the
[COLOR=blue]AddChildAt [/COLOR], so i make sure it is UNDER the menu (which is put on an upper level using the same function) Thus:
mastermc.[COLOR=blue]addChildAt/COLOR; // <----- my background
mastermc.[COLOR=blue]addChildAt/COLOR;
mastermc.[COLOR=blue]addChildAt/COLOR;
i have a .as file that contains a function called [COLOR=seagreen]“addvideo”[/COLOR] that will play a .flv file in the [COLOR=#0000ff][COLOR=#2e8b57]“vidmc” [/COLOR]MovieClip [/COLOR]that is given in the parameters as reference.
Problem:
I am trying to call (from the button in my menu.swf) the [COLOR=seagreen]“addvideo”[/COLOR] function putting in the parameters “vidmc” which is a [COLOR=blue]MovieClip[/COLOR] located inside [COLOR=#2e8b57]“mastermc”[/COLOR] which is on the stage of my main file.
So this is the code in my menu.swf in the button. (It is a movieclip containing a button).
var par:MovieClip = MovieClip(this.parent.mastermc.vidclip);
function JabDfn(event:MouseEvent):void
{
gotoAndStop(1);
var newclass:technotest = new technotest;
newclass.addvideo(par, "Jab", "toto.mp3");
}
It doesnt work. Of course it gives me an error when i start publish my menu.swf because it doesn’t even know there is another movieclip called mastermc and vidmc because they’re in the other .swf file.