Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2007
    Posts
    66

    Change Button onclick event

    Is there a way to change the onclick event of a button based on another button? Let me explain. I would like to press button A and have it change the onlcick event (web.LoadUrl) of button E to a different url. If I press button B then it would change button E to another url, etc. I know I can set properties etc, but I have not been able to find anything in the help file that would allow me to change the OnClick events.

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Why not place the URL in a variable, and change the contents of that variable when button A or B is clicked?

    Ulrich

  3. #3
    Join Date
    Jul 2007
    Posts
    66
    Never thought of that, thanks for the help.

  4. #4
    Join Date
    Feb 2009
    Location
    Ukraine
    Posts
    19

    Lightbulb

    Quote Originally Posted by upeters View Post
    Why not place the URL in a variable, and change the contents of that variable when button A or B is clicked?

    Ulrich
    So, I have some different trouble. My project has a lot of video files (~240).
    there are buttons with digit from "1" to "10".
    when user explores web-pages in WebObject "On Navigate" this code are working
    Code:
    if (e_URL == _SourceFolder.."\\AutoPlay\\Docs\\graph_task\\task_04_2_01_01.html") then
    Button.SetVisible("Button_task_04_2_01_01", true);
    else
    Button.SetVisible("Button_task_04_2_01_01", false);
    end
    ...
    ...
    if (e_URL == _SourceFolder.."\\AutoPlay\\Docs\\graph_task\\task_04_2_24_10.html") then
    Button.SetVisible("Button_task_04_2_24_10", true);
    else
    Button.SetVisible("Button_task_04_2_24_10", false);
    end
    -- and like that
    that's mean this code repeat 240 times but with 240 button object

    Is possible to replace OnClick script in buttons with digit from "1" to "10" when URL will change via

    Code:
    f (e_URL == _SourceFolder.."\\AutoPlay\\Docs\\graph_task\\task_04_2_01_01.html") then
    ...
    else
    ...
    end
    Thanx

  5. #5
    Join Date
    Jan 2009
    Posts
    14
    were or how can i refer a new button to something.

  6. #6
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by Gekkepop View Post
    were or how can i refer a new button to something.
    It gets confusing and makes the forum difficult to search if you ask new questions in post but anyway -

    If you look at the properties for a button you'll see a "Script" tab. In there you will see the events that relate to the button - On Click, On Right-Click, On Enter and On Leave. You put code into those events and it 'fires' when that event occurs on that object.

Similar Threads

  1. how i can change my home page on click button
    By melissa in forum AutoPlay Media Studio 7.5
    Replies: 5
    Last Post: 12-15-2007, 04:54 AM
  2. change notification message default button
    By repekcan in forum Setup Factory 7.0
    Replies: 0
    Last Post: 12-08-2006, 01:00 AM
  3. Change images using a button – Again!
    By CraigS in forum AutoPlay Media Studio 5.0
    Replies: 20
    Last Post: 07-08-2005, 10:51 PM
  4. Example: Creating an on/off button to toggle background audio
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 07-10-2004, 02:54 PM
  5. Button Hiding Blues
    By Tezcatlipoca in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 04-11-2003, 04:57 PM

Posting Permissions

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