• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Trouble with resetting toggle buttons that Show/Hide captions

Explorer ,
Mar 07, 2013 Mar 07, 2013

Copy link to clipboard

Copied

I have a problem with resetting the toggle buttons I use to show/hide a number of captions on a single slide. The toggle works great on the first button when I click it on and off to show or hide a caption. One click on, and the caption shows. One click off, and the caption disappears. However, if I leave a caption displayed and click on other buttons to show/hide other captions, they don't display or hide on just one click. They require two clicks. It appears something is holding up the playhead after the first toggle button is used until there's a second click. The same thing happens if I have a reset action On Enter. If I click on a caption and leave it up and move on to another slide, it does disappear when I re-enter that initial slide. However, it requires two clicks, not one, to display the caption. I find that extremely strange; I have learned most of my techniques from Lilybiri's blog, but this problem doesn't happen on her examples. I believe I am missing something obvious, but can't figure out what it is. Any assistance is great appreciated.

if_aa.jpg

else_aa.jpg

reset_aa.jpg

TOPICS
Advanced

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Mar 10, 2013 Mar 10, 2013

Yes, I am using Cp6. What I meant about re-using is that I have many different scenarios where a similar script could be used, so your suggestion of a template is a good one. My initial intention was to write it out in a ,txt file for reference. Thanks so much for the links and all your suggestions. I'll keep you posted.

Votes

Translate

Translate
Community Expert ,
Mar 07, 2013 Mar 07, 2013

Copy link to clipboard

Copied

You are pointing to which of my blog posts?

Could you post a screenshot of the timeline? Do the buttons all have their pausing point at exactly the same place?

Lilybiri

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2013 Mar 07, 2013

Copy link to clipboard

Copied

Hello Lilybiri:

Firstly, thank you so much for reviewing my question. Your feedback is highly valued by a relative newbie like myself. I am using click boxes for buttons (transparent click boxes over images). The buttons all pause at the same place. I'm sorry, but I can't recall the specific blogs I am referring to -- without doing some digging -- but in this case, I was primarily referring to the reset method of using On Enter and an Advanced Action that hides all captions. Does it make a difference that I'm using click boxes and not actual buttons for this? Many thanks in advance.

timeline.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 08, 2013 Mar 08, 2013

Copy link to clipboard

Copied

Hi globosonic!

I think (one) issue here is that while you are hiding the captions upon entering the slide, you aren't setting the caption's respective variables to 0.

This means that when the captions hide, the variable for a caption already shown (but now hidden) stays 1. If you click a button to show it again, the code "thinks" it is still visible and hides it (even though it is already hidden).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2013 Mar 08, 2013

Copy link to clipboard

Copied

No difference between click boxes/buttons, only the pausing point that will always be at the end of the timeline for click boxes. BTW I see also buttons, not only click boxes. And the buttons pause earlier. The Hide/Show is done by the click boxes I presume?

Are you perhaps using the same variable v_buttonpressed to track the visibility of all captions?

Just a tip: your names are way too long, what is the importance of adding 'home_' to so many object names. Try to keep them shorter. Use consistently abbreviations like Txt (for captions).

From the toolbox I detect you are using CP6 (shape button): another tip, group the captions (CTRL-G), so your HomeReset action will be reduced to 'Hide Grp....'. This action is triggered by the On Enter slide event I suppose? But that means that it will only be reset when you re-enter the slide

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2013 Mar 08, 2013

Copy link to clipboard

Copied

Yes, the Show/Hide is done by the click boxes. I am using the same variable for all. Should there be separate variables? I add the prefix to the names because there are multiple slides with buttons along the top - like a navigation menu. Since they don't show all the way through the project, I couldn't use Show for Rest of Project. I was thinking I had to have a set of buttons for each slide -- and therefore, they require different IDs. I thought it would be easier to track which button is which with longer names. I agree it is a bit much, but there are a lot of similar names, so abbreviations could get confusing -- perhaps less so than what I currently have. I'll give your recommendation another try. Thanks for the tip on grouping the captions. And, yes, the reset is trigged by the One Enter slide event. That's because there are links to the "Home" page from other slides, so the user would re-enter the slide. Without that AA, the visited (but not closed) captions would remain open when the user returns. At least with my current script, the captions are closed when the user revisits the page. But, as I said, my problem is the user needs to click twice for the buttons to work, not once as planned. Thanks so much again for your consideration of this. I'm reviewing all of this to see what can be done to simplify things.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2013 Mar 08, 2013

Copy link to clipboard

Copied

It is very late here, think I'll have a look tomorrow. I just gave you some tips, you can take or leave...

If you use the same variable, this will not work really.

Beware: you'll end up with so much advanced actions

Lilybiri

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2013 Mar 09, 2013

Copy link to clipboard

Copied

Hello,

Trying to understand the problem, but need some more information: are the buttons showing/hiding captions or the click boxes?

Is this correct, supposing the buttons are the toggles:

  • when clicking a button first time, you want a caption to pop up; will call them button1 and text1
  • when clicking button1 a second time (before any other button has been clicked) you want text1 to hide
  • when clicking another button, button2 same scenario, but also if text1 is still visible, you want that caption to be hidden at the same time as the new caption text2 should be shown

