# How do I access the product of drawGraphicsData()?

**URL:** <https://forum.kirupa.com/t/how-do-i-access-the-product-of-drawgraphicsdata/305234>\
**Category:** Uncategorized\
**Created:** [February 22, 2010, 2:15am UTC](https://forum.kirupa.com/t/how-do-i-access-the-product-of-drawgraphicsdata/305234 "2010-02-22T02:15:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [February 22, 2010, 2:15am UTC](https://forum.kirupa.com/t/how-do-i-access-the-product-of-drawgraphicsdata/305234/1 "2010-02-22T02:15:06Z")

</div>

EDIT - Solved. PLEASE ignore.

If I use the code below I end up with a square. Good. But how do I access that square? say to change its x and y values, or even just to make it a child of a sprite?

taken from [http://help.adobe.com/en\_US/AS3LCR/Flash\_10.0/flash/display/Graphics.html#drawGraphicsData()](http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Graphics.html#drawGraphicsData())

```auto
 // establish the fill properties
    var myFill:GraphicsGradientFill = new GraphicsGradientFill();
    myFill.colors = [0xEEFFEE, 0x0000FF];
    myFill.matrix = new Matrix();
    myFill.matrix.createGradientBox(100, 100, 0);
 
    // establish the stroke properties
    var myStroke:GraphicsStroke = new GraphicsStroke(2);
    myStroke.fill = new GraphicsSolidFill(0x000000);
 
    // establish the path properties
    var myPath:GraphicsPath = new GraphicsPath(new Vector.<int>(), new Vector.<Number>());
    myPath.commands.push(1,2,2,2,2);
    myPath.data.push(10,10, 10,100, 100,100, 100,10, 10,10);
 
    // populate the IGraphicsData Vector array
    var myDrawing:Vector.<IGraphicsData> = new Vector.<IGraphicsData>();
    myDrawing.push(myFill, myStroke, myPath);
 
    // render the drawing 
    graphics.drawGraphicsData(myDrawing);

```

Thank you for your consideration,

S.

EDIT - just change the line to someSprite.graphics.drawGraphicsData(myDrawing);
