That's a tough egg to crack. If you only use triggers, it's not going to work because both triggers are associated with the button and both fire each time you click. Hence, they interfere with one another. To do this, you'll need a little variable helper and some cool coding.
Get ready to Toggle your Variable!
I've attached the sample on how you accomplish this.
I'm not sure if there is functionality in the triggers to accomplish that. I'll let others weigh in though.
As a work-around, you could use a slide layer that contains the same object with the "selected" state. When the user clicks the object on the base layer, simply show the selected layer (which is nothing more than the same object with some indication that it's selected). On that selected layer, have a trigger that hides the layer when the user clicks on the selected object. In essence, you'd be toggling the selected layer on and off to simulate the click once to turn on, click again to turn off effect.
Variables are carried across slides and their status can always be called. So let's say you have a rectangle on slide 429, all you have to do is add a trigger on that slide that says change state of object X when timeline starts if variable is.....
I may be getting the wrong end of the stick, but if you give an object a selected state and dont associate it with a button set, it will toggle between selected and normal without doing any work or use a variable
As you may have surmized, I am using variable staements to show, on a single slide, a list of selections that are made over a couple of slides.
Select the rectangle on slide 5 and it shows up in a list of all choices possible on slide 7 as one of your choices. (using selected state with a glow)
I have set a trigger on the "results" slide that says the following:
Action: Change state of
On Object: rectangle
To stat: Selected
When: Timeline starts
Object: 2,3 Results Slide
On Condition: Variable 1 = = Equal to False
And that is where my question lies - does it matter if I set the object as the slide or the rectangle?
ie: Object: rectangle or Object: 2,3 Results Slide
You'd want the object to be when you want the trigger to fire. Having it occur at the start of the rectangle or the start of the slide may be 2 different things in some cases. Granted, if the rectangle comes on at the start of the slide, then they both will function in the same manner. However, if the rectangle doesn't come on the slide until 3 or 4 seconds in - then the trigger won't fire until that time as that would be the start of the rectangle.
If I'm wanting triggers to fire when a slide first loads, then I always will use the timeline starts for the slide itself.
The funny thing is, it's based off of an example Arlyn did back in the beta. And after I had spent an hour "figuring out" how to do it using Arlyn's example, I discovered a file from last summer where I had "figured out" the exact same thing. Ugghh...
You could convert the page to freeform and set the object as a part of a pick one or pick many freeform question, without correct or incorrect answers. That will allow you to select and deselect any object.
Thanks Mike! I know this post has been around for 8 years and I was excited to find it along with your example. I believe you just saved me hours of useless trigger programming!
I hadn't even thought about using a variable. It all makes sense now. It worked out and now I have a beautiful working slide.
22 Replies
Michael,
That's a tough egg to crack. If you only use triggers, it's not going to work because both triggers are associated with the button and both fire each time you click. Hence, they interfere with one another. To do this, you'll need a little variable helper and some cool coding.
Get ready to Toggle your Variable!
I've attached the sample on how you accomplish this.
Mike
I'm not sure if there is functionality in the triggers to accomplish that. I'll let others weigh in though.
As a work-around, you could use a slide layer that contains the same object with the "selected" state. When the user clicks the object on the base layer, simply show the selected layer (which is nothing more than the same object with some indication that it's selected). On that selected layer, have a trigger that hides the layer when the user clicks on the selected object. In essence, you'd be toggling the selected layer on and off to simulate the click once to turn on, click again to turn off effect.
I like Mike's way much better. Thanks for that MIke - that will simply some of my building for future projects.
That is great! thank you again.
Your fix is working really well.
Is there a way to make that on/off status reflect to another object on another slide? i.e.
To use your example:
When I select the rectangle and change its state, can I have that state reflected in a "mini rectangle" on another slide.
Is that some sort of call to the variable?
Thanks in advance!
Michael,
Variables are carried across slides and their status can always be called. So let's say you have a rectangle on slide 429, all you have to do is add a trigger on that slide that says change state of object X when timeline starts if variable is.....
Mike
In between the time that I wrote and the time you responded the scales fell from my eyes.
I select it on one slide, it shows what I selected on another and displays that in a chart.
I will put up a demo when it is complete and scoured.
Thanks for your help. I just needed a push to turn the engine over!
I may be getting the wrong end of the stick, but if you give an object a selected state and dont associate it with a button set, it will toggle between selected and normal without doing any work or use a variable
D'OH!
Phil is right. And that's sooo much easier!
Sorry for the overly complex solution Michael! I got all caught up in variables, etc.
Mike loved your example, may get me out of a hole one day
Thanks,
I do have one last little question.
As you may have surmized, I am using variable staements to show, on a single slide, a list of selections that are made over a couple of slides.
Select the rectangle on slide 5 and it shows up in a list of all choices possible on slide 7 as one of your choices. (using selected state with a glow)
I have set a trigger on the "results" slide that says the following:
Action: Change state of
On Object: rectangle
To stat: Selected
When: Timeline starts
Object: 2,3 Results Slide
On Condition: Variable 1 = = Equal to False
And that is where my question lies - does it matter if I set the object as the slide or the rectangle?
ie: Object: rectangle or Object: 2,3 Results Slide
It seems to work both ways.
You'd want the object to be when you want the trigger to fire. Having it occur at the start of the rectangle or the start of the slide may be 2 different things in some cases. Granted, if the rectangle comes on at the start of the slide, then they both will function in the same manner. However, if the rectangle doesn't come on the slide until 3 or 4 seconds in - then the trigger won't fire until that time as that would be the start of the rectangle.
If I'm wanting triggers to fire when a slide first loads, then I always will use the timeline starts for the slide itself.
Phil,
The funny thing is, it's based off of an example Arlyn did back in the beta. And after I had spent an hour "figuring out" how to do it using Arlyn's example, I discovered a file from last summer where I had "figured out" the exact same thing. Ugghh...
Mike
I have "programmed" in selected state a couple of times and then had that DOH moment when you realise it is already there
Mike I want to say Thank You 3 years + later that your test module helped me out.
Thanks for popping in to share William and I'm glad to hear it.
You could convert the page to freeform and set the object as a part of a pick one or pick many freeform question, without correct or incorrect answers. That will allow you to select and deselect any object.
Thanks Mike! I know this post has been around for 8 years and I was excited to find it along with your example. I believe you just saved me hours of useless trigger programming!
I hadn't even thought about using a variable. It all makes sense now. It worked out and now I have a beautiful working slide.
Thank you!
Hi Esther,
That's wonderful! I'm glad it's still helping. I would, however, point out Phil's comment. You may not need the variable.
Mike
Wow!!!! This was posted 8 years ago, but it is working perfectly for me now in quarantine 2020!
Thanks
Dyane
A solution that stands the test of time! Toggle variable worked perfectly for me today; thanks Mike Enders!
Thanks for sharing the file Mike.