# Creating textfield on rollover action

**URL:** <https://forum.kirupa.com/t/creating-textfield-on-rollover-action/159498>\
**Category:** Uncategorized\
**Created:** [August 18, 2005, 12:04am UTC](https://forum.kirupa.com/t/creating-textfield-on-rollover-action/159498 "2005-08-18T00:04:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![developmental](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@developmental](https://forum.kirupa.com/u/developmental)\
**Post date:** [August 18, 2005, 12:04am UTC](https://forum.kirupa.com/t/creating-textfield-on-rollover-action/159498/1 "2005-08-18T00:04:24Z")

</div>

[size=1]Attempting to create a textfield on the rollover of a mc. The field is created but requires that you roll over a second time for it to be created. If anyone can come up with a alternate method so that on rollover the textfield & arrow mc are visible and on rollout they disappear. I played with \_visible and I couldn’t get it to work. Any help is greatly appreciated.

```auto
stop();
 this.onEnterFrame = function() {
 	if (rewind == true) {
 		prevFrame();
 	}
 };
 this.hit.onRollOver = function() {
 	rewind = false;
 	play();
 	attachMovie("arrow", "arrow", 0);
 	arrow._x = 0;
 	arrow._y =-10;
 	this._parent.createTextField("my_txt", 1, xpos, -35, width, 18);
 	width = 64;
 	xpos = -32;
 	my_txt.autosize = true;
 	my_txt.type = "dynamic";
 	my_txt.border = false;
 	my_txt.background = true;
 	var my_fmt:TextFormat = new TextFormat();
 	my_fmt.color = 0x993300;
 	my_fmt.font = "Verdana";
 	my_fmt.size = 12;
 	my_fmt.bold = false;
 	my_txt.text = "Flag Text";
 	my_txt.setTextFormat(my_fmt);
 };
 this.hit.onRollOut = function() {
 	rewind = true;
 	removeMovieClip("my_txt");
 	removeMovieClip("arrow");
 };
 

```

Files:  
[blurb.swf](http://www.130public.net/test_area/blurb)  
[blurb.fla](http://www.130public.net/test_area/blurb/blurb.zip)[/size]
