|
-
Hold button downstate
Hi there,
I have another question about this button script: Currently, when a button is in it's down-state, the AS disables the button. But since it needs to be active, i have to find a way to make the current 'down' button remain down during onRollOver and onRollOut.
button.onRollOver = function() {
this.over_holder._alpha = 100;
this.down_holder._alpha = 0;
};
//
button.onRollOut = function() {
this.over_holder._alpha = 0;
this.down_holder._alpha = 0;
};
//
button.onRelease = function() {
if (isSlecetd_btn != null) {
isSlecetd_btn.enabled = true;
isSlecetd_btn.over_holder._alpha = 0;
isSlecetd_btn.down_holder._alpha = 0;
trace("Release Button = "+isSelectd)
}
//Hold Over state.
this.over_holder._alpha = 0;
this.down_holder._alpha = 100;
isSlecetd_btn = this;
isSlecetd_btn.enabled = false;
trace("this = "+this);
};
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
|