Help with VVVV.js / GoogleChrome-Error: "Origin null is not allowed by Access-Control-Allow-Origin."

392 views
Skip to first unread message

nunull

unread,
Jan 21, 2012, 12:05:43 PM1/21/12
to vvv...@googlegroups.com

hey,

i am absolutely new to v4, but i have a lot of fun with it.
my intention is to do live visuals, and i would to show them on my website using v4.js. so, i try to play my patches in my browser.

my html-file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=windows-1280" />
<link type="text/css" rel="stylesheet" href="style.css" />
<script type="text/javascript" src="vvvv_js/lib/jquery/jquery-1.4.2.min.js"></script>
'' <script type="text/javascript" src="vvvv_js/vvvv.js"></script>''
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<canvas id="renderer" width="480" height="230" style="border:1px solid black;margin-top:10px"></canvas>
</body>
</html>

my js-file:

var patch;
var mainloop;
$(document).ready(function() {
initVVVV('vvvv_js','full');
patch = new VVVV.Core.Patch("v4patches/full.v4p", function() {
mainloop = new VVVV.Core.MainLoop(this);
});
});

i get multiple error-messages in the google chrome-console:

XMLHttpRequest cannot load file:///C:/Users/Websites/tests/vvvv/vvvv_js/lib/underscore/underscore-min.js. Origin null is not allowed by Access-Control-Allow-Origin.

can anybody help me running vvvvjs?

greatings

zauner

unread,
Jan 22, 2012, 4:05:07 AM1/22/12
to VVVV.js
Hi,

this is propably the same issue as in this thread:
http://groups.google.com/group/vvvvjs/browse_thread/thread/53b7d81177292b00

You can't load resources from your local drive (file:///C:/Users/
Websites ...) from JavaScript.

Recently i stumbled upon a chrome command line flag, that might allow
you to do so for development purposes, but I haven't tested it. It's
starting chrome with

chrome.exe --allow-file-access-from-files

Maybe this saves you from having to set up a local webserver.
> > file:///C:/Users/Websites/tests/vvvv/vvvv_js/lib/underscore/underscore-min.js<http://c/Users/Websites/tests/vvvv/vvvv_js/lib/underscore/underscore-...>.
Reply all
Reply to author
Forward
0 new messages