View Full Version : button and loadMovie help
soundgarden
07-21-2003, 03:03 PM
I have a button that loads a movie into the main movie using loadMovie. After teh movie loads I want that button (which loaded the movie) to become disabled. IN other words whenever I click the button after the movie loads the movie reloads. I don't want that.
Sualdam
07-21-2003, 03:12 PM
If you are using MX you can use:btnName.enabled = false;btnName is an instance name (naming buttons is unique to MX pending any other MX versions :)).
soundgarden
07-22-2003, 09:45 AM
i am not sure where to implement it. At the end of the movie clip?
Is there another way?
soundgarden
07-22-2003, 09:46 AM
Where do I put the script?
Sualdam
07-22-2003, 09:50 AM
Anywhere you want that logic indicates is good :)
At the point where you want the button to become inactive seems like a good choice in most cases.
So, assuming you have a button to load a movie:on(release){
loadMovie("movie.swf","clipname");
btnName.enabled = false;
}I think you could also use 'this.enabled = false;' - Im not at a Flash PC.
soundgarden
07-22-2003, 09:59 AM
Never Mind I figured it out.
I had four buttons(homeBtn,bioBtn,articlesBtn, and westBtn).
On the loaded MC (bio.swf) on the last frame I put
stop();
_root.bioBtn.enabled = false;
And on the main movie i put this script on the homBtn button:
on (release) {
_root.emptyMC.unLoadMovie();
_root.bioBtn.enabled = true;
_root.articlesBtn.enabled = true;
_root.westBtn.enabled = true;
}
I would like to know though if there is an easier way?
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.