Shorthand if statement



if (myBoolean){
    mc.gotoAndStop(2);
}

is there a way to shorten it to something like:

myBoolean ? mc.gotoAndStop(2);

i know how to assign a variable shorthand


var myNumber:uint = myBoolean? 1:2;