Attach mc and load swf at same time?

Hy guys!
Does anyone knows if its possible, just in one button click, to attach a mc and loads a swf into this attached mc?
:wink:

Hey.
This is myself :slight_smile:
Yesss, I love when I can program by myself.
A little help from the debuging aaand…done!!!
Here it is:

on(release) {
_root.attachMovie(“loadswf”, “content”, 1);
setProperty(_root.content, _x, 0);
setProperty(_root.content, _y, 20);
_root.content.loadMovie(“arte/arte_trial.swf”, 1);

Now is the following question:
(this is still the button.enable = false doubt)
How can I check if the mc is loaded and then enable the buttons?

Now I know I can use the:
myMovieClip.onLoad

But I really need some help building the if statement.
If mc is loaded, enable buttons. If it`s not, disable them

Love Kirupa
Thanks

[AS]mymovieClip.onLoad = function(){
//set loaded variable
clipLoad = true;
//if statement
if(clipLoad){
myButton.enabled = true;
}else{
myButton.enabled = false;
}
}[/AS]

Hi Liam!
Is this correct?
I`m not sure where to put the code!?

  • “content” is the newName for the attached movieclip “loadswf”;
  • “this” refers to the movieclip I put the code (in this case, it`s the movieclip that contains all the buttons);
  • “avanca” is on of the buttons;

_level0.content.onLoad = function(){
//set loaded variable
clipLoad = true;
//if statement
if(clipLoad){
this.avanca.enabled = true;
}else{
this.avanca.enabled = false;
}
}