Keep elements visible during editing but hide them on playback?

Hey folks,

I’m finally crystallizing a need/issue that I’ve bumped into a few times and am never sure I’m quite solving it correctly. And in my most recent experience, I can’t solve it at all. How do you resolve the competing needs of seeing certain XP elements during editing but hiding them during playback?

The best solution I’ve found for this so far is to use a Scene Trigger of “when entered,” either hiding the elements or setting them to 0% opacity (depending on later needs), but that isn’t working with my current XP wherein I’m using the H-CMS with a Collection that auto-plays all of the DB entries. In that scenario, the Scene Trigger method doesn’t work because it can’t “see into” the H-CMS base element — the lowest granularity becomes the Collection itself as soon as you integrate the base. (side question #1: why?)

Given the limited Trigger options generally available, I’m not seeing another one that solves the problem, since even a .00000001 second ‘elapsed time’ Trigger results in the elements flickering as the Collection moves to the next entry. (side question #2: a value of 0 is allowed but doesn’t seem to work — is this a bug?)

Is there a setup that I’m missing, or am I resigned to just fully hiding my elements in Composer in order to ensure they work correctly in the Player?

Hello @whit,

A way to show items while editing but hide them when you preview in Player is to bind the visibility of the assets/collections/layers to the Checked state of a toggle button.

In this example I have the visibility of a layer bound to the checked state of a toggle button.

image

Before running the preview make sure Checked is unchecked, and this will hide everything bound to this toggle button.

Regarding the question of why items of a HCMS based collection do not load. If the collection/asset bound to the HCMS base is hidden, it will not load until it is shown. This also affects timer triggers that you have on the hidden assets, the timer won’t start until it is shown. As you mentioned changing the opacity to 0 “hides” them, but this also will allow them to load as they are not officially hidden.

The reason a timer set to “0” does not work is because there is no change in the time to set off the trigger.

If you have more specific questions that would relate to your experience or use case I would suggest reaching out to us via our support channel.

Thanks,
Ryan

Hey Ryan, thanks for the response! Funny, I had been wondering whether a binding might be useful for this, but I discounted that idea since it seemed like it would dictate the visibility even while editing. After all, when I’m in Composer I still see at least one H-CMS entry in the bound elements. I wonder why that wouldn’t be the case in your example — doesn’t that binding cause the element to go invisible even in Composer? Edit: I’m just now realizing you weren’t talking about binding to an H-CMS element. :slight_smile: So do I understand correctly that your toggle button just sits in the margins of your composition so that it’s not seen in the Player?

That said, your example still can’t work in my particular situation since I need for the elements in question to be Opacity 0 instead of ‘hidden’ (for animation reasons). But maybe the same trick will work? I could create a field in my DB that’s always 0 and bind the Opacity of the element to that. Again, though, this won’t help me if it does that while I’m editing. (also removed due to the same realization as above)

I appreciate the answers to my questions, but…

  1. I’m not quite getting how you answered the first question I was asking. What I was referring to is that while the Scene Trigger/Actions panel can usually select the internal elements of a Collection/Group, as soon as those elements get embedded into an H-CMS container, they can’t be used for Actions anymore. Maybe you’re saying that’s because the H-CMS content hasn’t been loaded? If that’s the case, then… :man_shrugging:t2: I mean, those elements existing my Scene Structure whether they have content or not. It just feels a bit arbitrary, and it’s definitely a frustrating limitation (I had all of this opacity stuff already worked out using Scene Triggers/Actions before discovering that).

  2. I see your logic re: the ‘0’ time change, but A) why let the editor use that as a value if it can’t do anything? There are other places in Composer where it will force a non-zero value.; and B) couldn’t a ‘0’ value be used to indicate “do this immediately when this element is active and visible”? Obviously that’s not the case, but my post is pointing to a use case for that, unless I’m misunderstanding something.

Hi Whit,

Re/ 1. the main reason is that when you have a data source, your scene structure only contains a data template, whether you have 1 item or 100 items in your collection. If you were trying to call an action on that item, which one should it be? The first one only? all of them?
Because of that fact, you indeed can’t target an item or its sub-assets when using a data template, because Composer at Edit time has no idea of how many items you will have in that collection.

Also, if you are using an ordered collection (ex: Asset Grid, Asset Flo, …) and were trying to call a “hide action” on 1 item only, you would only create holes in your collection, not remove the item from the list being shown.
If you want to hide all items, just hide the collection itself.
If you actually want to “hide 1 item” in a collection displaying a data feed, you need to “remove” that item from the data feed itself so “it doesn’t exist anymore”. You can do this with the filtering mechanism of Excel or H-CMS data feeds for example.

  1. a/ That’s a good point, we’ll send that feedback to our product team.
  2. b/ We have an “Is shown” trigger for that.

