# Flash CS3 (AS2) XML scrolling gallery help

**URL:** https://forum.kirupa.com/t/flash-cs3-as2-xml-scrolling-gallery-help/265918
**Category:** flash
**Created:** [July 14, 2008, 3:36pm UTC](https://forum.kirupa.com/t/flash-cs3-as2-xml-scrolling-gallery-help/265918 "2008-07-14T15:36:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pongskull\_mac\_c](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@pongskull\_mac\_c](https://forum.kirupa.com/u/pongskull_mac_c)
#### Post date: [July 14, 2008, 3:36pm UTC](https://forum.kirupa.com/t/flash-cs3-as2-xml-scrolling-gallery-help/265918/1 "2008-07-14T15:36:19Z")

</div>

Hello all,  
I’m making a scrolling gallery with videos and thumbnails loaded from XML. The gallery works but I can’t for the life of me figure out how to make the following thing happen:

[LIST]The selected thumbnail stay highlighted while the current video is playing[/LIST]

[LIST]Once the video is done playing, the thumbnail changes color. [/LIST]

Any help would be greatly appreciated. Here’s the thumbnail-specific code:

```auto
function thumbNailScroller() {
	this.createEmptyMovieClip("tscroller",1000);

	this.onEnterFrame = function() {

		if ((_xmouse>=(hit_right._x)) && (thumbnail_mc.hitTest(hit_right))) {
			thumbnail_mc._x -= scroll_speed;

		} else if ((_xmouse<=(hit_left._x)) && (thumbnail_mc.hitTest(hit_left))) {
			thumbnail_mc._x += scroll_speed;

		}
	};
}

function thumbnails_fn(k) {
	thumbnail_mc.createEmptyMovieClip("t"+k,thumbnail_mc.getNextHighestDepth());

	tlistener = new Object();
	tlistener.onLoadInit = function(target_mc) {
		target_mc._x = hit_left._x+(target_mc._width+5)*k;
		target_mc.pictureValue = k;
		target_mc.onRelease = function() {
			target_mc.filters = [gf];
			pausePlay.gotoAndStop(1);
			netStream.play(clip[k],1);
			playVid = true;
			texty.desc_txt.text = " ";
			texty._alpha = 0;
			p = this.pictureValue;
			this._alpha = 0;
			var colorTrans:ColorTransform = new ColorTransform();
			colorTrans.redOffset = -130;
			colorTrans.greenOffset = -80;
			colorTrans.blueOffset = 0;
			var trans:Transform = new Transform(this);
			trans.colorTransform = colorTrans;
			target_mc.filters = [];
		};
		

		target_mc.onRollOver = function() {
			texty._alpha = 100;
			texty._x = _xmouse;
			texty.desc_txt.text = description[k];
			target_mc.filters = [gf];
		};

		target_mc.onRollOut = function() {
			texty.desc_txt.text = " ";
			texty._alpha = 0;
			target_mc.filters = [];
		};
	};

	image_mcl = new MovieClipLoader();
	image_mcl.addListener(tlistener);
	image_mcl.loadClip(thumbnails[k],"thumbnail_mc.t"+k);

}

```
