1 Reply Latest reply on Dec 2, 2008 5:29 AM by James Newton, ACP

    mouseover slide menu! ... help!

    Davey.x
      hi there everyone.

      im at university and im producing and interactive CD Rom using director!

      the trouble is that i am wanting to include as part of my final design an mouseover or mouse hover menu. Which starts as a side bar on the left hand side and then when then mouse hovers over the side bar it scrolls outfrom the left side into a left side mene. then obviously once the mouse has clicked and moved away from the menu it slides back to a side bar on the left from which it oroiginated.

      i had a though of using tweens in order to create the animation of the menu sliding out. but then i dont know how to combine it to work throughout the whole CD rom and to work with the mouseover effect.

      :/ as much help as possible will be really appreciated! :)

      David
        • 1. Re: mouseover slide menu! ... help!
          James Newton, ACP Level 3
          It looks like this is an opportunity to learn to code using rects.

          1) Create a sprite and place it on the Stage with its left edge flush with the left edge of the Stage.
          2) When the playback head reaches this frame, which event is sent to the sprite?
          3) What is the rect of the sprite?
          4) How would you save this rect for use later?
          5) How does the offset() method work with a rect object?
          6) Can you calculate a new rect for your sprite which shows only a thin sliver of it on the Stage?
          7) See question 4.
          8) What event is triggered when the mouse is moved over a sprite?
          9) How can you set the rect of a sprite to a different rect

          Can you use the clues above to create a sprite that pops out from the left when your mouse moves over it? Once you've done that, you'll need to think about how to get different rects within the sprite to react like a menu, but let's proceed one step at a time.