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?
Hey.
This is myself
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;
}
}