-
How to do this with Buttons
I am facing two problems with buttons :
1) My button is at _root level. It is not having any instance name, so writing code on frame is not possible. I want to make it invisible as soon as the player loads.
If it were a movie clip then i would have written
onClipEvent(load)
{
this._visible = false ;
}
But their is no load event for button...
2) The second problem is similar. Now instead of making invisible at load of the player, i want the button to be invisilbe at it's click event. So i write :
on(press)
{
this._visible = false ;
}
But this doesnot work, instead the _root gets invisible. What's the way out ?
Thanks. .
[ *NOTE: I cannot write code on frames, as i have not given any instance name to the objects. ]
-
FK'n_dog
you must use an instance name (btn) -
btn.onPress = function(){ btn._visible = false; }
NOTE: I cannot write code on frames
why ever not ???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|