<?xml version="1.0" encoding="UTF-8"?>
<rmml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="L:\collaborative-nir\program\Cscl3DWS\rmml\RMML.xsd">
	<composition _name="CImageButton" userEvents="onClick">
		<image _name="img" src="a">
			<script event="onRollOver">
				trace("RollOver["+this.parent.name+"]");
				this.parent.Active(true);
			</script>
			<script event="onRollOut">
				this.parent.Active(false);
			</script>
			<script event="onPress">
				trace("fireEvent(onClick);");
				this.parent.fireEvent("onClick");
			</script>
		</image>
		<script >
			this.active = false;
			if (this.imCount == undefined)
			{
				this.imCount = 2;
			}
			
			this.Active(false);

			function Active(val)
			{
				active = val;
				if(active)
					img.crop(img.getMediaSize().width/imCount, 0, img.getMediaSize().width/imCount, img.getMediaSize().height);
				else
					img.crop(0, 0, img.getMediaSize().width/imCount, img.getMediaSize().height);
			}
		</script>
	</composition>
	<composition _name="CVideoButton" class="CImageButton">
		<script >
			this.imCount = 3;
			img.crop(0, 0, img.getMediaSize().width/imCount, img.getMediaSize().height);

			function Active(val)
			{
				active = val;
				if(active)
					img.crop(img.getMediaSize().width/imCount, 0, img.getMediaSize().width/imCount, img.getMediaSize().height);
				else
					img.crop(0, 0, img.getMediaSize().width/imCount, img.getMediaSize().height);
			}
		</script>
	</composition>
</rmml>