Iframes Below Construct Sprites?

0 favourites
  • 2 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I want construct animations/sprites etc to sit on top of a video iframe.

    I read this was possible using css styles in another thread but the thread is kind of unclear (and quite old).

    I tried this but it doesnt seem to do anything:

    var myiframe = runtime.getInstanceByUid(3);
    myiframe.setCssStyle.zIndex=-20;
    

    So, Is there any way at all to have content sit in front of an iframe? This would be super useful!!

    If not, could there be some way of having 2 iframes? One iframe of my construct project on top (with a transparent background) with the other (video iframe) content below it? Would that even work?

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You probably already figured out a solution to this problem, but I noticed that no one answered your post when I was searching for an answer to the same issue. In Construct 2 I used to use the browser object's Execute Javascript function to write: "document.getElementById('my_iframe').style.zIndex = '-1'" That worked very well with Pode's iframe, but doesn't seem to work with the Construct 3 iframe object. I did, however, experiment with stacking two iframes on top of each other. The iframe on top references a URL that has a transparent CSS background layer, and within that background I embedded another Construct 3 project, resizing it and placing it so that you can see the Construct iframe underneath it, if that makes sense. I haven't gone beyond that experiment yet, but I suspect that clicking sprites, etc., in the top Construct window (in the top iframe) can be used to set localStorage keys that you can then read in the lower iframe Construct window in order to get it to respond in a particular way. It's hard to put this all into words, lol....

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)