# Menu left-right

**URL:** <https://forum.kirupa.com/t/menu-left-right/264504>\
**Category:** flash\
**Created:** [June 26, 2008, 5:59pm UTC](https://forum.kirupa.com/t/menu-left-right/264504 "2008-06-26T17:59:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![qpixo](https://avatars.discourse-cdn.com/v4/letter/q/c4cdca/32.png) [@qpixo](https://forum.kirupa.com/u/qpixo)\
**Post date:** [June 26, 2008, 5:59pm UTC](https://forum.kirupa.com/t/menu-left-right/264504/1 "2008-06-26T17:59:08Z")

</div>

does anyone has any examples to do a left and right menu with autohide?

---

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [June 27, 2008, 12:39am UTC](https://forum.kirupa.com/t/menu-left-right/264504/2 "2008-06-27T00:39:05Z")

</div>

Elaborate your question, that means nothing to us 🙂

---

<div class="post-metadata">

**Author:** ![qpixo](https://avatars.discourse-cdn.com/v4/letter/q/c4cdca/32.png) [@qpixo](https://forum.kirupa.com/u/qpixo)\
**Post date:** [June 27, 2008, 5:32am UTC](https://forum.kirupa.com/t/menu-left-right/264504/3 "2008-06-27T05:32:53Z")

</div>

ok here’s what I did so far. Now, I want to add slide rolling from left to right depending my mouseX or mouseY. How can you do that?

Here’s my code:

```auto

import mx.utils.Delegate;
import caurina.transitions.Tweener;

class slideImages
{
	private var tabImages:Array;
	private var scopeMC:MovieClip;

	
	private var IMG_SPACE:Number = 15;
	
	public function slideImages(scope:MovieClip)
	{
		scopeMC = scope;
		createThumbsMC();
		addEventsToImages();
	}
	
	private function createThumbsMC():Void
	{
		tabImages = new Array(10);
		
		var tabImagesLength:Number = tabImages.length;
		var xPos:Number = 15;
		var yPos:Number = 65;
		
		for (var i:Number=0; i < tabImagesLength; i++)
		{
			var container:MovieClip = scopeMC.imgSlideMC.attachMovie("imageMC", "imageMC"+i, scopeMC.imgSlideMC.getNextHighestDepth(), { width: 110.5, height: 65 });
			container._x = xPos;
			xPos += container.width + IMG_SPACE;
			container._y = yPos;
			
			Tweener.addTween(container, { _alpha: 50 });
			addEventsToImages(container);
			
			
			
		}
	}
	
	private function addEventsToImages(container:MovieClip):Void
	{
		container.onRelease = Delegate.create(container, handleImageClick);
		container.onRollOver = Delegate.create(container, handleImageOver);
		container.onRollOut = Delegate.create(container, handleImageOut);
	}
	
	
	private function handleImageClick():Void
	{
		trace("click");

	}

	private function handleImageOver(container:MovieClip):Void
	{
		Tweener.addTween(this, { _alpha: 100, time:1 });
		Tweener.addTween(this, { _xscale: 120, _yscale: 120, time:1.5 });
	}

	private function handleImageOut():Void
	{
		Tweener.addTween(this, { _alpha: 50, time:1 });
		Tweener.addTween(this, { _xscale: 100, _yscale: 100, time:1.5 });
	}

	
	
}

```

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 27, 2008, 8:17am UTC](https://forum.kirupa.com/t/menu-left-right/264504/4 "2008-06-27T08:17:52Z")

</div>

class are evil 😛

create a variable on the main swf with ymouse and xmouse, then listern \_root.ymouse in the class

there are tuts on this stuff allover the shot

---

<div class="post-metadata">

**Author:** ![qpixo](https://avatars.discourse-cdn.com/v4/letter/q/c4cdca/32.png) [@qpixo](https://forum.kirupa.com/u/qpixo)\
**Post date:** [June 27, 2008, 11:46am UTC](https://forum.kirupa.com/t/menu-left-right/264504/5 "2008-06-27T11:46:48Z")

</div>

Most of them used xml to store external images but I only need an array to do  
If you know any good one please let me know

ps: I have to use class

[QUOTE=randomagain;2350072]class are evil 😛

create a variable on the main swf with ymouse and xmouse, then listern \_root.ymouse in the class

there are tuts on this stuff allover the shot[/QUOTE]
