o3d javascript uncaught referenceerror

Posted by David on Server Fault See other posts from Server Fault or by David
Published on 2010-03-31T02:57:43Z Indexed on 2010/03/31 3:03 UTC
Read the original article Hit count: 543

Filed under:
|
|

hey,

im new to javascript and am intersted in creating a small o3d script:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Game Website</title>
</head>

<body>

<script type="text/javascript" src="o3djs/base.js"></script>
<script type = "text/javascript" id="myscript">

o3djs.require('o3djs.camera');

window.onload = init;

function init(){
 document.write("jkjewfjnwle");
}

</script>

<div align="background">
 <div id="game_container" style="margin: 0px auto; clear: both; background-image: url('./tmp.png'); width: 800px; height:600px; padding: 0px; background-repeat: no-repeat; padding-top: 1px;"></div>
</div>

</body>
</html>

the browser cant seem to find o3djs/base.js in this line

<script type="text/javascript" src="o3djs/base.js"></script>

and gives me an uncaught referenceerror at this line

 o3djs.require('o3djs.camera');

Obviously, because it can't find the o3djs/base.js...

I have installed the o3d pluggin from google and they say that should be IT ive tried on firefox, ie and chrome

thanks

© Server Fault or respective owner

Related posts about JavaScript

Related posts about reference