Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
document. = function(event) { var key = String.fromCharCode(event.keyCode); var box1 = tentara.getTransformedBoundingBox(); var box2 = bangunan.getTransformedBoundingBox(); var box3 = bangunan1.getTransformedBoundingBox(); var box4 = kubus.getTransformedBoundingBox(); if(box1.intersectsWithBox(box2)) { setTimeout("tentara.Pos.X + =0", 100); setTimeout("tentara.Pos.Z + =0", 100); setTimeout("tentara.Pos.Y + =0", 100); //document.getElementById("coll").value = "asdf"; } if(box1.intersectsWithBox(box3)) { setTimeout("tentara.Pos.X + =0", 100); setTimeout("tentara.Pos.Z + =0", 100); setTimeout("tentara.Pos.Y + =0", 100); } if(box1.intersectsWithBox(box4)) { ....how to open website? } if(key=='X' && tentara) tentara.Pos.Z += 5; if(key=='Z' && tentara) tentara.Pos.Z -= 5; if(key=='F' && tentara) tentara.Pos.X += 5; if(key=='G' && tentara) tentara.Pos.X -= 5; if(key=='V' && tentara) tentara.Pos.Y += 5; if(key=='B' && tentara) tentara.Pos.Y -= 5; engine.handleKeyDown(event); }; |
||||
|
Just as you would do it with standard java script: window.open('http://www.ambiera.com'); That should work :) |
|