Forum Discussion

TH-bf52b1b3-f6f's avatar
TH-bf52b1b3-f6f
Community Member
1 month ago

Show Object on second visit/revisit

I simple want a text "page already visited" to appear at the second visit of a layer. But the text does not show up.

2 triggers:

First Trigger:
I set the status to "Normal" of the "page already visited"-textbox from status "invisible" on timelinestart of the layer IF variable Sites_Profil_ChangePassword is true.

Second Trigger:
I let the variable Sites_Profil_ChangePassword to switch to "Right" from initial "False" state when the timeline reaches 0,25 seconds of the layer.

The textbox is on top of all elements in the layer and always visible.

Layer Property is "Reset to initial state".

This setup is working in a new file and also within the same file with a new test layer. 

Any ideas?

As I can't create a new SL-file as there are weeks of work in it.

 

 

8 Replies

  • ronald-hicks's avatar
    ronald-hicks
    Community Member

    Your pattern is sound — and the fact that it works in a test layer is the biggest clue. The triggers are right, so something else in that layer is interfering. Two places I'd check:

     

    1. The variable type. Open Manage Project Variables and confirm Sites_Profil_ChangePassword is a True/False variable, not text. If it's text, setting it to "Right" while checking "is true" will never match — both sides have to agree exactly.

     

    2. A conflicting trigger on that layer. Search the layer's trigger panel for anything else touching the textbox or the variable. Triggers run top to bottom, so a later "hide" trigger silently wins over your "show". A test layer has no competition; a layer with weeks of work behind it usually does.

     

    Layer reset doesn't touch variables, so the True value survives the revisit — that's why the pattern works in principle. My money is on #2.

    • TH-bf52b1b3-f6f's avatar
      TH-bf52b1b3-f6f
      Community Member

      Thanks, Ronald. Afters hours of testing it looks like a damaged file. See attached file.

      I reduced my original file to the core. If you switch between layers, the text won't appear. As soon as you hide the layer and revisit, the text is shown.

      Or do I miss anything?

      • ronald-hicks's avatar
        ronald-hicks
        Community Member

        Nice work isolating it to a repro file — that rules out half the suspects right there. And honestly, what you describe (fails when switching layers, works after hiding and revisiting) points me away from file damage and toward trigger timing. With "Reset to initial state," hiding and reshowing restarts the layer timeline, so your timeline-based state change fires again — this time with the variable already True. When you just switch layers, that timeline point already passed before the variable flipped, and nothing re-checks it afterward.

         

        So the fix: stop relying on the timeline to do the state change. Replace that trigger with "Change state of [textbox] to Normal when variable changes, if Sites_Profil_ChangePassword = True." Then it fires the instant the variable flips, wherever the timeline happens to be. One more thing to check while you're in there: make sure no other trigger sets that textbox back to Invisible on timeline start — that would produce exactly the same symptom.

  • TH-bf52b1b3-f6f​: Here's a screenshot of your file, with a few highlights added:

    The special text on layer 1 has an Initial state of Hidden. The Slide Layer Properties are set to "Reset to initial state." Thus, that text is Hidden every time the layer reopens. However, the trigger to change that text to Normal runs when the layer reopens. In other words, those settings are good.

    The reason you don't see the special text if you jump to layer 2 and then jump back to layer 1 is that the "Hide other slide layers" option in not selected in either of the Slide Layer Properties. 

    So in the "open layer 1, jump to layer 2, jump back to layer 1" situation, layer 1 never closes, which means it never reopens/resets. Thus, the trigger to show the special text when the timeline starts never runs. The text only shows if you hide the layer and then show it again.

    The simple solution: check the "Hide other slide layers" option.

     

    By the way, the solid background on your layers does prevent the user from seeing the base. However, that doesn't prevent the user from tabbing to the buttons on the base. So I suggest you also check "Prevent the user from clicking on the other layers" in the Slide Layer Properties.

  • Hi Judy,

    after 7 years of using Storyline I am learning new things like this.

    Such a wonderful explanation and good insight.

    I never thought about that, but it is the closest reason. If a layer is not hidden by itself or by another layer its timeline is frozen. 

    Thank you so much.

    I had 2 "red crosses of death" in this project, so I always kept this in mind. Right now, I see bugs and red crosses everywhere.😂

    It will get better.

    • JudyNollet's avatar
      JudyNollet
      Legend

      You're welcome! Pay it forward when you can. 😊

      P.S. I'd appreciate it if you would click the "Mark As Solution" button that appears on my earlier reply (not the button that appears on other comments). Yes, selfishly, that ups the count of solutions on my Profile page. More importantly, it marks the issue as SOLVED, which might help others find the answer when they have a similar question.