A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Need Help with buttons....

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    20

    Need Help with buttons....

    I searched the whole place looking for some help with buttons. I need to find some instructions (pretty thorough instructions) about how to make a button with a visited state. I know it involves some buttons and a movie clip but I can't seem to find a post or tutorial that helps me put it all together and make it work.
    Any help would be appreciated.

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    How about an example?
    Attached Files Attached Files

  3. #3
    Junior Member
    Join Date
    May 2005
    Location
    Ohio
    Posts
    19
    If you are trying to make a button that changes to a different color when you click on it.
    1.Draw a rectangle.
    2.Make sure the rectangle is selected.
    3.Press F-8 to convert to a symbol.
    4.Choose Button.
    5.Right click your button go to edit.
    6.This is your buttons movie clip screen.
    7.In the timeline under layer1 click the first frame and set its action to:
    stop;
    8.Insert a new keyframe and notice it has the same rectangle in it.
    9.select the rectangle and fill it with a different color.
    10.set the actions for frame two to:
    stop;
    11.Click the blue back arrow near the upper left area.
    12.Your back at your main movie.
    13.Now make sure its selected
    14.Go to the actions screen
    15. enter this code
    On(release){
    _this.gotoAndStop(2);
    }
    16.Test the movie it should work.
    -------------------
    Rome wasn't built in a day.
    they were lazy)

  4. #4
    Junior Member
    Join Date
    Dec 2000
    Posts
    20
    Thanks guys for the replies, but my next question would be, where does the code go to link the button to an object?
    So when you click the button not only does it go to the visited state but it also brings up the new window, in my case a new picture.
    I am working on a site where they have some images that will come up and I want the viewer to see which image they have already viewed as well as see the image when they click on a button.
    Thanks again.

  5. #5
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    It goes in the next line in the on release part of the button. You can add as many lines of code as you want to after the on release line.

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