View Full Version : _visible = true?
Bebert
05-18-2001, 08:38 AM
Check this out.
On a new movie, I created a symbol named "test". I also included a little button - Now on the first frame, I placed an action for the button (on release)
setProperty("test", _visible , false);
right... and when I play the movie, it works fine, until I click the button - everything disappears. I mean, the button and the symbol.
Could someone please help me out.
I'm going nuts with this stupid problem.
Hi...
It sounds as though your placing your button in the test MC, if so then when you press it it will indeed remove the it as the button is in the MC. To remedy just place your button outside of the test MC:
on (release) {
_root.test._visible=false;
}
The above code is the Flash 5 version of your code.
Hope this heps.
Bebert
05-18-2001, 12:38 PM
Hey, thanks so much dudes -
Guess what? I found out what was wrong, as I was desperately fooling around with the symbol, I found out that there was nothing the Name property in the instance Panel (oh, man...) but hey, again thnx Marx and john89 for helping.
Now, there's another prob. I want to move a button using actionscript - but how!?!?
I mean, basically, when you create a button, you have to assign it a name, right?
If I name it say Test, how can I change its properties? I mean, can I directly access its properties using the name "Test" ? Like:
_root.Test._x = 200;
I tried this but it's not working...
I want to move my button... anyway, thnx again!
Hi..
You can only move a button if you first place it in a movie clip then you can target the MC's instance name.(When you give a button a name it doesn't allow you to target it, its just for reference in the library)
The following action is placed on a button that resides in the test MC:
on (release) {
_root.Test._x = 200;
}
Or you could use:
on (release) {
this._x = 200;
}
As 'this' refers to the MC the button is in.
Hope this helps.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.