dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Button Question

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    25

    Button Question

    Greetings all.

    This should be easy. I have simple white square buttons. Once a user clicks it, it should change to grey and stay that way. I'm basically trying to show the history of a user's click.

    Any info would be greatly appreciated.

    Thanks in advance!

  2. #2
    www.das-media.com dyldebus's Avatar
    Join Date
    Aug 2002
    Location
    Tempe
    Posts
    171
    will this just change once? Or will it toggle to different colors every time it's clicked?

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Posts
    25
    it will change just once (similar to that of an html link)

  4. #4
    www.das-media.com dyldebus's Avatar
    Join Date
    Aug 2002
    Location
    Tempe
    Posts
    171
    Place/Add this code to your button:

    -------------------------------------------------

    on(release){
    myColor = new Color(box);
    myColor.setRGB(0xff9933);
    }


    --------------------------------------------------

    "box" = the name of your button (not the library name, but the name in the properties box under where it says "button")

    "ff9933" = your hexidecimal color... just put in the one you want.

    Enjoy!

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Posts
    25
    Ungh, all I see is the Symbol Properties icon located on the Library panel. And on the Instance panel, there's only Behavior and track options.

    Sorry, still lost.

  6. #6
    www.das-media.com dyldebus's Avatar
    Join Date
    Aug 2002
    Location
    Tempe
    Posts
    171
    are you using flash mx? Its the huge banner like box going across the bottom of the screen when you click on a symbol. You can go to window>properties if you still don't see it. It tells you all the info about the clip and there is a white box to input a name for your ojbect... input the name "box" <-no quotes. If you are using flash 5... i don't remember where that input box was I think there is a properties window with a section to input the name....

  7. #7
    Senior Member
    Join Date
    Oct 2000
    Location
    Barcelona
    Posts
    875
    in 5, there no way to name a button object. if you are on Flash 5, embed the button in an mc and develop the effects you want in the mc rather than in a button. you can label mcs in 5.

  8. #8
    www.das-media.com dyldebus's Avatar
    Join Date
    Aug 2002
    Location
    Tempe
    Posts
    171
    its been awhile

  9. #9
    Junior Member
    Join Date
    Jun 2002
    Posts
    25
    Thanks for the help. I couldn't get it to work but I ended up cheating a bit and I still got the desired effect.

    Thanks again.

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