Hi
I am trying to create a button that when pressed will make an movie clip visible and set it to a specific position on the screen. When this same button is pressed a second time the movie clip will become invisible. any ideas?
Hi
I am trying to create a button that when pressed will make an movie clip visible and set it to a specific position on the screen. When this same button is pressed a second time the movie clip will become invisible. any ideas?
on(Release) {
if(_root.mcInstanceName._visible==false) {
_root.mcInstanceName._visible=true
} else {
_root.mcInstanceName._visible=false
}
}
I just wanted to add to Jsk’s code above, if you want it to be set to a certain cordinate on the stage then you’ll need to specify the x and y properties so the code would now look like this:
on (release) {
if (_root.mcInstanceName._visible == false) {
_root.mcInstanceName._visible = true;
_root.mcInstanceName._x = 50;
_root.mcInstanceName._y = 50;
} else {
_root.mcInstanceName._visible = false;
}
}
Just change the numbers to whatever you want. =)
:: Copyright KIRUPA 2024 //--