# How to disable functions?

**URL:** <https://forum.kirupa.com/t/how-to-disable-functions/220884>\
**Category:** Uncategorized\
**Created:** [March 30, 2007, 3:42am UTC](https://forum.kirupa.com/t/how-to-disable-functions/220884 "2007-03-30T03:42:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunson](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@Hunson](https://forum.kirupa.com/u/Hunson)\
**Post date:** [March 30, 2007, 3:42am UTC](https://forum.kirupa.com/t/how-to-disable-functions/220884/1 "2007-03-30T03:42:22Z")

</div>

say i came up with a function like this:

[AS]  
function addSnowflake():Void {  
var depth:Number = this.getNextHighestDepth();  
var snowflakeClip:MovieClip = this.attachMovie(“circle”, “snowflakeClip”+depth, depth);  
var scaleFactor:Number = Math.random()\*80+20;  
}  
[/AS]

how do i disable it with a press of a button?

umm, if you guys are kind enough, how do you think i can control the number of snowflakes…

thanks and please help!
