Sliding Menu - need MC to play after sliding has finished

Hi,

I have created a Sliding Menu with about 12 sections. In one of the section/s I have a MC inside that I want to play. Is there a way to tell a MC to play once sliding has completed? Say based on pixel position (of the sliding MC) or something similar?

At the moment I’m using “on release” but with this method, the animation starts too early. (By the time you slide from section 1 to 12 the MC has already started playing)…

:hair:

Any ideas?

Thanks in advance!!

Start the inner movie from the last frame on the sliding mc with “theInnerMC.play()” where “theInnerMC” is the inner mc =)

Shold work I have understood the problem right…

If the sliding effect is done with AS it’s another issue, then it would help to know how…

/henxon:ko:

Hi,
Thanks for the replay, it’s nice to get response so quickly. :stuck_out_tongue:
The Sliding Menu is done with AC, here is the code.

[COLOR=Gray]//during the time the movie loads, we set the current
//position of the content at 0,0; thus showing the
//HOME section of the site.[/COLOR]
onClipEvent (load) {
_x = 760;
_y = 0;
div = 5;
[COLOR=Gray] //This value just determines the speed
//the transistions.[/COLOR]
}
[COLOR=Gray]//Here we constantly check for new values of
// _x and _y. These values are determined by endX and endY.
//We divide the difference by div to have an value that
//continues to change until the equation is true.
//Try changing the ‘enterFrame’ with ‘Load’ to see the
//difference. You would then have to click on a button
//several times before the transistion completes.[/COLOR]
onClipEvent (enterFrame) {
_x += (endX-_x)/div;
_y += (endY-_y)/div;
[COLOR=Gray] //We then use the onRelease method to determine the
//new values of endX and endY. This is a new feature
//in Flash MX.[/COLOR]
_root.NAV.Button01.onPress = function() {
endX = 0;
endY = 0;
};
_root.NAV.Button02.onPress = function() {
endX = -760;
endY = 0;
};
_root.NAV.Button03.onPress = function() {
endX = -1520;
endY = 0;
};
_root.NAV.Button04.onPress = function() {
endX = -2280;
endY = 0;
};
}

What I want to do is to make the “theInnerMC” play once the sliding MC has moved to the _X value. (eg. Button05 = -2280 pixels).

This Script is applied to the MC that is doing the sliding.

Thanks! :rambo:

I wouldn’t use that engine for the menu.

Use this one, it’ more dynamic:
http://www.n99creations.com/?pID=archives&col=Blue&arch=Sliding_Menu_with_gotoAndStop

Then it’s simply a matter of changin the code to:


var count:Number = 1;
var easeSpeed:Number = 6;
var val:MovieClip = but1;
while (_root["but"+count]) {
	_root["but"+(count)].id=count, _root["but"+(count++)].onPress=function () {
		val = _root["but"+this.id];
	};
}
ease.onEnterFrame = function() {
	this._x += (val._x-ease._x)/easeSpeed;
	Math.round(ease._x) == Math.round(val._x) ? page.gotoAndStop(val.id) : null;
};