Text transitions keep reappearing after move off hotspot

cshanahan9902
cshanahan9902 Community Member Posts: 11
Hi
I have to put transitions onto various paragraphs of text which come up gradually once the hotspot is rolled over.
The problem is if you exit the rollover area before the transitions finish coming up, the text transition continues to appear on the page.

I have the exact same issue when you click on a hotspot/button and then click to close it.
Please see attached the .awt of a sample

I know I am missing something simple.

Comments

  • cainam
    cainam Community Member Posts: 361 ♦ Idol ♦
    The issue is that the actions are set to fire once you've clicked/hovered over the button.  So if you hover over something else/click on something else, those actions are still executing.  (i.e., you told it to show up after a second or 2 delay, and so it is still executing that task - the next action to hide doesn't override that).    Obviously you can have the whole group show up at once instead of a piece at a time to mitigate this, or if you need the delays, inactivate the other buttons you don't want to execute until all the actions finish, but then you don't get the ability to immediately switch between the available options without a pause.

    I'm not sure how to get around this natively in Lectora - I'm interested if someone has an idea.  But I have a colleague who wanted this type of functionality, and added some javascript to make it work like he wanted it to if you are comfortable with that.
    - Adam Cain
  • cshanahan9902
    cshanahan9902 Community Member Posts: 11
    thank you for your help.

    is it easy to add the extra JavaScript to create this functionality?

    My coding knowledge is very limited
  • cainam
    cainam Community Member Posts: 361 ♦ Idol ♦
    If you aren't already familiar with/using javascript, I probably wouldn't recommend it specifically to address this one scenario.  If you had a lot of other scenarios where you needed it, couldn't find an alternative way to do it natively, and/or didn't have to worry as much about sustainability of the content within a team that is not familiar with javascript, then maybe it would be worth it.

    ...maybe someone who is actively using javascript frequently would have a different opinion, or maybe someone else has an alternative way of setting up the scenario natively in Lectora that would get you what you are looking for.
    - Adam Cain
  • cshanahan9902
    cshanahan9902 Community Member Posts: 11
    Hi Adam thank you for your help.

    I will have to try get by head around using transitions controlled by JavaScript as this issue will arise again and again for me.

    if I had a simple solutions I will try to apply it throughout.

    Please see attached a sample of what I am trying to do and the issue with it. If javaScript was added to this I can try and manipulate it for the rest of the course.

    Many thanks
  • cshanahan9902
    cshanahan9902 Community Member Posts: 11
    Hi there,

    Would anyone be able to put in place JavaScript to the attached file to prevent the transiting text from reappearing when the user has moving off the hotspot.

    much appreciated
  • klaatu
    klaatu Community Member Posts: 988
    Not sure if this is what you're after. I only worked on the first button. Keep in mind that I did not write the script for 'seamless play', if you want that it'll have to be tweaked a little.

    Also, red font on a green background is generally considered a no-no.