Your work flow is OK for the first 2 situations, but not for the third one, because you are using the same variable for all buttons. If button1 has been clicked and text1 is visible, the variable v_pressed has the value 1. When clicking button2 the conditional action will see that value and thus hide text2 which has no effect, since it is already hidden, and v_pressed will be set to 0. A second click on button2 will then be necessary to show text2.

Solution: a different variable for each button, and adding Hide text... (all the text captions that are not linked with that particular button) to the statements; and set their variables to 0 as well.

Sounds very complicated, if you could explain everything in detail, maybe I could figure out an easier approach so that you'd have a lot less variables and advanced actions to create.

Lilybiri

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 09, 2013 Mar 09, 2013

Copy link to clipboard

Copied

Thank you again. I am going to try using different variables. You're close in your understanding of the scenario but not quite 100 percent. Here is how the scenario is:

  • when clicking button1 first time, I want text1 to show
  • when clicking button1 the second time (whether before or after any other button has been clicked) I want text1 to hide
  • text1 will hide when I click button1, but if I leave that slide without hiding text1, I would like it to hide when I come back to that slide using a reset advanced action in the On Enter slide field.

Again, the hiding of text all works  even with my script, but not the way it should. My problem is that, after the first single click, the other buttons require two clicks to work, including when I leave the slide and re-enter. This little hiccup could frustrate the user. So then I thought, "Well, maybe I should change the setting from single click to double click if everything else needs a double click." But as you might expect, this did not solve the problem. Every subsquent double click had to be done twice for the Show/Hide to work.

From what you have indicated to me, I think the problem lies in not having separate variables for each button. That does seem like a lot of script writing, but if I can get this work, I would have many opportunites to re-use.

A bit more background: this is for a software simulator that I'm designing for my workers. The software is a web portal with links and buttons that I want to simulate, so that's why there are many buttons that go to different slides (web pages). I'd like the user to have control over the pop-up text so that can leave all pop-ups open if they so choose, but they have to click each one to close. However, if they leave that page and come back to it again, the page is reset.

I hope that clarifies things. If you need more information, I'd be happy to send you my Captivate file, but it's highly confidential, so I'd need to send it securely. Thank you again for taking time to consider this. It's extremely helpful and appreciated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 10, 2013 Mar 10, 2013

Copy link to clipboard

Copied

Are you using CP6? Perhaps it is mentioned somewhere but cannot find it immediately.

Bit worried about your sentence '. but if I can get this work, I would have many opportunities to re-use'. You cannot easily use advanced actions in other files, no import/export for the moment at all. The only way is to save the file as a template and use that template to create future files.

Since you do not need my third scenario, but want the user to keep everything open, this makes it already bit easier, but you'll certainly need a variable/button on a slide. You can reuse those variables on other slides.

In your use case there is certainly a need to do serious planning to avoid too many variables, scripts etc. Having blogged several times about that kind of planning. Some links:

http://lilybiri.posterous.com/beat-the-system-save-time-creating-advanced-a

http://lilybiri.posterous.com/link-score-to-attempts-in-custom-questions

To reset things when re-entering the page I would recommend to group all texts that have to be toggled in one group (if you use CP6), so that the On Enter action can be reduced to 'Hide Grp...'. Of course if those texts are different on each slide, you'll have a different group and will have to create such an On Enter action for each slide. But only one statement instead of a whole bunch saves already a lot of time.

http://www.youtube.com/watch?v=Sy09xPoP69A

If you want me to have a look, you can send a Private message,

Lilybiri

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 10, 2013 Mar 10, 2013

Copy link to clipboard

Copied

Yes, I am using Cp6. What I meant about re-using is that I have many different scenarios where a similar script could be used, so your suggestion of a template is a good one. My initial intention was to write it out in a ,txt file for reference. Thanks so much for the links and all your suggestions. I'll keep you posted.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 11, 2013 Mar 11, 2013

Copy link to clipboard

Copied

Just an update, Lilybiri: thanks to you, I have resolved this matter. I created variables for each button click AND I reset the variables for each of those to 0, using an On Enter advanced action for the slide. Single clickthroughs for everything and no frustrating double clicks. Works perfectly! Thank you so much for your patience and guidance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 12, 2013 Mar 12, 2013

Copy link to clipboard

Copied

Thanks, but the question is still marked as unanswered? That is OK for me if you do find that the case, but bit confusing for other users who want to help.

Lilybiri

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 12, 2013 Mar 12, 2013

Copy link to clipboard

Copied

Sorry about that. I'm still new to this blog -- and blogging, in general. Where do I mark it as being answered? I'll mark it that way as soon as I can find the spot. Thx!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 13, 2013 Mar 13, 2013

Copy link to clipboard

Copied

LOL I never asked a question these last months since the forum changed. If you cannot find a button 'Answered', perhaps you'll have to indicate a correct answer. I know it is possible to mark an question as answered, but apparently the obvious way disappeared. Do not bother (and it is not a blog, those are user forums, driven by users and not controlled by Adobe which I like a lot).

Lilybiri

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 13, 2013 Mar 13, 2013

Copy link to clipboard

Copied

LATEST

It's hard to get the kind of answers from Adobe that this forum provides. It's a wonderful resource. I try to mark everything as helpful, as it it really is.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources