Decision behind image

Is it possible in Epicenter or Flow.js to have images as decisions, so that a player is presented with several pictures and that the one he/she chooses becomes a decision?

Hi Tim,

There’s different ways to do this. One simple method is to just radio button inputs, with pictures for labels. Clicking the picture by the radio button will change the selection. Use CSS to hide the radio button itself. (I didn’t bother to do this in my example).

Here’s some sample code.


D Product Selection = 1


        <script src="//"></script>
        <script src="//"></script>
        <script src="//"></script>
        <script src="//"></script>

        $(function() { Flow.initialize(); });
    <body data-f-model="model.eqn">

        <P>Current product selection is <span data-f-bind="Product Selection"><span>.   Choose a new product.</p>

        <input type="radio" data-f-bind="Product Selection" value="1" id="cherryRadioBtn">     
           <label for="cherryRadioBtn">
              <img height="100" width="100" src="">
           </label> <br>
        <input type="radio" data-f-bind="Product Selection" value="2" id="blueberryRadioBtn">  
           <label for="blueberryRadioBtn">
              <img height="100" width="100" src="">
            </label> <br>
        <input type="radio" data-f-bind="Product Selection" value="3" id="appleRadioBtn">     
           <label for="appleRadioBtn">
              <img height="100" width="100" src="">
            </label> <br>



That’s great, thank you Will. It worked!