in

Quark Forums

Launching two events on the same object

Last post 05-02-2010 9:51 PM by Jyoti Bhatnagar (Quark). 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 05-17-2007 10:21 AM

    Launching two events on the same object

    There is no problem to click on a text object to launch two actions with a script (show two other objects previously hidden).
    But how to proceed when I want to click a second time on the same text object to hide the two other objects?
    As I remember it was possible to do that in the dead QuarkImmedia...

    Thank you and best regards.
    Jean-Claude
  • 05-17-2007 12:37 PM In reply to

    Launching two events on the same object

    Hi, Jean-Claude,

    as QuarkImmedia inspired us how to handle things in Quark Interactive Designer a lot of things are still similar, so there should be no difference in how events and actions are treated.

    To hide/show objects with a toggle button I would create a small script, which has the following actions:

    If Object A is hidden
    Show Object A
    else
    Hide Object A
    endif

    And this script is being called by your event of the text object.

    Does that do what you need?

    Regards
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 05-17-2007 12:43 PM In reply to

    Launching two events on the same object

    Hi,

    I would suggest you to create a button (On/off) for this.

    Step 1: On the main Presentation layout. Create the Interactive objects (Boxes you want to show/ hide) Lets say name them as “Basic 1”,”Basic 2”. Option as None.
    Step2: Create a button with Button type as On/off. Size can be almost equal to text you want to be displayed. In button sub layout there would be eight pages. Type on text on On-Up,On-Over, On-Down, On-Hit and Off-Up, Off –Over,Off-Down and Off-Hit.
    Step 4: Since you want to show- hide objects. Create a text box on Master page. You can type SHOW on On states and HIDE on OFF states.
    Step 5. Create two scripts, Show and Hide.
    Step 6: In Show, add script, Show objects “Basic 1”,”Basic 2”. Similarly in Hide, add script, Hide Objects “Basic 1” and “Basic 2”.
    Step7 : Select the button on Main presentation layout and assign scripts in Event tab. On Click up on, Run script Hide, and on Click up off Run script Show.
    Step 8: Export.

    In case you want to hide any other objects, you can create a new script .

    I hope this will work.

    Thanks,

    Bikramjit Singh(Quark)
    bisingh@quark.com
  • 05-17-2007 1:23 PM In reply to

    Launching two events on the same object

    Hi,

    Matthias' solution seems to be correct, but I want two hidden text objects to be visible with one click and then these two objects to be hidden when clicking again on the same box. The creation of buttons, also possible, is too complicated with a lot of objects.
    I wrote this script:
    if Object A is hidden
    Show Object A
    if Object B is hidden
    Show Object B
    else
    Hide Object A
    Hide Object B
    end if end if
    The two objects appear with one click but don't disappear. It's a problem of order or syntax. Thanks to reorder this script.
  • 05-17-2007 1:37 PM In reply to

    Launching two events on the same object

    Hi, Jean-Claude,

    the correct order should be:

    If Object A is hidden
    Show Object A
    else
    Hide Object A
    endif
    If Object B is hidden
    Show Object B
    else
    Hide Object B
    endif

    Regards
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 05-17-2007 2:23 PM In reply to

    Launching two events on the same object

    Hi Matthias,

    The script does not work properly. I tried to correct it without success. Thanks-Best regards

    Jean-Claude
  • 05-17-2007 2:25 PM In reply to

    Launching two events on the same object

    Hi, Jean-Claude,

    you are right, as soon as you have two elements, my script also doesn't behave correctly any more. The second ELSE kills it, looks like you have found a bug.

    Use this script as a workaround please:

    If Object A is hidden
    Show Object A
    Show Object B
    else
    Hide Object A
    Hide Object B
    endif

    Thanks
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 05-17-2007 4:28 PM In reply to

    Launching two events on the same object

    Hi Matthias,

    Your last script works perfectly well. Thank you.
    Jean-Claude
  • 05-02-2010 2:50 PM In reply to

    • bruce1
    • Not Ranked
    • Joined on 03-04-2005
    • UK
    • Posts 17

    Re: Launching two events on the same object

    I know this a couple of years old but I want to do something similar in Q8 for a website to show/hide two text boxes with two buttons accessible for every page. I find the above a bit confusing, can you tell me if there is a tutorial to to explain how to show on one click and then hide on 2nd click. i got the first action working, but struggling to then close the box

    thanks

    Bruce

  • 05-02-2010 9:51 PM In reply to

    Re: Launching two events on the same object

    Hi Bruce,

    You want to Hide/Show a textbox with a button and similarly other textbox with another button.

    To achieve this: You would need to create 2 on-off button. You can assign action Object > Hide to one button state say "Click up On" and Object > Show on another button state "Click up off" ('User Event' drop down in Events tab for button object).

    Also you can refer to http://forums.quark.com/p/16642/70101.aspx#70101 

    Hope it helps.

    JB

    Jyoti Bhatnagar
    jbhatnagar@quark.com
Page 1 of 1 (10 items)
Powered by Community Server (Commercial Edition), by Telligent Systems