A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Using On (rollover)/ On (rollout) please help

  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    32

    Using On (rollover)/ On (rollout) please help

    Hello, I am tryin to create a button, where it moves and changes color after the mouse is over it,then when the mouse moves out, it will reverse what it jst did. i tried using this code:

    "on (rollOver)
    {
    gotoAndPlay('lblname');
    }
    "- to make it move and change color, then

    "on (rollOut)
    {
    gotoAndPlay('lblname2');
    }"- to go back to its original color and place



    so far the outcome is realy messed up and my buttons start glithcing out when i go over them.
    Is this the proper way to create mouseover buttons, or is there a nother way or easier way? please help!

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Thats about the way I do it too.

    Check this simple example .fla

    www.pelepiano.com/tester/fk_buttonMC.fla

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Member
    Join Date
    Nov 2004
    Posts
    32
    ill check it out thanks!

  4. #4
    Banned for spamming tyzoo's Avatar
    Join Date
    Dec 2004
    Location
    New York
    Posts
    283
    nice doc

  5. #5
    Member
    Join Date
    Nov 2004
    Posts
    32
    I had an additional question to this button!


    ok so thanks to mr.pellepiano, i have my button working great, my problem is, i want the button after release, to play a certain frame.

    i tried adding :

    on (release) {
    gotoAndPlay('lblTetris')
    {

    on the movie clip button, but It doesnt work because its not in the right scene (cuz there is no 'lblTetris' inside the movie scene)

    my quetion was how do i make the scenes connect so i can make the button go to that specific frame??

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You can only reference scenes from the main timeline. Instead make a frame label on the frame you want to goto and target that.

    _root.gotoAndPlay("myFrameLabel");

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397

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