I’m getting the following error: Incorrect number of arguments. Expected 2 tf.__draw(ctx);
From here: }else if(param1 is TextField){ var tf:TextField = param1 as TextField; tf.__draw(ctx); Which seems to be expecting a Matrix: public function __draw(ctx:CanvasRenderingContext2D, m:Matrix):void{ for (var i:int = 0; i < lines.length;i++ ){ SpriteFlexjs.renderer.renderText(ctx, lines[i], defaultTextFormat, m, worldAlpha, blendMode, transform.colorTransform, 0, i * int(defaultTextFormat.size)); } } Are you getting some other error? This seems to be a pretty straight-foward bug in your code. Harbs On May 21, 2016, at 10:04 PM, lizhi <s...@qq.com> wrote: > pls, > https://github.com/mmauri/spriteflexjs/blob/master/test/src/TestBitmapDraw.as#L62 > > > > -- > View this message in context: > http://apache-flex-development.2333347.n4.nabble.com/why-can-not-open-this-code-tp53169p53178.html > Sent from the Apache Flex Development mailing list archive at Nabble.com.