Jump to content


Photo

navigation help


  • Please log in to reply
3 replies to this topic

#1 mikal

mikal

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 08 July 2005 - 07:39 AM

Hello and thank you ahead of time for any help.
I wish to create a site navigation system similar to the one found on
www.jboogie.com

Heres what I have done:
I created a buttons, however as symbols they are movie clips as I tend to use movie clips for functionality over buttons. I then created my box drop animation(box_mc)
I plugged in this actionscript to the maintimeline
button.onRollOver = function(){
box_mc.gotoAndPlay(suchandsuch);
};
box_mc.onRollOut = function(){
box_mc.gotoAndPlay(suchandsuch);
};

And this pretty much works except in order for the box_mc to rewind I have to take the cursor out of it then back in then out again. Do I need to use a hittest? Also in order to get the movie clip to 'rewind' I just copied the frames for the roll out animation and pasted them to the end then reversed them. Isn't there a way to just get the original animation to play backwards? I tried using prevFrame but that would only go one frame back. I also need to make sure that before any other button is rolled over that any previous button rollover has returned to its static state.
I am sure there is over all a better way to do this, though I do not know it.
Thanks again
Mikal

#2 PizdusInc

PizdusInc

    Young Padawan

  • Members
  • Pip
  • 37 posts
  • Gender:Male
  • Location:Southern California

Posted 09 July 2005 - 05:42 AM

And this pretty much works except in order for the box_mc to rewind I have to take the cursor out of it then back in then out again. Do I need to use a hittest?


Try to make a movie clip that will have two movie clips in it, the first one will the the animation of the drop down, the second would contain the scrollable content. On the first one, add an onRollOut function that will gotoandstop to the first frame of the original movie clip (which would be blank). Also, at the last frame of the first one, ad a function that would play the second movie clip (the one that has scrollable content).

Also in order to get the movie clip to 'rewind' I just copied the frames for the roll out animation and pasted them to the end then reversed them. Isn't there a way to just get the original animation to play backwards? I tried using prevFrame but that would only go one frame back.


As far as I know, you cannot make it play backwards, so you would have to re-animate it. Easy way to do it would be to copy keyframes and reverse the animation, kind of like you did.

I also need to make sure that before any other button is rolled over that any previous button rollover has returned to its static state.


To do this, you may need to add a hit test. If you have trouble with that you could do a siple if formula with variables to return the button to original state if the mouse is rolled out of the content box.

Hope that makes sense, let me know if anything needs clarification.

Thanks

#3 mikal

mikal

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 11 July 2005 - 08:43 AM

Thanks for the help! I have made a hittest that works in not allowing other button movie clips to overlap. I think however that an if statement would be better for the movie clips if the mouse is taken outside of them but I am just not sure how to construct one for this application.
-mikal

===========

ok I tred to make an if statement for my application but it does not work. To reiterate my problem ... I just want to have a dialog box (mc) that when the users mouse cursor goes outside of it, the mc will gotoAndPlay another frame that 'rewinds' said mc thus making it 'hidden'.

//-252 is the x position of the mc
if(this.dialog1._xmouse >= -252){
this.dialog1.gotoAndPlay(rewind);
}

This is the statement that I have been fooling around with and is probably going completely in the wrong direction. If anybody has any suggestions please write,
thanks again,
mikal

===========

much simpler solution:

make an invisible button.

======
triple posts merged by: Donna

Edited by Donna, 16 July 2005 - 01:29 AM.


#4 PizdusInc

PizdusInc

    Young Padawan

  • Members
  • Pip
  • 37 posts
  • Gender:Male
  • Location:Southern California

Posted 16 July 2005 - 01:22 AM

On the mc you are trying to make rewind, put and if statement in it. It would be something like onRollOut{gotoAndPlay(anotherMC)}... If you want to provide me with the fla, I could try and write something for you...

Thanks,




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users