Making a textfield invisible?


I’m trying to make it when you click on the Photos button the text field behind the movie clip which loads the gallery.swf invisible because I am using xml and would like for the textfield to be invisible because I’m also using the scroller component, I tried this code but it did not work:

butPhotos.onRelease = function() {
    mytextField._visible = false;
    myTextField.htmlText = text_4;
    myTitleText.htmlText = title_4;

Can I do this using code or is it easier to make a new frame and deleting the textfield and scroller and just on the butPhotos tell it to go to that frame and when you click on any other of the buttons which need to load in xml just tell it to go to the frame with the textfield and scroller on it.