Box2d sample error

Hi, while trying the box2d sample, i am getting the error in class : B2DebugDraw.hx :
You cannot access the flash package while targeting cross ( for flash.display.Sprite)

Showing a red line under the line :
import box2d.dynamics.B2DebugDraw;

What needs to be corrected here ?

Are you using it with openfl, with a normal project.xml => openfl build?

Because that shouldn’t happen in that case.

Hi,

I’m working with box2D too, works fine with Flash (and android), everything is ok with the DebugMode. Make sure you have not forget the reference in the project.xml

<haxelib name="box2d" />

OpenFL 3.6.1 for me

Thanks.
Got it working now. Didnot make any correction though. No idea why it was giving that error. Tested the files again today, and got it compiled without errors.