# Why does this create movie clip work?

**URL:** https://forum.kirupa.com/t/why-does-this-create-movie-clip-work/170734
**Category:** Uncategorized
**Created:** [November 29, 2005, 4:42am UTC](https://forum.kirupa.com/t/why-does-this-create-movie-clip-work/170734 "2005-11-29T04:42:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![billiebunny](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@billiebunny](https://forum.kirupa.com/u/billiebunny)
#### Post date: [November 29, 2005, 4:42am UTC](https://forum.kirupa.com/t/why-does-this-create-movie-clip-work/170734/1 "2005-11-29T04:42:40Z")

</div>

**This works when not in the fuction. But when I put in a button release function it does not work.**

**two\_btn.onRelease = function() {  
this.createEmptyMovieClip(“triangle\_mc”, 1);  
triangle\_mc.beginFill(0x0000FF, 90);  
triangle\_mc.lineStyle(5, 0x0000FF, 10);  
triangle\_mc.moveTo(200, 200);  
triangle\_mc.lineTo(300, 300);  
triangle\_mc.lineTo(100, 300);  
triangle\_mc.lineTo(200, 200);  
triangle\_mc.endFill();  
};**
