Variables That Display Images

Jul 02, 2012

Is it possible to have a variable display an image?  I am creating a pre test called "Bribe or No Bribe" and I want the appropriate image to display on a future slide once a response is selected. 

I tried using a text variable and pasting the image's URL into the Value field, but my display slide would only display the URL I entered (i.e. the value).  Any ideas here?

9 Replies
Steve Flowers

Couple of ways to work this out using layers or states.

1- create an object with images as states. On timeline start, evaluate a variable and send the object to the state based on a conditional value. When the timeline starts set the state of Object 1 to bear when variable1==bear. 

2 - create a layer with your image. On timeline start, evaluate a variable and show a layer based on a conditional value. When the timeline starts show layer bear when variable1==bear. 

Nancy Woinoski

 This can be done.

Say you have a picture of a dog.

You would first have to create a true/false variable called dog and set the initial value to false.

Then on the slide where you want the user to select the dog -  select the image and add an object trigger that sets the dog variable to true when the user clicks the image.

To get the image to display on another slide - you have to add a layer to the slide (we'll call it Show Dog for this example) and put the image of the dog on that layer in the position where you want it to appear

On the base slide - create a slide trigger that says show layer: Show Dog when the timeline starts if the variable dog is equal to true.

That should do it.

Kristin Butters

Hi!  This method works for me, but is there a way to show/hide the image without having to make additional slide layers?  

I was thinking that if var X = true, then show image X rather than if var x = true, show layer x.  Does that make any sense?  I was just hoping there was a cleaner way of showing the selected avatar across a large project (with many slides).  Thanks!

Jenny Carter

This post was extremely helpful and I was able to get everything working properly.

I'd like to add something to this, but cannot figure out how to get it to work.

Goal:  Allow the end user to pick 2 main characters out of 6 to be displayed throughout the course.

Problem:  After choosing 2 characters, only one displays even though according to the variables, 2 should be displayed.

Question:  Is it not possible to show the base layer + 2 additional layers?  Is it possible to have 2 layers calling variables at the same time?

Any input would be appreciated.

Thanks!

Jenny

Lenae Boykin

I have the same question as Jenny as I am trying to show 'completed check marks' on a fictious menu slide to show that user has visited one of the four available modules. It seems that you cannot apply multiple layers to one variable set to the base screen.

For example setting the false variable for the base screen and have the four layers set to true. Only one of the layers is working.

Ashley Terwilliger-Pollard

Hi Lenae,

I'm not sure that Jenny is subscribed to this thread, so you may want to PM her if you're interested in her particular set up. 

In the meantime, I did want to point you to this thread where they've done something similar, and this thread with a screenr from Phil on controlling the state through variables. 

Jennifer Delamota

Hi, I am working on scenario training. the learner gets to pick a player, which I used photos of not built-in characters. 

I have set the triggers correctly for when to learn selects a player. I also added variables for the next slide but for some reason the photo(player) that the learner didn't continue to appear.