Search code examples
actionscript-3flashbox2dskin

Flash QuickBox2d skinMc.gotoAndPlay(1);


I have this quickBox2d code to add a cricle to the stage:

var ball:QuickObject = sim.addCircle( {skin:skinMc, x:10, y:10, radius:3, density:0 } );

The skinMc contains animations so I want to be able to refer to it like this: skinMc.gotoAndPlay(5); but it says

Type Coercion failed: cannot convert skinMc$ to flash.display.MovieClip.

ball.gotoAndPlay(5); doesn't work either since it's a QuickObject, not an mc...

Any help will be appreciated

Thanks


Solution

  • ball.userData.gotoAndPlay(5);
    

    userData will be a DisplayObject populated by QuickBox2D.