# Controlling a text field with a seperate movieclip?!?

**URL:** <https://forum.kirupa.com/t/controlling-a-text-field-with-a-seperate-movieclip/217021>\
**Category:** Uncategorized\
**Created:** [February 22, 2007, 11:10am UTC](https://forum.kirupa.com/t/controlling-a-text-field-with-a-seperate-movieclip/217021 "2007-02-22T11:10:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bo\_doodle](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@bo\_doodle](https://forum.kirupa.com/u/bo_doodle)\
**Post date:** [February 22, 2007, 11:10am UTC](https://forum.kirupa.com/t/controlling-a-text-field-with-a-seperate-movieclip/217021/1 "2007-02-22T11:10:27Z")

</div>

Hi I wonder if anyone can help me on this annoying bit of script i am trying to figure out.

I have built a photogallery that loads images and text into an empty movieclip(picture) and textfields(desc\_txt, media\_txt & credit\_txt) from an XML file and displays thumbnails.

I would like to make the text invisble until you RollOver the image. 5 thought thsi would be quite simple but cannot get it to work.

below is the code i am using, with all the textfields placed in a movieclip with an instance of text\_mc. can somebody please point me out where i am going wrong or offer any advice, i am so close to the end of this project now its frustrating ther is only this little glitch and one other to fix and i will have done.

```
Code:
text_mc._alpha = 0;

```

picture.onRollOver = function() {  
picture.onEnterFrame = function() {  
if (text\_mc.\_alpha\<100 ) {  
text\_mc.\_alpha += 15 ;  
} else {  
text\_mc.\_alpha = 100;  
picture.onEnterFrame = null;  
}  
};  
};

picture.onRollOut = function() {  
picture.onEnterFrame = function() {  
if (text\_mc.\_alpha\>100) {  
text\_mc.\_alpha -= 15;  
} else {  
text\_mc.\_alpha = 100;  
picture.onEnterFrame = null;  
}  
};  
};
