If you embeded flash in html as your code above, note, that second tag object also has to contain attribute id, corrected code is here:
<div id="flash_content">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1280" height="800" id="tourFlash" name="pano" class="pano">
<param name="movie" value="VRDemo.swf" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
<param name="allowscriptaccess" value="always" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="VRDemo.swf" width="1280" height="800" class="pano" id="tourFlash1">
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
<param name="allowscriptaccess" value="always" />
<param name="allownetworking" value="all" />
<param name="flashvars" value="zoom=null&pan=null&sound=null" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
But of course, swfobject is the best way to embed flash. Correct html code looks like:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>js</title>
<script type="text/javascript" src="swfobject.js"></script>
<script>
function talkToFlash(){
document.getElementById('flash_content').listenToJS('hello from js');
}
var flashvars = {};
var params = {
allowscriptaccess: "always"
}
var attributes = {};
swfobject.embedSWF("VRDemo.swf", "flash_content", "550", "400", "10.0.0", false, flashvars, params, attributes);
</script>
</head>
<body>
<div id="flash_content"></div>
</body>
</html>
--Update--
You have to select the correct flash element on the page. (Depends on the browser). As an example, here is code to get correct flashObj:
flashObj1 = document.getElementById('tourFlash');
flashObj2 = document.getElementById('tourFlash1');
flashObj = flashObj1.talkToFlash != undefined ? flashObj1 : flashObj2;