Change state in slide in response to variable change in lightbox

Mar 20, 2014

Hi

Please advise me on this:

I have a rectangle  in Slide A with in 3 states.

When user clicks  on the rectangle he gets a Lightbox

If he clicks on a button in the Lightbox and then clicks X to get back to Slide A, the state of the rectangle in Slide A should change

I tried to create triggers for this with variable but in vain

Please help

BR

Moshe

6 Replies
Ashley Terwilliger-Pollard

Hi Moshe,

Are you using any of the built in states? For example I just tried this out on a simple set up, and the visited state works when I click on the rectangle, am shown the lightboxed slide and then return to the first slide. You shouldn't need to use variables, but just the "change state" trigger if you've set up your own states. 

If you're still having difficulty with it, can you share your Storylie file here with us? 

moshe shenker

Hi Ashley

Let me rephrase my issue as follows:

I have a button in slide A with 2 states: normal and custom state

When I click on this button I go to a light box. In the light box I click on a button which changes the value of the variable V1 from 0.00 to 1.00

When I go back to slide A I wish that the button there would change its state from normal to custom 

I verified that when I'm back in slide A, variable V1 is equal to 1.00, but still the state of the button in slide A remains normal instead of custom

I hope that this makes my issue more clear

Please advise 

moshe shenker

Hi Ashley

Here is another attempt to rephrase my issue. Please disregard the previous attempt:

I have a rectangle  in slide A with 2 states: normal and custom state

When I click on this rectangle   I go to a light box. In the light box I click on a button which changes the value of the variable V1 from 0.00 to 1.00

When I go back to slide A I wish that the rectangle  there would change its state from normal to custom because V1 equals 1.00

I tried to create a trigger for this but the trigger doesn't work and the rectangle   remains in its normal state

I verified that when I'm back in slide A, the variable V1 is equal to 1.00

I hope that this makes my issue  clearer

Please advise 

BR
Moshe
Steve Flowers

Hi Moshe - 

Unfortunately, there isn't an event that recognizes the change back on the base slide. Everything is frozen while the lightbox is open. 

Fortunately, there's a workaround that'll function in the Flash output

Unfortunately, this workaround doesn't work in the HTML5 output.

Here's how I make this work:

  • When I trigger the lightbox from the base slide, I do this via a layer not directly from a button on the base slide. For example, a button on the base slide opens a layer. I make this layer about a second or so long.
  • On this layer, I place a trigger at the start of the layer's timeline to open the lightbox.
  • On the same layer, I place a trigger that updates my base slide object states (with conditions) when the layer's timeline ends. 

Since the layer will be paused when the lightbox is open, the end trigger won't fire yet. When you close it, the layer continues to play and fires the event at the end of the layer timeline. In HTML5, the layer doesn't continue to play (bug has been reported.) Let me know if you need an example. This is the only way I've found to do this.

moshe shenker

Hi Steve 

I did some experiments using your ideas and it seems that it works without a layer as follows:

I have a trigger in the base slide that opens a light box when I click on a rectangle

In the light box i click on a button that changes the value of a variable into 1.00 or 2.00

I have also a trigger in the base slide that changes the state of the rectangle to one of custom states when timeline ends and the value  of the variable is either 1.00 or 2.00

Thanks for your advice. I understand what happens when there is a light box and the importance of the "when timeline ends"

Thank again

Moshe

This discussion is closed. You can start a new discussion or contact Articulate Support.