2

I am using the following code reference from Adobe Edge Commons example MixitBaby but I keep getting this error on Chrome & IE10, this works fine on Firefox though.

"Uncaught ReferenceError: EC is not defined"

function soundSetup()
{
    var assetsPath = "sound/";
    EC.Sound.setup(
         [
              {src: assetsPath + "introsound.mp3|" + assetsPath + "introsound.ogg", id: "intro"}
         ],
         function(){ EC.info("Sound setup finished", "DEMO"); }
    );
}

yepnope({
    load: "js/EdgeCommons-0.7.1.min.js",
    complete: function() 
    {
        if(EC == undefined)
            yepnope({load: "js/EdgeCommons-0.7.1.min.js", complete: soundSetup});
        else
            soundSetup();
    } //complete
});

-Thanks

2 Answers2

0

If you are working locally, you should download the files and include them locally. I think there are some issues (when you have some js files stored local and some online) with loading files.

eneepo
  • 1,407
  • 3
  • 21
  • 32
0

Are you testing this scenario in a local webserver environment (XAMPP, MAMPP, Apache...)? Otherwise you might run in a sandbox security error while loading external assets from a different folder. And yes: subfolders have a different sandbox.

And you definitely don't have to load Edge Commons twice. The sample scripts from my website www.edgecommons.org should work in Chrome and IE10. If you're still experience the problem, please let me know.

simonwidjaja
  • 549
  • 2
  • 6
  • 13