A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Bug with rollover effect....

  1. #1
    Senior Member
    Join Date
    Sep 2002
    Location
    Clogland
    Posts
    100

    Bug with rollover effect....

    //EDIT: Found the solution, see second post

    Howdy, I'm trying for a mouseover effect on a dynamically generated menu, a mock-up can be found here.....

    http://www.scraf.com/rollover.html

    Works fine, only problem is that if you're quick enough with your mouse you can "rollOut" leaving the button in "rollOver" state.

    Anyone have a cunning workaround for this one?

    Two button's, here's the code....

    code:

    button_btn.onRollOver = function(){
    this._y = -200;
    rollover_btn._y = 200;
    }
    rollover_btn.onRollOut = function(){
    this._y = -200;
    button_btn._y = 200;
    }



    TIA (MX 2004)
    Last edited by skalie; 11-30-2004 at 06:21 AM.

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Location
    Clogland
    Posts
    100
    Trick to solving problems in Flash, puzzle over it, try all sorts of options, then eventually post a question over at Flashkit. The answer will then become apparent within minutes.

    Better (and much simpler) code....

    code:

    button_btn.onRollOver = function(){
    this._alpha = 0;
    }
    button_btn.onRollOut = function(){
    this._alpha = 100;
    }



    doh!
    Last edited by skalie; 11-30-2004 at 06:21 AM.

  3. #3
    Senior Member sharma's Avatar
    Join Date
    Oct 2004
    Location
    Canadia
    Posts
    1,017
    glad you figured it out...

    for future referance.. use AS tags for action script

    [ AS ] code here [/ AS ] (without the spaces of course
    what the hell's a motion tween?

  4. #4
    Senior Member
    Join Date
    Sep 2002
    Location
    Clogland
    Posts
    100
    done

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center