Skip to main content
mohsena1982
Participant
March 30, 2017
Question

Hide & Show Navagation buttons

  • March 30, 2017
  • 2 replies
  • 119 views

i have a slide with image roll over i want the next button appears after the learner is roll over all the images in the slides, how can i do that?

    This topic has been closed for replies.

    2 replies

    TLCMediaDesign
    Inspiring
    March 30, 2017

    If you are not using SWF, this JavaScript entered in the script window on slide enter will do the trick.

    Populate the variable rollArray with a 0 for each element you need to roll over, in this instance it's 3.

    Add an event listener for each of the roll over names in bold below. Put the name of the next button in the cp.show command.

    var rollArray=[0,0,0];

    document.getElementById("Rollover_Area_1").addEventListener("mouseover",rollOver,false);
    document.getElementById("Rollover_Area_2").addEventListener("mouseover",rollOver,false);
    document.getElementById("Rollover_Area_3").addEventListener("mouseover",rollOver,false);

    function rollOver(event)
    {
    var idx=event.target.id.split("_");
    rollArray[idx[idx.length-1]-1]=1;

    if (rollArray.indexOf(0)==-1)
    {
      cp.show("next_btn")
    }
    }

    Lilybiri
    Legend
    March 30, 2017

    You cannot do that out of the box, because rollover for a rollover image is not an event. Rollover exists as event for a rollover slidelet, which could trigger an conditional action. But why still bother with rollovers, since they are not supported for responsive projects?