SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member Public2's Avatar
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Botton: Mouse out????

    Hi everybody.

    I'm working on a Flash menu, and I've made some buttons, there has a effect when I turn the mouse over them; a effect with some lines going around the written stuff...

    But I think, that it could be very nice, if the lines would draw back to the start point, they original started on.

    In short, If we have some lines their extend when I put the mouse over the button, I would like if the lines would draw back to the beginning point, when I remove the mouse cursor...

    Can that be done, and if it can, is it with an ActionScript or just a simple Button command or what?

    I the Button edit area; there is only 4 items:

    Up
    Over
    Down
    And the last one: Hit

    But what about remove or out?

    I've try to look in the ActionScript library for something to use, because, i slightly remember to have seen such a function before, somewhere...

    Greetings Public2

  2. #2
    SitePoint Addict Scud's Avatar
    Join Date
    Jan 2002
    Location
    Los Angeles
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would most definatly be some ActionScript. The lines themselves would be drawn using AS as well. So when the MC detects the mouse it will begin to draw on a random or set path around point x. Then when the mouse leaves they can return to origin or fade out... you could really do anything with AS.

  3. #3
    SitePoint Zealot webQS's Avatar
    Join Date
    Oct 2002
    Location
    Sydney : Australia
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Depending on your target Flash Player there are a few ways to do this

    Flash 5 and 6

    on the button clip

    on(rollOver){
    //goto and play a frame animation that show lines moving out
    }

    on(rollOut)
    {
    //goto and play a frame animation that show lines moving back in
    }

    Of course this doesn't deal with what happens when somebody mouses out before the "out" animation finishes.
    To do this you'd have resize the clip's characteristics based on what they currently are. For instance :

    on(rollOver){
    //maxWidth is the clip's maximum allowable width (say 40)
    if(clip._width < maxWidth)
    {
    clip._width++;
    }
    }

    on(rollOut)
    {
    //minWidth is the clip's minimum allowable width (say 10)
    if(clip._width > minWidth)
    {
    clip._width--;
    }
    }

    The Flash Player 6 equivalents are clip.onRollOver = function() {..} and clip.onRollOut = function() {...}
    They can be placed independently of the clip (e.g on the timeline).

    This should get you started..hopefully.

    James

  4. #4
    SitePoint Member
    Join Date
    May 2003
    Location
    Mt Manganui, Aotearoa
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a tut about nesting buttons and movie clips. Don't know really if it's what you want but it might help.

    http://hotwired.lycos.com/webmonkey/...?tw=multimedia


Bookmarks

Posting Permissions

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