A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: RollOver/Out image switching

  1. #1
    Junior Member
    Join Date
    Jan 2009
    Posts
    3

    Talking RollOver/Out image switching

    I want a button in my scene to switch from one image to another on roll over and switch back to the first image upon roll out. I also want it so that if someone clicks the button, it'll go to a different frame within the scene. I'm using this:
    on (rollOver) {
    gotoAndStop('shell bullet', 2);
    break;
    }
    on (rollOut) {
    gotoAndStop('shell bullet', 1);
    break;
    }
    on (press) {
    gotoAndStop(4);
    break;
    }
    (shell bullet is the instance name of the button)
    The rollover part works fine, but upon rollout, the clip goes back to the first keyframe (which doesn't have the button in it.)
    Attached Files Attached Files

  2. #2
    |-'|-'|
    Join Date
    Jan 2006
    Posts
    273
    Isn't that gotoAndStop(scene, frame)? Might be wrong, never liked to play with scenes.

    for instance name, it's not suppose to have space. maybe shell_bullet.gotoAndStop(1)?

  3. #3
    Junior Member
    Join Date
    Jan 2009
    Posts
    3

    resolved

    Quote Originally Posted by Gu35s
    Isn't that gotoAndStop(scene, frame)? Might be wrong, never liked to play with scenes.

    for instance name, it's not suppose to have space. maybe shell_bullet.gotoAndStop(1)?
    Yea.

    I replaced the space with an underscore, and replaced
    gotoAndStop(scene, frame)
    with
    shell_bullet.gotoAndStop(1)
    and it worked. Thx

  4. #4
    Junior Member
    Join Date
    Jul 2003
    Location
    Pittsburgh
    Posts
    11
    im a bit rusty here but why dont you just use the rollover state for the button seems simple to me..... then use the gotoandstop for the navigation?

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