Spock's Forum Posts

  • Ok, so I disabled every instance of pathfinding. The error is gone. however in FF (Mac or PC) the game is just a black screen. no loader or activity. Is this a Jave issue?

  • This may be unrelated to the 1.26 Update. Seems something I added is crashing. I ran some of my older versions and they work in FF. Looking at the error, I guess its something wrong with my pathfinding...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Since the new 1.26 Update I no longer can view my game in other browsers. Only works in chrome. I tried on PC and Mac. I get the following Error in FireFox view preview. Still crashes when the game runs live from my server.

    Javascript error!

    TypeError: postMessage requires more than 0 arguments

    localhost/pathfind.js, line 164 (col undefined)

    This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer!

  • Well, got this to work. It seems it only works with "crop". Delete everything above the CSS and add the following. (HOWEVER) I now notice that sometimes if you rotate the phone the bar will come back and push the layout up. Ehhh this is hopeless.

    -------------------------------------------------------------

    <!DOCTYPE html>

    <meta charset=utf-8>

    <meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta name=apple-mobile-web-app-capable content=yes>

    <meta name=apple-mobile-web-app-status-bar-style content=black>

    <title>Test fullscreen</title>

    <style>

    html, body {

    margin: 0;

    padding: 0;

    }

    #page {

    position: absolute;

    width: 100%;

    height: 100%;

    -webkit-box-sizing: border-box;

    box-sizing: border-box;

    }

    </style>

    <div id=page></div>

    <script>

    var page = document.getElementById('page'),

        ua = navigator.userAgent,

        iphone = ~ua.indexOf('iPhone') || ~ua.indexOf('iPod'),

        ipad = ~ua.indexOf('iPad'),

        ios = iphone || ipad,

        // Detect if this is running as a fullscreen app from the homescreen

        fullscreen = window.navigator.standalone,

        android = ~ua.indexOf('Android'),

        lastWidth = 0;

    if (android) {

    // Android's browser adds the scroll position to the innerHeight, just to

    // make this really <img src="smileys/smiley35.gif" border="0" align="middle" /> difficult. Thus, once we are scrolled, the

    // page height value needs to be corrected in case the page is loaded

    // when already scrolled down. The pageYOffset is of no use, since it always

    // returns 0 while the address bar is displayed.

    window.onscroll = function() {

        page.style.height = window.innerHeight + 'px'

    }

    }

    var setupScroll = window.onload = function() {

    // Start out by adding the height of the location bar to the width, so that

    // we can scroll past it

    if (ios) {

        // iOS reliably returns the innerWindow size for documentElement.clientHeight

        // but window.innerHeight is sometimes the wrong value after rotating

        // the orientation

        var height = document.documentElement.clientHeight;

        // Only add extra padding to the height on iphone / ipod, since the ipad

        // browser doesn't scroll off the location bar.

        if (iphone && !fullscreen) height += 60;

        page.style.height = height + 'px';

    } else if (android) {

        // The stock Android browser has a location bar height of 56 pixels, but

        // this very likely could be broken in other Android browsers.

        page.style.height = (window.innerHeight + 56) + 'px'

    }

    // Scroll after a timeout, since iOS will scroll to the top of the page

    // after it fires the onload event

    setTimeout(scrollTo, 0, 0, 1);

    };

    (window.onresize = function() {

    var pageWidth = page.offsetWidth;

    // Android doesn't support orientation change, so check for when the width

    // changes to figure out when the orientation changes

    if (lastWidth == pageWidth) return;

    lastWidth = pageWidth;

    setupScroll();

    })();

    </script>

  • Wrangler: I get the same results on Android when I use CSS or JavaScript to hide the bar. It adds a margin at the top which triggers the address bar to hide however pushes my layout down.

  • I am testing live on my server on android via scale with no results.

  • Hello,

    I have tried the built in setting "Hide address bar" as well a bunch of JavaScript scripts but all fail. I also tried some things with Browser objects. Seems I get some results when I set full-screen to off. However I want to use scale to fit all mobile screens seamlessly.

    Any advice will be amazing on how to hide that darn Address Bar for a Web Mobile Game..

    Thanks <img src="smileys/smiley17.gif" border="0" align="middle" />

  • PERFECT :) thank you very much for the help!!

  • Hello,

    I have seen various examples of this, however I cant seem to get this to work.

    What I am trying to do is:

    1. If mouse is moving Up set animation frame to 0

    2. if mouse is moving Down set animation frame to 1

    3. if mouse is moving Left set animation frame to 2

    4. if mouse is moving Right set animation frame to 3

    A capx would help so much for me to visually understand how to do this in Construct 2. I am able to do this kind of thing in Actionscript 3 but not CS2 :(

  • Hello,

    My first post on the forums.

    I notice that blending modes dont seem to work on all my browsers. Ranging from PC to MAC all with the latest Chrome, FF, IE, Safari. It works on some but doesn't work on others. For example, PC works on Chrome and MAC doesn't work on Chrome but works on FF. Newest IE, doesn't work on anything. On a friends PC, it doesn't work on any browser. I dont know if maybe some machines dont have the most recent java installed or?

    QUESTION: How can I make sure blending modes will work on all browsers. Can I run a compatibility check on load to make sure our users have an updated browser or java? What is the best way to get this to work for everyone? And what exactly would be missing that is preventing Blending Modes to work?