View Full Version : Attach mc and load swf at same time?
Felipe Bastos
May 19th, 2003, 08:37 PM
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?
;)
Felipe Bastos
May 19th, 2003, 09:05 PM
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
liam
May 20th, 2003, 06:33 PM
mymovieClip.onLoad = function(){
//set loaded variable
clipLoad = true;
//if statement
if(clipLoad){
myButton.enabled = true;
}else{
myButton.enabled = false;
}
}
Felipe Bastos
May 20th, 2003, 08:01 PM
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;
}
}
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.