# Couple of questions concerning buttons and AS

**URL:** <https://forum.kirupa.com/t/couple-of-questions-concerning-buttons-and-as/32669>\
**Category:** flash\
**Created:** [October 9, 2003, 5:48pm UTC](https://forum.kirupa.com/t/couple-of-questions-concerning-buttons-and-as/32669 "2003-10-09T17:48:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedaykin](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fedaykin](https://forum.kirupa.com/u/fedaykin)\
**Post date:** [October 9, 2003, 5:48pm UTC](https://forum.kirupa.com/t/couple-of-questions-concerning-buttons-and-as/32669/1 "2003-10-09T17:48:58Z")

</div>

Hi,

1. I’ve got a button with the following as on it:

[AS]on (rollOver) {  
if (this.exhibit.\_alpha != 100) {  
this.exhibit.\_alpha += 20;  
} else {  
this.exhibit.\_alpha = 100;  
}  
}[/AS]

I am trying to get it to fade in to 100 Alpha…but it just jumps to 20. How can I get it to fade in at a speed of 20.

1. I’ve got a mc that was previously a button with the following code on it:

[AS]on (release) {  
\_root.changePhoto(1);  
this.txtIndex = this.pIndex+1;  
}[/AS]

When it was a buttons it would change the variable no problem…now that is it a movie clip is performs the function but won’t change the var??

Much thanks.
