# How to query if a Sprite has had any shapes drawn in it?

**URL:** https://forum.kirupa.com/t/how-to-query-if-a-sprite-has-had-any-shapes-drawn-in-it/329595
**Category:** flash
**Created:** [September 19, 2012, 9:30pm UTC](https://forum.kirupa.com/t/how-to-query-if-a-sprite-has-had-any-shapes-drawn-in-it/329595 "2012-09-19T21:30:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![FlashUserNull](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@FlashUserNull](https://forum.kirupa.com/u/FlashUserNull)
#### Post date: [September 19, 2012, 9:30pm UTC](https://forum.kirupa.com/t/how-to-query-if-a-sprite-has-had-any-shapes-drawn-in-it/329595/1 "2012-09-19T21:30:32Z")

</div>

Consider the following:

```
   var mySprite:Sprite= new Sprite();
   addChild(mySprite);        
    trace(mySprite.graphics == null);
    //traces false        
    mySprite.graphics.beginFill(0x0000FF);
    mySprite.graphics.drawRect(0,0,100,100);
    mySprite.graphics.endFill();        
    trace(mySprite.graphics == null);
    //traces false        
    mySprite.graphics.clear();        
    trace(mySprite.graphics ==null);
    //traces false

```

the line of “mySprite.graphics==null” always proves false. So is there a way to determine if a Sprite has had something drawn (i.e. a line or a fill) in it.
