Jump to content


Photo

Navigation Bar Help


  • Please log in to reply
10 replies to this topic

#1 /quit

/quit

    P2L Che

  • Members
  • PipPipPipPip
  • 1,016 posts
  • Gender:Male
  • Location:New Hampshire

Posted 06 October 2005 - 04:15 PM

Well i'm trying to creat a navigation bar which lowers as you hover over it. But, if you slid the mouse off of it, the button, regardless of its position, will slide back up.

Here is an Example www.newelementdesigns.com

Anywho, whenever I try to do this, I would just use a simple button with animation that it slides down in "over" and slides up in the other. Is there a key piece of action script which I am missing?> :P Thanks in advanced, :)

#2 ericrcan

ericrcan

    Young Padawan

  • Members
  • Pip
  • 103 posts

Posted 08 October 2005 - 12:33 AM

there is no actionscript involved..what are you seeing? are you seeing it slide down, but when you pick your mouse up it dosent slide, it just snaps? let me know so i know how to help you.

#3 /quit

/quit

    P2L Che

  • Members
  • PipPipPipPip
  • 1,016 posts
  • Gender:Male
  • Location:New Hampshire

Posted 08 October 2005 - 08:28 AM

Well, its just if you hove off of it when its only in mid slide down, it will snap back up in what ever positiion its in.

#4 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 08 October 2005 - 09:34 AM

that's called inertia tweening.. have a search on google for it..
I can't really explain how to do it. since I never done it on my own.

#5 /quit

/quit

    P2L Che

  • Members
  • PipPipPipPip
  • 1,016 posts
  • Gender:Male
  • Location:New Hampshire

Posted 08 October 2005 - 09:43 AM

OOo thanks, just having that term will actually really help me.

#6 Jamie Huskisson

Jamie Huskisson

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 3,648 posts
  • Gender:Male
  • Location:Nottingham, UK

Posted 08 October 2005 - 09:51 AM

couldn't it be done with the hover action on a simple button? and including a movie clip inside the hover of the thing coming down etc. ?

#7 ericrcan

ericrcan

    Young Padawan

  • Members
  • Pip
  • 103 posts

Posted 08 October 2005 - 10:08 AM

no, beacuse it would keep playing (unless you put a stop), and it would not do the animation back up...

#8 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 08 October 2005 - 10:41 AM

it's also possible to make it with a few tweens and stop actions.. but the result will not come out so nicely as on the site he mentioned.
that nav is definately scripted.. not tweened

#9 dEcade

dEcade

    P2L Staff

  • P2L Staff
  • PipPipPipPip
  • 1,850 posts
  • Gender:Male
  • Location:Saskatoon, Saskatchewan
  • Interests:Guitar, Programming, Storm Chasing, Games (Designing and playing), Hockey, Photography

Posted 08 October 2005 - 11:01 AM

They way you can do this is with some action script tweens and a button. You wouldn't do this inside the button you would just have the button so that they could roll over it. EX:

Make a button on frame one. On frame one add this script:

stop();

then add this script to your button:

on(rollOver)
{
gotoAndPlay(2);
}

Now on frame two you would have your tween say it is 5 frames long so it would end on frame 6 on that frame add this script:

stop();

Now to make it go up you just put this action script on the button:



on(rollOut)
{
gotoAndPlay(7);
}

Note: Remove the first script that was added to the button.

That would be the script to send it to the frame where it goes up then when it is done just let it go back gro the first frame.

hope that helped.

dEcade

#10 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 08 October 2005 - 11:38 AM

decade: that's a fast solution, and it works also, but I think the cool thing about the nav on that site.. is that it has the easing implemented..

#11 /quit

/quit

    P2L Che

  • Members
  • PipPipPipPip
  • 1,016 posts
  • Gender:Male
  • Location:New Hampshire

Posted 19 October 2005 - 08:56 AM

Yeah, I know the basic of action scripting for buttons like, stop, go to, and such. But the tweening for that site was much more advanced, which is what made it appealing.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users