# Code striaght from Help File?

**URL:** <https://forum.kirupa.com/t/code-striaght-from-help-file/129647>\
**Category:** Uncategorized\
**Created:** [November 26, 2004, 12:25pm UTC](https://forum.kirupa.com/t/code-striaght-from-help-file/129647 "2004-11-26T12:25:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Vulcan](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/the_vulcan/32/145_2.png) [@The\_Vulcan](https://forum.kirupa.com/u/The_Vulcan)\
**Post date:** [November 26, 2004, 12:25pm UTC](https://forum.kirupa.com/t/code-striaght-from-help-file/129647/1 "2004-11-26T12:25:23Z")

</div>

This is straight from the MX help fill but doesn’t work…

Can anyone tell me why ?

```auto
_root.createEmptyMovieClip( &quot;grad&quot;, 1 );
                with ( _root.grad )
  
                {
  
                colors = [0xFF0000, 0x0000FF];
                alphas = [100, 100];
                ratios = [0, 0xFF];
                matrix = { matrixType:&quot;box&quot;, x:100, y:100, w:200, h:200, r:(45/180)*Math.PI }; 
                beginGradientFill( &quot;linear&quot;, colors, alphas, ratios, matrix );
                moveto(100,100);
                lineto(100,300);
                lineto(300,300);
                lineto(300,100);
                lineto(100,100);
                endFill();
                }

```
