faceyspacey's Forum Posts

  • Hey brother, google chrome frame is not an answer. Unfortunately, you can't ask people to install new stuff. That's an answer for me and you as individuals, but not when you're trying to build traffic. If they have to install new stuff, they go away, u know.

    And in my case, these games are targeted towards schools running old browsers, and the installation of google chrome frame is not happening, and 50% of this old school education market is using ie7 and ie8. So without flash, you basically have lost 50% of your market. You may say why not do it all in Flash then--well then you don't get the new gen tablets and phones.

  • connected.mcgraw-hill.com/media/bb/activities/M5A032_indev/M5A032_indev.dcr

    It's not really a level based game. But do you think C2 will be able to get this done quickly? Mainly, are there any things C2 won't be able to do that this game needs?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there, this is a thread dedicated to getting sound to work in IE7 and IE8. Using flashcanvas pro from http://www.flashcanvas.net, I got C2 working in IE7 and IE8. I outline the relatively simple formula here:

    http://www.scirra.com/forum/flashcanvas-an-answer-for-nonhtml5-browsers_topic48639.html

    My next step is to get sound working. Why isn't C2 using SoundManager2? Is making that the default audio engine the way to go, or is that a worse route than extending their current audio engine to work in IE7 and IE8?

    Any help with this would be much appreciated, particularly from developers of the platform. Are you guys interested in solving this problem? Is there a reason you haven't supported IE7 and IE8 using flashcanvas in the past? It was easy enough and the results are fantastic. It should at least be an option. The game I tested it with, Space Blasters, flickers a bit, but many slower games wouldn't have that problem. And maybe that flickering is just because I'm accessing windows in a virtual machine on my Mac. Let me know if you guys experience the slight flickering.

  • So, I got flashcanvas pro from flashcanvas.net working!

    You can view it on my server here:

    linkit.faceyspacey.com

    Ok here's what I did:

    1) dropped the flashcanvas /bin folder with all their goodies in the document root

    2) i added the js that turns it on when needed by adding this at the top of the <head>:

    <!--[if lt IE 9]><script type="text/javascript" src="bin/flashcanvas.js"></script><![endif]-->

    3) i created javascript indexOf() function for arrays and put it before the Construct 2 runtime js:

    <script type="text/javascript">

    if (!Array.prototype.indexOf) {   Array.prototype.indexOf = function(elt /*, from*/)   {     var len = this.length >>> 0;      var from = Number(arguments[1]) || 0;     from = (from < 0)          ? Math.ceil(from)          : Math.floor(from);     if (from < 0)       from += len;      for (; from < len; from++)     {       if (from in this &&           this[from] === elt)        return from;     }     return -1;   }; }

    </script>

    4) I loaded all the runtime js and index.html js generated by Construct 2 at the appropriate time (i just did it for now how the flashcanvas.net examples do it), which is like this:

    <body onload="setup()">

    5) then i created 2 setup() functions. one for IE 8 and below, and one for everything else. Here's how I toggle between the two:

    <!--[if IE]><script type="text/javascript" src="setup-ie.js"></script><![endif]-->

    <![if !IE]><script type="text/javascript" src="setup.js"></script><![endif]-->

    6) so here's what setup-ie.js looks like. And I'll summarize what I did first. Basically it writes to the dom a different c2runtime.js file called c2runtime-ie.js. And in that js file all I did was change the addEventListener methods to attachEvent, which is supported in IE7 and IE8. And i did the same thing in setup-ie.js file, which contains the js Construct 2 puts in the index.html file. So here is setup-ie.js:

    function setup() {

    $('head').prepend("<script src='c2runtime-ie.js'>\x3C/script>");

    jQuery(window).resize(function() {

                   if (window.c2resizestretchmode === 1)

                   {

                        window.c2resizestretchmode = 2;          // put back when breaking back out of fullscreen

                        var canvas = document.getElementById("c2canvas");

                        window.c2oldcanvaswidth = canvas.width;

                        window.c2oldcanvasheight = canvas.height;

                        window.c2eventtime = Date.now();

                        var w = jQuery(window).width();

                        var h = jQuery(window).height();

                        cr_sizeCanvas(w, h);

                   }

                   else if (window.c2resizestretchmode === 2)

                   {

                        // Size event fires twice on FF + Chrome, ignore second trigger

                        if (Date.now() > window.c2eventtime + 50)

                        {

                             window.c2resizestretchmode = 0;

                             cr_sizeCanvas(window.c2oldcanvaswidth, window.c2oldcanvasheight);

                        }

                   }

              });

         

              // Start the Construct 2 project running on window load.

              jQuery(document).ready(function ()

              {

                   // Create new runtime using the c2canvas

                   cr.createRuntime("c2canvas");

              });

              

              // Pause and resume on page becoming visible/invisible

              function onVisibilityChanged() {

                   if (document.hidden || document.mozHidden || document.webkitHidden || document.msHidden)

                        cr_setSuspended(true);

                   else

                        cr_setSuspended(false);

              };

              

              document.attachEvent("visibilitychange", onVisibilityChanged, false);

              document.attachEvent("mozvisibilitychange", onVisibilityChanged, false);

              document.attachEvent("webkitvisibilitychange", onVisibilityChanged, false);

              document.attachEvent("msvisibilitychange", onVisibilityChanged, false);

    }

    ------

    So that leaves getting sound to work. I just started using Construct 2, with the sole aim being to get this to work in IE7 and IE8 using flash canvas. I looked through its Audio object real quick, and it seems completely custom, rather than based on SoundManager2, which seems to be the best cross-platform audio option.

    C2 TEAM CAN WE REPLACE YOUR AUDIO FRAMEWORK WITH SOMETHING MORE CROSS PLATFORM AND MAKE IE7/IE8 SUPPORT ONE OF YOUR KEY SELLING POINTS? It seems to be a no brainer at this point. Maybe there are other bugs, depending on what you want to do with C2 that has made them stay away from IE7/IE8, but if their pretty fancy Space Blasters game works in IE7/IE8, many games your developers will want to make will work in those browsers.

    What can we do to get sound working in IE7/IE8. What do you recommend?