dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Creating Tab Buttons

  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    37

    Creating Tab Buttons

    I am new to Koolmoves and am not sure I can explain this question.

    Is there component or method (or template) of making tabs (buttons)?

    Where it would function like tabs you see on many web pages.

    If one is clicked on the other is automaticly resored to a non clicked state like a radio button.


    Steven

  2. #2
    Senior Member etuom's Avatar
    Join Date
    Sep 2006
    Location
    Minnesota
    Posts
    193
    The Kool Exchange has two templates for a tabbed web page. One is for AS3 and the other is the same but for AS1. You may want to check them out. Just go to the exhange and click on Templates in the drop down menu. There is a video tutorial on the AS1 version as well. All of it by our good friend and Moderator Blanius.

  3. #3
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,431
    I believe Wilbert will be creating a new component that will support tabbed pages.

  4. #4
    Member
    Join Date
    Jul 2009
    Posts
    37
    etuom, thanks for the info, I'll look into it.

    Bob, thanks, does that mean it might be a native component in the near future?

    Steven

  5. #5
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Wilbert has a nice component addition coming up that will completely address your needs

    I'm personally testing it now in Vista and Windows 7 as a F10 export with absolutely no issues here so it should be something he's talking about soon.

  6. #6
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Thanks Chris

    What I created is a class to group buttons where only one of them can be selected. You can associate data with each button. When a another button is selected, a change event is broadcasted. Assuming you have three buttons and a contentpane on stage, it works like this
    Code:
    var bg:ButtonGroup = new ButtonGroup();
    
    bg.addButton(pushbutton1, {type:0, source:"This is the text associated with button 1"});
    bg.addButton(pushbutton2, {type:1, source:"This is the <b><i>html enriched</i></b> text associated with button 2"});
    bg.addButton(pushbutton3, {type:4, source:"myImage.jpg"});
    
    bg.onChange = function (){
      contentpane1.setContent2(bg.data.type, bg.data.source);
    }
    In the code above, objects were associated with the buttons but you can also use a simple number, string or something else.
    Attached Files Attached Files
    Last edited by w.brants; 09-01-2009 at 01:44 AM. Reason: Added zipped swf file

  7. #7
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,431
    The ButtonGroup class wasn't included in the 7.2 release. If anyone needs it, email me at support at koolmoves dot com.

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