Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2007
    Posts
    46

    Radio Button autoplat media studio 6

    Radio Button autoplat media studio 6

    Radio Button

    for example




    download interfaz

    Hello could do as the code?
    The images are really understands the example


    Only you must select one of three, rather than three at the same time

    Last edited by luffymk; 10-14-2007 at 12:11 AM.

  2. #2
    Join Date
    May 2007
    Posts
    46
    for example details


  3. #3
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Put this in the On Click event of Button 1
    Code:
    Button.SetState("Button2", not Button.GetState(this))
    Button.SetState("Button3", not Button.GetState(this))
    Put this in the On Click event of Button 2
    Code:
    Button.SetState("Button1", not Button.GetState(this))
    Button.SetState("Button3", not Button.GetState(this))
    Put this in the On Click event of Button 3
    Code:
    Button.SetState("Button1", not Button.GetState(this))
    Button.SetState("Button2", not Button.GetState(this))
    Dermot

    I am so out of here

  4. #4
    Join Date
    May 2006
    Posts
    5,380
    when using radio buttons/check boxes, i usually make a global function to control the button states (saves on lines of code when you have many buttons, and if you add more buttons half way through a project you only have 1 function to edit rather than loads of buttons)

    EG: (put in global functions)
    Code:
    function SetRadioState(CURRENT)
        -- set all buttons up
        Button.SetState("Button2", 0)
        Button.SetState("Button2", 0)
        Button.SetState("Button3", 0)
        -- set the required button down
        Button.SetState(CURRENT, 1)
    end
    and in all the buttons on click event
    Code:
    SetRadioState(this)
    Open your eyes to Narcissism, Don't let her destroy your life!!

  5. #5
    Join Date
    May 2005
    Posts
    1,115
    ^^

    Never know what life is gonna throw at you.
    (Based on a true story.)

  6. #6
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by RizlaUK View Post
    when using radio buttons/check boxes, i usually make a global function to control the button states (saves on lines of code when you have many buttons, and if you add more buttons half way through a project you only have 1 function to edit rather than loads of buttons)

    EG: (put in global functions)
    Code:
    function SetRadioState(CURRENT)
        -- set all buttons up
        Button.SetState("Button2", 0)
        Button.SetState("Button2", 0)
        Button.SetState("Button3", 0)
        -- set the required button down
        Button.SetState(CURRENT, 1)
    end
    and in all the buttons on click event
    Code:
    SetRadioState(this)
    Nice call there RizlaUK.
    Intrigued

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    Thanks

    Heres a better function for the very same thing, this function dosent ever need be edited, it works on groups of buttons (idea from worms xp sidebar example)

    Code:
    function SetButtonState(GROUP, CURRENT)
    	tblObjects = Page.EnumerateObjects()
    	Application.SetRedraw(false)
    	for index, object in tblObjects do
    		if String.Left(object, String.Length(GROUP)) == GROUP then
    			ObjectType = Page.GetObjectType(object)
    			if ObjectType == OBJECT_BUTTON then
     				Button.SetState(object, 0)
    			end
    			Button.SetState(CURRENT, 1)
    		end
    	end
    	Application.SetRedraw(true)
    end
    Example call
    Code:
    SetButtonState("CHK", this)
    and heres a example apz showing the function in action
    Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  8. #8
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Thanks for the example, it's mirrored on amsuser.com, here:

    http://www.amsuser.com/ams/examples/...dioButtons.apz
    Intrigued

  9. #9
    Join Date
    May 2006
    Posts
    5,380
    Thanks for the example
    No Problem
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. Radio Button autoplat media studio 6
    By luffymk in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 10-13-2007, 11:53 PM
  2. Press Release: AutoPlay Media Studio 5.0 Training CD's
    By Colin in forum Announcements & News
    Replies: 0
    Last Post: 09-15-2004, 01:40 PM
  3. AutoPlay Media Studio 4.0 Documentation
    By Colin in forum AutoPlay Media Studio 4.0
    Replies: 0
    Last Post: 11-18-2003, 11:58 AM
  4. What's new in AMS 5.0?
    By Ted in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 09-22-2003, 03:56 PM
  5. HOWTO: Make a Media Player Object Go Full Screen
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 11:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts