# Morphing shapes CODE

**URL:** <https://forum.kirupa.com/t/morphing-shapes-code/133501>\
**Category:** Uncategorized\
**Created:** [January 9, 2005, 6:25am UTC](https://forum.kirupa.com/t/morphing-shapes-code/133501 "2005-01-09T06:25:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![egoldy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/egoldy/32/385_2.png) [@egoldy](https://forum.kirupa.com/u/egoldy)\
**Post date:** [January 9, 2005, 6:25am UTC](https://forum.kirupa.com/t/morphing-shapes-code/133501/1 "2005-01-09T06:25:37Z")

</div>

hey.

this is the code on [actionscript.org](http://actionscript.org) tuts  
[http://www.actionscript.org/tutorials/advanced/Dynamic\_masking\_using\_the\_drawing\_API\_II/index.shtml](http://www.actionscript.org/tutorials/advanced/Dynamic_masking_using_the_drawing_API_II/index.shtml)

when I test it ,I found it can works fine when i publish for player 6,  
how can I make it work fine when i publish for player 7.

```auto
//Create movie clip and mask
//counter = -1;
_root.createEmptyMovieClip('line', 0);
animInt = setInterval(doAnim, 17);
animDir = 1;

function doAnim()
{
        var currMC = _root.line;
        var time = animIndex/60;
        var dist = time;
        with(currMC)
        {
                //Coords for the C shape: (150, 25), (25,100), (150,175)
                //Coords for the J shape: (150, 25), (125,200), (50,125)
                clear();
                lineStyle(0x000000);
                moveTo(150,25);
                curveTo(25+100*dist,100+100*dist,150-100*dist, 175-50*dist);
        }
        
        animIndex += animDir;
        if(animIndex >= 60)
        {
                animDir = -1
        }
        if(animIndex <= 0)
        {
                animDir = 1
        }
}

```