Seb

OMG, I’m going to jump to your last comment first because if I’m understanding that correctly, I’ve been misreading that trigger this whole time and I probably wouldn’t have posted this message. :slight_smile: I had assumed that “Is shown” referred to something that actively “gets shown” while the XP is playing by way of an Action or interaction. Are you saying that it applies even in the case of initial Preview/Player playback AND when a Collection advances to the next item?

I tried a test of that on my end and it does seem like it’s working, but I then ran into similar limitations as before:

a. The “Visibility” triggers aren’t available for a Group. In my case, that would be ideal since it’s the entire group of elements (inside my Swap Collection) that I’m wanting to start at Opacity 0%, so I would attach all of those “set to Opacity 0” actions to the Group getting shown. So then I thought, oh, I’ll do this with the Swap Collection instead! But…

b. …back to the “can’t see inside” limitation. :confused: The Swap Collection does have the Visibility triggers, but it can’t action on its internal elements.

Worst case scenario here, if I understand “Is shown” right: I can add my “set to Opacity 0” Actions on each element instead of at a ‘parent level,’ it would just be more elegant and less tedious if I could do the latter.


Back to the other conversations…

  1. a/ Your answers here seem like they’re assuming that I’m trying to target a specific data entry — i.e., the “Headline” text element in entry number 17. That’s not what I’m wanting, I’m wanting to target the “Headline” text element, period. It shouldn’t matter whether/when content passes through that element or what that content is, I just want that element to start at Opacity 0 when it is shown.

  2. b/ To be clear, it won’t help me to hide the Collection itself since I’m animating the elements it contains independently. If I did that, it wouldn’t matter what the opacity of each element was, they would all be hidden until the entire Collection was revealed again.

@whit,

If you want to target anything in the Template group it will have to be triggered by something in that Template group.

If you need more specific help with how to make something work in your experience then you should reach out to us via our support channel and share your experience with xp-for-support@intuiface.com

Thanks,
Ryan

If you’re just trying to hide one text asset, across all items in your collection, one other thing you can do is bind the visibility of that text asset to a counter. Use a custom binding converter “INPUT <1”. Set the default of the counter to 1. Every time you run your XP, “Add 1” to the counter. This forces the binding converter to refresh and should hide that element.

Alternatively, as @rdriscoll mentioned, bind the text asset visibility to the checked state of a toggle button outside of the collection. Then set a scene trigger with delay of 1 or 2 seconds, to check the toggle button. This should also hide the item.

Yet another option would be to bind the y value of the asset you want to hide to a counter or text item outside of the collection. Then set a scene trigger with delay of 1 or 2 seconds, to set the counter or text item to a Y value that puts your asset out of view. This would also hide the item.

Sometimes Opacity and Visibility can get weird within a collection. It works 99% of the time, though I have seen some little glitches here and there where things don’t hide when they are supposed to. It’s rare though, so when I need to do this, I often change to a diff trigger/action if I see a glitch.

I didn’t read every line of this thread, btw, so I hope I’m not missing the point. Hopefully this at least sparks some other ideas.

All good tips, Alex, thanks! Mainly what I’m wanting to achieve is that any number of elements are shown during editing but automatically hidden during playback. That makes a toggle button less than ideal since it forces me to select and toggle that every time I hit the Preview button. For the most part the ‘when Shown’ and ‘timer elapsed: .01s’ triggers work well for this, though the latter sometimes causes flickers and the former occasionally just doesn’t want to work.

Understandable. There probably isn’t a perfect solution here. Maybe if there was a new visibility state called “edit only”. Good luck!

Yeah, I do wish that was an existing feature. :slight_smile:

Related to that, however, is a setup that I just created for a different purpose — hiding elements throughout my XP before publishing — but that would make the ‘toggle switch’ concept even easier:

I created an empty/locked text element outside the boundary of a foreground/background layer (so it spans all scenes) with the label ‘HIDE ITEMS FOR PUBLISHING’, then bound the visibility of various “utility” elements (slide counters, scene labels, etc.) to the visibility of that text element. When I need to publish, I just hide that element and all of those mechanisms disappear in the published XP. This would also work for the ‘hide before preview’ situation if using actions doesn’t quite work well enough, and is more efficient than using a Toggle element.

The ‘edit only’ visibility state would still be preferable here since it would avoid having to manually click anything before previewing, but the above setup feels like a reasonable stop-gap.

Hello @whit,

If this is an improvement you would like to see then I would suggest adding it to the Wishlist community group. The Product team reviews this section for suggestions on what to add/update in future versions.

Thanks,
Ryan

1 Like