Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MC rollOver and delay at rollOut 1

Status
Not open for further replies.

HuggerFanta

Technical User
Apr 22, 2002
87
0
0
SE
Hello I´m back!!!

Sorry for that!!!!

I need some help with an effect like this page are using;

Drag over the menu to the left, it folds out and when rollOut it waits a couple of sec before it hides.

Kind of slov page, but the effect is nice I think, how do I make it my self??? --------------------------------------
Kind regards;
HuggerFanta
 
Your menu animation movieclip should be set up like this (MX version):

Frame 1: only the 'rollover' graphic and a stop() action
Frame 2-whatever: the tweened/animated rollout bit
Frame whatever: the fully rolled out menu with a stop() action
Frame whatever+1: the menu rolling back

Give it the instance name 'menu' then this code goes on frame 1, main timeline:

Code:
_global.vanish;
function menuPlay(clip) {
	clip.play();
	clearInterval(vanish);
}
menu.onRollOver = function() {
	//rollout
	this.gotoAndPlay(2);
};
menu.onRollOut = function() {
	//delay and rollback (half a second delay, change the 500 to whatever you want)
	vanish = setInterval(menuPlay, 500, this);
};
 
Thanks!!!

I´ll try it tomorrow, and maybe I get back to you then!! --------------------------------------
Kind regards;
HuggerFanta
 
Where have you hide the codè?

I just cant seems to find it, just some button and movieClip actions!!!!

/ huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
You don't need invisible buttons etc - just make sure the "button" is all one movieclip like I said and it'll work fine: the 'rollover' area expands as the clip expands.

 
OK!
I´ll try that! --------------------------------------
Kind regards;
HuggerFanta
 
I tryed not usig invisible button, but it still behaves ass the one in the link above.

The problem accures when moving the mouse, then the acpanded area stops react as I whant!!!

Tack a look for your self!!!

Link is posted above!!! --------------------------------------
Kind regards;
HuggerFanta
 
Just looked at your code - this was the problem:

onClipEvent(load){
_this.stop();
}

...should have been:

onClipEvent(load){
this.stop();
}

...it works fine if you do that.
 
well, in my solution all the scripts are on the instances of the movieclips of the button that makes the menue visible and on the invisible button (just click below the words "the movieclip menue"

might not be the most elegant solution but finally it works ;-) regards

Firegambler
 
Hello again wangbar!!!
I´m afraid that it still don´t work!

When just putting the mouse over the menuClip it folds out.

But the problem is when moving over the menuClip, then it just go wild, even yours if you run the mouse over it when folding out the menu!!!

Do you or anyone else got som brilliant idéas to how we can solve that???

/ huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
Thats better!
What have you done???

/ huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
Hello again!!!

Now the menu effect works, but the buttons the buttons dose not work.

I whant the buttons to getURL("theURL.html",
"_top");

But nothing, thats right, nothing happens, what do I do wrong??? --------------------------------------
Kind regards;
HuggerFanta
 
Make a two frame movieclip.
give stop on first frame.
on movieclip write code
on enterframe
if (this.hittest(_xmouse,_ymouse,true))
this.gotoandstop(2)
else
gotoandstop(1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top