Dynamic Scene Change

I’m using a MovieClip to hold several buttons; which, when pressed should cause the _root element to change the scene to a specific scene.

The problem I am encountering however, is that


gotoAndPlay( scene:String, frame:Object):Void 

doesn’t seem to allow me to utilize a String variable
in leui of a phsyical string (i.e. var myvar = “hello”);

is there any way around this?

attached is the movieClip’s (internal) code (which resides on an empty layer named ‘Functions’):


var sceneName:String = new String("");

function SetSceneName( sceneName:String ):Void
{
    this.sceneName = sceneName;
}

function GetSceneName():String
{
    return sceneName;
}

each button within this movieClip calls:


on ( release )
{
   _root.gotoAndPlay( _parent.GetSceneName(), 1 );
}

but the error i continue to get is of no help.