# Easy programmation execpt for me

**URL:** <https://forum.kirupa.com/t/easy-programmation-execpt-for-me/203101>\
**Category:** flash\
**Created:** [October 7, 2006, 4:40pm UTC](https://forum.kirupa.com/t/easy-programmation-execpt-for-me/203101 "2006-10-07T16:40:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xelaxam](https://avatars.discourse-cdn.com/v4/letter/x/5e9695/32.png) [@xelaxam](https://forum.kirupa.com/u/xelaxam)\
**Post date:** [October 7, 2006, 4:40pm UTC](https://forum.kirupa.com/t/easy-programmation-execpt-for-me/203101/1 "2006-10-07T16:40:21Z")

</div>

Okay here we start. (I’m sure that’s totally easy to do but i’m not the best in action script)

So first on all on my scene there is a mc called building\_mc and another mc called chance\_mc.

In the building\_mc there is 24 button (all the windows; named bt1 … bt2 till bt24 ) and the are working.  
In my chance\_mc I put a dynamic text field that I call chance (instance name).

I put a little programmation on

set (chance,4);  
if (chance=4) {this.chance\_mc.\_alpha=0  
}  
else {this.chance\_mc.\_alpha=100  
}  
if (chance=1) {this.chance\_mc.\_gotoandStop(2);  
}  
if (chance=0) {gotoAndPlay(80);  
}

What I want to do is quite simple, I want that when to click on a button (bt1 for exemple), it set the to chance - 1 (for now 3) and until 0 and then you go to the frame 80.

Also my button have 5 frame (on,over,down,hit, 5) is that possible to set the button that after you click on it stay on the frame 5??

Thanks a lot

Xelaxam
