We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Picture change in parent doc (html)

Home Forums General Questions Picture change in parent doc (html)

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #77380
    georgeslambert
    Customer

    Hi,
    I need a way to replace the picture in a div of the interface (parent doc) of an app. with an other picture, when a 3d object is clicked. Which puzzle do I need to use?

    Thanx a lot in advance,
    Georges.

    #77388
    xeon
    Customer

    There is the “Call Method” in the HTML puzzles…..you can simulate a click, you can send a message to the iframe or element and it switch based on the message or click.
    Simulate click will require a button on the html frame that also changes the image, sometimes the image itself.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #77430
    georgeslambert
    Customer

    Thanks for your help Xeon,

    The idea is to call a specific picture for each 3D part hit.
    So action has to return to the HTML parent with specific picture address.
    The workaround was to put a div for each picture used in the parent html, put them all in hidden and trigger them one by one on demand (and hide all again before display another one), but there are a lot of pictures, and this solution feels like quite heavy for the cause.

    Any other idea?

    #77455
    xeon
    Customer

    If the PostMessage of the Call Method puzzle is not good..you could use some JS to do it…something like:

    $(document).ready(function(){
    $(“#img”).on(“click”, function() {
    window.parent.$(“#myPictureID”).css(“background”, “url(/images/r-srchbg_white.png) no-repeat”);
    });
    });

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #77572
    georgeslambert
    Customer

    Thank you Xeon !

    I’m not really good at coding, reason why I use Verge3D. But I’ll try to integrate your code to a puzzle the days to come and return the result here.

    Have a good day,
    Georges

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.