# Transform createEmptyMovieClip() in AS3

**URL:** <https://forum.kirupa.com/t/transform-createemptymovieclip-in-as3/328619>\
**Category:** flash\
**Created:** [May 31, 2012, 6:21am UTC](https://forum.kirupa.com/t/transform-createemptymovieclip-in-as3/328619 "2012-05-31T06:21:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tt405](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@tt405](https://forum.kirupa.com/u/tt405)\
**Post date:** [May 31, 2012, 6:21am UTC](https://forum.kirupa.com/t/transform-createemptymovieclip-in-as3/328619/1 "2012-05-31T06:21:59Z")

</div>

Hello guys!

I have the following AS2 code: (which I’m trying to transform in AS3)

public function createGrassBlade(mc)  
{  
var grass = [];  
var grassinst = grass.length;  
var thegrass = mc.createEmptyMovieClip(“grass” + grassinst, grassinst);  
grass.push(thegrass);

//mc is an empty movie clip placed on the stage with coordinates x = 0 and y = 800

Now, this is my AS3 course code:

public function createGrassBlade(mc)  
{  
var grass:Array = [];  
var grassinst = grass.length;  
var thegrass:MovieClip = new MovieClip();  
thegrass.name = “grass” + grassinst;  
addChild(thegrass);  
grass.push(thegrass);

Please, tell me where I wrong. My objects (witch are many grass objects, drawing with other function) are appearing on the stage but with the wrong coordinates and I can see only the bottom part of them.  
I change ‘mc’ movie clip coordinates to change grass objects position (and this always works in AS2), but nothing happens in AS3.

best regards and thanks in advance,  
Tina
