PDA

View Full Version : How did they do that?


Dunny007
12-29-2006, 04:36 PM
I tried to replicate the effects in the navigation on this site: http://www.extremecreative.com

I am curious as to how they did the sub nav animations (Nav Items: Services and Company.) I tried to replicate this by making a button and creating a behavior for it to open an play a MC on Roll over then a seperate frame in the same MC on the roll out. But it only worked for the first instance quite the same. Any Ideas?

wintzell
12-29-2006, 04:43 PM
Why don't you show us the code you created so far and we'll help you from there?

Dunny007
12-29-2006, 05:51 PM
I will also include the .fla


on (rollOver) {

//Movieclip GotoAndPlay Behavior
_root.roller1.gotoAndPlay("1");
//End Behavior

}
on (release) {

//Goto Webpage Behavior
getURL("http://www.macromedia.com","_self");
//End Behavior

}
on (rollOut) {

//Movieclip GotoAndPlay Behavior
_root.roller1.gotoAndPlay("21");
//End Behavior

}

wintzell
12-29-2006, 06:58 PM
There are many ways to do this, follwing is one solution.
put this in your "Home"-clip actions instead of your onRollOver and onRollOut events:

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.roller1.nextFrame();
} else {
_root.roller1.prevFrame();
}
}

And remove the last frames in "roller1" (21-40).

Dunny007
12-29-2006, 07:14 PM
thanks this works like a charm. Will this work with multiple buttons on the same frame? The reason I ask is because I have experinced this in the past, having several buttons with the same features and some end up not working.....

wintzell
12-29-2006, 07:33 PM
Yepp, it will. Just give the moving movieclip (roller1) a new instance name. "roller2" for example.

Cheers

Dunny007
01-09-2007, 09:25 PM
how would I do the sub nav buttons? I got them to come out but they will not say for me to click on. "ow-sub1" is the sub nav MC.

I used the same code you (wintzell) provided.
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.roller2.nextFrame();
} else {
_root.roller2.prevFrame();
}
}

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.mini2.nextFrame();
} else {
_root.mini2.prevFrame();
}
}

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.ow_sub1.nextFrame();
}


else {
_root.ow_sub1.prevFrame();
}
}

on (release) {

//Goto Webpage Behavior
getURL("http://www.macromedia.com","_self");
//End Behavior

}