Hey all,
I want to change the alpha of a thumbnail after it has been pressed, to indicate that the user has clicked it.
However, I also am changing the alpha when the user hovers over it and On Mouse Out. I’ve tired this:
[AS]on (press){
this._alpha -= 50;
}
[/AS]
What seems to happen here is that if the user clicks on it again, it can’t be seen.
A problem with the below code it, On Mouse over, it fades it by 50. Then, On Click, it disappears. Then, on mouse out, it fades back to 100.
[AS]on (press){
this._alpha -= 50;
}
onClipEvent (load) {
this._alpha = 100;
}
onClipEvent (enterFrame) {
function fadeOut() {
if (this._alpha>50) {
this._alpha -= 50;
} else {
this.onEnterFrame = null;
}
}
function fadeIn() {
if (this._alpha<100) {
this._alpha += 50;
} else {
this.onEnterFrame = null;
}
}
this.onRollOver = function() {
this.onEnterFrame = fadeOut;
};
this.onRollOut = function() {
this.onEnterFrame = fadeIn;
};
}[/AS]
Thanks for your help. I’d be shagged if it wasn’t for this forum, you are a great help. I appreciate every reply,
Cheers,
Brian