Not going to new frame in JS function
So I have a movieclip with 3 frames and when I call the instance from the library (as shown below) it's not switching to the desired frame. The ultimate goal is to have multiple instances with random frames chosen, but it is currently not chosing any other frame. I have tested this by adding the object to the stage and it works fine, just not when I'm calling it from the library.
function testInit(){
var star = new lib.star();
star.gotoAndStop(1); //this does nothing?
star.x = 346;
star.y = 386;
stageRoot.addChild(star); // stageRoot = this
}
testInit();

