A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: We can only be judged by our Actions..... scripts

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    San Jose California
    Posts
    144

    We can only be judged by our Actions..... scripts

    Picture if you will a button (one of three) which in a mouse over state puts text on the stage. I was able to get this to work by putting a MC in the over state of the button. However I would also like different text to occupy that spot when a button isn't being rolled over. For this I believe Action Script must be employed. Being the biggest newbie I have no idea what to do. Would anybody have some suggestions?

    - B

    the humble newbie

  2. #2
    Reaction Script Dude
    Join Date
    Aug 2001
    Posts
    195
    Here's what I would do. instead of placing the movieClip in the "over state" of the main timeline, I would put it on the main timeline. Then I would have a few more frames to the movieClip. For example, if I had three buttons, I would add three frames to the clip, sending that total to 4. Why? Because you also have to account for when a button isn't being rolled over. On frame one of this movie Clip I would type in the text you want to show when no buttons are rolled over. In frame two, replace that text with what you want to show when button1 is rolled over, and so on with frames 3 & 4. Then put a stop(); action on frame 1 of that timeline. Name this instance "textClip". Now, on your buttons (say they are button1, button2, & button3), put this code on:

    on (rollOver) {
    textClip.gotoAndStop (2);
    }
    on (rollOut, dragOut) {
    textClip.gotoAndStop (1);
    }

    Of course, you will replace the number "2" with either "3" and "4" on your other two buttons.

    Now upon rollover, you will see this work. Hope that helps!
    "You're not blind, you just got blood in your eyes." --Mr. Orange

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    San Jose California
    Posts
    144
    I did fail to mention one little thing. The reason I used an MC was for a little line that draws itself over from the button and makes contact with the text area. But I think that can work in your example as well right? I just add in some extra frames in just for the over state.

    Anyway much thanks... I'm off to give this a try!
    - B

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    San Jose California
    Posts
    144
    Rock n Roll Baby YEAH!

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