A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: two buttons .. one mouseover

  1. #1

    Question

    hiya again folks ,

    another quick one .. ( for those who know the answer )

    i have 2 buttons .. both animated .. and i want to link them so that when i move the mouse over 1 of them they both animate ...

    how do i go about this ...

    cheers

    stelogic


  2. #2
    Senior Moderator
    Defender of the Faith
    Pope de Flash's Avatar
    Join Date
    Feb 2000
    Posts
    3,429

    Post

    Just stick the animation for the mouse over in the up state of the second mouse. put a blank frame in frame 1 of the animation with a stop aciton in it. Then put a goto 2 and play action in the last frame of the animation so it will loop.

    then just name the movie clip with an instance name and use the tell target command on mouse over to goto and play frame two of the animation. then on mouse out just use the tell target command to goto to frame one. so it resets itself. Regards, Bill

    ------------------
    Macromedians 1:1

    In the beginning the web was without shape and color, and the hype covered the darkness of the net. Then there was a Flash and life came to the web and vision became reality.
    <EMBED src="/cgi-bin/ubb/Members/sigs/00000100.swf" quality=high WIDTH=375 HEIGHT=75 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>

  3. #3

    Lightbulb

    Ok, you have to "simulate" animated buttons: put the animations (2 instances of the movie symbol) and the buttons (2 instances of the button symbol) on separate layers. Now you'll trigger the animation to play by "Tell Target", like this:

    On (Roll Over)
    Begin Tell Target ("/Movie1")
    Play
    End Tell Target
    Begin Tell Target ("/Movie2")
    Play
    End Tell Target
    End On
    On (Roll Out)
    Begin Tell Target ("/Movie1")
    Stop
    End Tell Target
    Begin Tell Target ("/Movie2")
    Stop
    End Tell Target
    End On

    (you should name the both movies "Movie1" & "Movie2" for this to work)

    OR, you can do this with a variable:
    (first set)

    On (Roll Over)
    Set Variable: "Over" = "1"
    End On
    On (Roll Out)
    Set Variable: "Over" = "0"
    End On

    and then in the Frame 1 of the movie clip:

    Set Variable: "Temp" = /:Over

    and in the Frame 2 of the movie clip:

    Stop
    If (Temp=1)
    Play
    Else
    Go to and Play (1)
    End If

    This is just a idea and is still in "raw" format. I can send you a .fla, or refine that source to sumfing good looking, if you post (or mail ne at brycer@i.am).
    Now this won't work if you can't separate the button from the animated part, but... Well, at least i tried

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