# Fade out onrelease

**URL:** <https://forum.kirupa.com/t/fade-out-onrelease/147200>\
**Category:** Uncategorized\
**Created:** [May 8, 2005, 7:11am UTC](https://forum.kirupa.com/t/fade-out-onrelease/147200 "2005-05-08T07:11:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![i\_will\_learn\_fl](https://avatars.discourse-cdn.com/v4/letter/i/b487fb/32.png) [@i\_will\_learn\_fl](https://forum.kirupa.com/u/i_will_learn_fl)\
**Post date:** [May 8, 2005, 7:11am UTC](https://forum.kirupa.com/t/fade-out-onrelease/147200/1 "2005-05-08T07:11:13Z")

</div>

Ok. I need some actionscript help. I have a movieclip called ball. the instance name is ball. I also have a button. This is all on Scene 1. What I want is that when I release the button the ball should start fading out.  
I tried this code:

```auto

on(release) {
	var speed = 10;
	_root.ball._alpha -= speed
}

```

But when I try this out every time I click the button the ball’s alpha goes down by 10 and I have to keep on clicking. WHat should I do that when I click the button the box just fades out by tens.
