#1
  1. No Profile Picture
    =) wannabe?
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 2002
    Location
    florida
    Posts
    2,153
    Rep Power
    15

    rollover buttons


    Before i used to make a button, so first half of frames plays when the mouse is over, and second half when mouse is out, the middle frame is the where it stops. Then i linked the frames, so if a user decides to rollout before the middle or frame, the halfs don't have to be played entirely, makes it more interactive i guess.

    The thing is i had to link each frame manually. also if you keep rolling over and out fast, sometimes it just stops in the middle frame even if the mouse is out (on out it should stop on the end frame).

    I saw the same effect done with action script, without wasting hours, and stupid side-effects.

    I figured it's one animation played forward on mouse over and backwards on mouse out. Is that right? or is there a better way to do it.

    if you could help

    thank you

    p.s i tried describing as best as i could, sorry if it's confusing.
  2. #2
  3. No Profile Picture
    flash junkie
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    CO, USA
    Posts
    172
    Rep Power
    12
    here's a simple rewind function that can be used on any object:

    PHP Code:
    //actionscript:
    rewind = function (objf)
    {
        
    obj.onEnterFrame = function ()
        {
            if (
    this._currentframe>f) {
                
    this.gotoAndStop(this._currentframe-1);
            } else {
                
    delete this.onEnterFrame;
            }
        };
    }; 
    attached is an example of how to apply this to a movieclip button. hope that helps.

    cheers,

    bret
    Attached Files
  4. #3
  5. No Profile Picture
    =) wannabe?
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 2002
    Location
    florida
    Posts
    2,153
    Rep Power
    15
    thanks a lot =) that's exactly what i had in mind.

    I'll need to get on that action script sometime =)

IMN logo majestic logo threadwatch logo seochat tools logo