# Label a button generated by script (flash7)

**URL:** <https://forum.kirupa.com/t/label-a-button-generated-by-script-flash7/191289>\
**Category:** Uncategorized\
**Created:** [June 19, 2006, 12:37pm UTC](https://forum.kirupa.com/t/label-a-button-generated-by-script-flash7/191289 "2006-06-19T12:37:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunkudu](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@arunkudu](https://forum.kirupa.com/u/arunkudu)\
**Post date:** [June 19, 2006, 12:37pm UTC](https://forum.kirupa.com/t/label-a-button-generated-by-script-flash7/191289/1 "2006-06-19T12:37:25Z")

</div>

hi my frends

i changed moivie cilp to button. but unable to assign a text to it.  
can any one help me, please…

here is my code.  
i am very new to actionscripting.so please guide me.

this.createEmptyMovieClip(“but01”, 10);  
but01.beginFill(0x00CC33, 100);  
but01.moveTo(2, 4);  
but01.lineTo(116, 4);  
but01.lineTo(116, 17);  
but01.lineTo(2, 17);  
but01.lineTo(2, 4);  
//turning into a button.  
but01.hitArea = but01;

but01.onPress = function() {  
trace("on press! "+this.\_name);  
};  
but01.onRelease = function() {  
trace("on release! "+this.\_name);  
};  
but01.onRollOver = function() {  
trace("on rollover! "+this.\_name);  
};  
but01.onRollOut = function() {  
trace("on rollout! "+this.\_name);  
};

thankx in advance

cheri
