Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Flash OnMouseOver Problem

  1. #1
    Join Date
    Feb 2004
    Posts
    437
    Rep Power
    0

    Default Flash OnMouseOver Problem

    Hi,

    I am creating a navigation bar and i used an OnMouseOver effect to display the options under each button option. My issue is while the options do appear how do i get them to stay there so i can mouse over them so they can be selected? Everytime i move the cursor away from the the main options the bus options disappear.

    This must be quite simple but i'm comletely new to flash and so bear with me plz.

    The effect i would like is similar to the navigation bar at the top of the Macromedia site.. www.macromedia.com

    Anyone who wants to check the source code can send me a private message. Please help, i need to get this figured out fast!
    "It is better to have tried and failed than to never have tried at all."

  2. #2
    Join Date
    Apr 2003
    Posts
    1,389
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    you most likely have a OnMouseOut option set... remove it and you should be good to go.
    The sword of the Spirit is a mighty 2-edged blade || Re-arranging my life for Christ!

  3. #3
    Join Date
    Apr 2003
    Posts
    1,389
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    ooops... sorry... i looked back and saw you were talking about flash not dreamweaver.... (got mixed up cause of the function name)

    hmmm... it's actually not hat simple and not a newbie trick as it has to do with nesting movie clips or attaching/removing movie clips on button rollover. I'd suggest that unless absoultely necessary use a conmbination of javascript and CSS to achieve the same thing in DW
    The sword of the Spirit is a mighty 2-edged blade || Re-arranging my life for Christ!

  4. #4
    Join Date
    Feb 2004
    Posts
    437
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    OK. if i do that in Dreamweaver can i accomplish the exact same effect i do in Flash? Like the macromedia.com site?
    Last edited by digimar; Dec 28, 2004 at 07:33 PM.
    "It is better to have tried and failed than to never have tried at all."

  5. #5
    Join Date
    Feb 2004
    Posts
    437
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    Would this be easier? Plus I would need to use images since the fonts i use arent exactly common on the average user's computer. I had to install them on mine specifically as well. Would this make a difference?
    "It is better to have tried and failed than to never have tried at all."

  6. #6
    Join Date
    Mar 2003
    Posts
    1,700
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    When you do the on (mouseOver), do you start another movie animation? If so, you need to call this.gotoAndStop(1) on the movie that you called by trapping it inside a: on (load) { } event. That's how they got the option to "stay" after it becomes visible. For example, on your button:

    Code:
    on (mouseOver){ 
        moviename.gotoAndPlay(1)
        }
    On your movie symbol that shows the option:

    Code:
    on (load) {
        this.gotoAndStop(1)
        }
    ...provided that your movie symbol animates and disappears. This will prevent your movie symbol from disappearing as it won't play to completion.

  7. #7
    Join Date
    Apr 2003
    Posts
    1,389
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    - das only one half xen, the unload or disappearing is more complicated than it first seems.. that is if you want to duplicate what is happening at the flash site.

    - yeh digimar, if you use the DW route you'll have to create small images to show your special text/font.

    - the EXACT effect is more complex than you think Digimar as they seem to be using some mouse position conditions or complex target areas. hmmmm.... they may actually be using complex target areas rather than anything else... thinking..
    The sword of the Spirit is a mighty 2-edged blade || Re-arranging my life for Christ!

  8. #8
    Join Date
    Feb 2004
    Posts
    437
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    OK then WOW.

    This seems to be more trouble than its worth. But heck, i'll give it a try anyways. Couldnt hurt. Thanks guys.
    "It is better to have tried and failed than to never have tried at all."

  9. #9
    Join Date
    Mar 2003
    Posts
    1,700
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    Now that I looked at the website, it's actually not that difficult:

    If done entirely in Flash:

    - An entire graphic of the menu bar was created in a separate program and imported into Flash

    - Cut outs of the graphic were converted to button symbols, complete with roll over graphic modifications etc.

    - The menu items shown below the main bar are actually 1 embedded movie

    - In this embedded movie, 10 frames are dedicated to each set of menu items. If there are 5 menu items, then the movie will have 50 frames.

    - In each set of 10 frames, the graphic is different (representing each menu item). It fades in for the first 4 frames, stops on the 5th frame, and fades out on the 6th - 10th frame.

    Let's say we call the submenu items symbol subMovie

    For the first button on the main menu graphic that has sub options:

    Code:
    on (rollOver){
        subMovie.gotoAndPlay(1)
       }
    For the second button which has sub options, the subMovie gotoAndPlays frame 11, frame 21 for button 3 and so on. subMovie will play and stop at frame 5 for the first button, frame 15 for the second button, frame 25 for the third button, and so on. You have to attach:

    Code:
    this.stop()
    ...on the 5th frame of every 10 frame segment in subMovie. That way, the on (rollOver) can start at the first frame for each segment and reliably expect it to stop at the 5th frame in the segment.

    Now for the first button on the main graphic, also attach:

    Code:
    on (rollOut){
        subMovie.gotoAndPlay(6)
        }
    For each subsequent button, the subMovie would gotoAndPlay the 6th frame of each segment (16 for the second button, 26 for the third button and so on...) because frames 6 - 10 fades out the graphic slowly.

    On the 10th frame of each segment, the movie stops:

    Code:
    this.stop()
    Now while subMovie has mouse focus, it will remain visible:

    Code:
    on (rollOver){
        subMovie.gotoAndStop(5)
        }
    When it looses mouse focus, it fades out:

    Code:
    on (rollOut){
        subMovie.gotoAndPlay(6)
        }
    ...frame 16 for the third button, 26 for the third, and so on. See how easy that was? If you want to get creative, you can add a timer delay to the embedded movie before it fades out. Happy coding.

  10. #10
    Join Date
    Apr 2003
    Posts
    1,389
    Rep Power
    0

    Default Re: Flash OnMouseOver Problem

    the onrollout will activate once you're outside of the main button target area Xeno... that's the complex part... of course I haven't tried your suggestion, but from my Flash days doing menus was never that easy.

    from what I remember you the mouse MUST be within the target/hit area in order for the button to continue be active... that's how the rollover and rollout states are determined.

    Another way of getting sub-menus would simply be to attach the movie clip to the over state.
    The sword of the Spirit is a mighty 2-edged blade || Re-arranging my life for Christ!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •