# Change alpha of movieclip on button click

**URL:** https://forum.kirupa.com/t/change-alpha-of-movieclip-on-button-click/319443
**Category:** Uncategorized
**Created:** [February 21, 2011, 7:10am UTC](https://forum.kirupa.com/t/change-alpha-of-movieclip-on-button-click/319443 "2011-02-21T07:10:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pravingate07](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@pravingate07](https://forum.kirupa.com/u/pravingate07)
#### Post date: [February 21, 2011, 7:10am UTC](https://forum.kirupa.com/t/change-alpha-of-movieclip-on-button-click/319443/1 "2011-02-21T07:10:33Z")

</div>

hii, i am developing one small imteractive game.in that i’m getting one difficulty.

Difficulty is: i want to play a moviclip whenever i 'll click on button ,and .For that i hav applied logic in following way.

function onMouseClick(event:MouseEvent):void  
{

```
this.alpha=0; (alpha of 1st movieclip will 0 )
quack.alpha =1; (alpha of 2nd movieclip will 1 )(quack is instance name of 2nd movieclip that i need to call)
 
 }
 
 function onOut(event:MouseEvent):void 
 {        
   quack.alpha = 0; (alpha of 2nd movieclip will 0 )
   this.alpha=1; (alpha of 1st movieclip will 1 )

 }    

```

whenever i’am clciking on first movieclip(btn), it definitly goes to 0(i.e off), but 2nd movieclip(instance name “alpha”) is not coming to 1.

is this my logic is correct? what shoud i do to solve this problem?
