# AS 2.0 problem setting alpha

**URL:** <https://forum.kirupa.com/t/as-2-0-problem-setting-alpha/313749>\
**Category:** flash\
**Created:** [September 8, 2010, 5:46pm UTC](https://forum.kirupa.com/t/as-2-0-problem-setting-alpha/313749 "2010-09-08T17:46:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben1996123](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@ben1996123](https://forum.kirupa.com/u/ben1996123)\
**Post date:** [September 8, 2010, 5:46pm UTC](https://forum.kirupa.com/t/as-2-0-problem-setting-alpha/313749/1 "2010-09-08T17:46:51Z")

</div>

Hi, this is my first post 🙂

So I recently started using flash AS 2.0 ~6 weeks ago when I was bored over summer. I decided to make a 2 player maze racing thing, but I am having a problem. What I plan to do is, once one player has finished use AS 2.0 to check if the other player has already finished, and if not, set the alpha of a big smiley face image to 100. This is the code I have at the moment which isn’t currently working (the code is put on the 2nd player. Instance names: player\_2\_end = the finishing point for player 2, thumbs\_up\_p1 and thumbs\_up\_p2 = the big smiley face picture with the alpha currently at 0 that I need to change to 100).

```auto
onClipEvent(enterFrame){
	if(_root.player_2_end.hitTest(this)){
		if(thumbs_up_p1._alpha=0){
			thumbs_up_p2._alpha=100
		}
	}
}

```

What do I need to change to get it to work:q:
