how to convert movieClip graphics to string

hi
i draw many movieClip at runtime with as3 and i want to save the movieclips graphics
as string or xml data. how can i do that?
i use toString() method of graphics but i get an error

var s:MovieClip=new MovieClip();
s.graphics.beginFill(0);
s.graphics.drawCircle(0,0,20);
addChild(s);
trace(s.graphics.toString())

error:
1061: Call to a possibly undefined method toString through a reference with static type flash.display:Graphics.

I think you want to use the ‘graphics data’-related functions:

http://help.adobe.com/en_US/as3/dev/WS749610B4-4709-4f75-BBA0-650BF52623CA.html

2 Likes

Thank you very much