# Highlight Box

**URL:** https://forum.kirupa.com/t/highlight-box/173157
**Category:** flash
**Created:** [December 21, 2005, 7:26pm UTC](https://forum.kirupa.com/t/highlight-box/173157 "2005-12-21T19:26:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mkohne](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mkohne](https://forum.kirupa.com/u/mkohne)
#### Post date: [December 21, 2005, 7:26pm UTC](https://forum.kirupa.com/t/highlight-box/173157/1 "2005-12-21T19:26:39Z")

</div>

Hello.

I have a flash movie where I want to have the ability to highlight text. I have a movie clip of a 50% yellow transparent box using the following code:

```auto
box.onMouseDown = function() {
	this._x = _root._xmouse;
	this._y = _root._ymouse;
	this._xscale = this._yscale=0;
	this._visible = true;
	this.onMouseMove = function() {
		this._xscale = _root._xmouse-this._x;
		this._yscale = _root._ymouse-this._y;
		updateAfterEvent();
	};
};
box.onMouseUp = function() {
	delete this.onMouseMove;
	this._visible = true;
}
}

```

This works great, but I need to be able to draw more than one highlight box, and I need these boxes to attach themselves to a specifc mc so that they move along with it. Hope this makes sense. Any help would be much appreciated.
