How to use if(GUI.Button with Flash?

function OnGUI () {
if (GUI.Button(Rect(Screen.width/2-64,Screen.height/2+80,128,32),“OK”)){
//do something
}
}

In the editor, it works and a button is shown, when exported to a swf, the button doesn’t show up anymore… What do to?

Is noone using GUI elements in Flash?