flash (macromedia):
I am developing a website that uses Flash for a navigation menu. See it
http://www.embracethefuture.org.au/test. In order to let the user know where
he/she is in the site, a pointer moves to point to the current topic being
viewed. Easiest to explain if you see the site... Anyway, I need the currently
loaded webpage to tell the Flash menu to move the pointer to the correct
location. I have made all the proper provisions in Flash - I know this because
the system works fine in IE.
What happens on the webpage is an onload event is triggered, which calls this
script:
function setFlashMenu(index) { //'index' is a reference to the menu item
corresponding to this page, where 1st menu item on list is 1, etc.
var menu;
if (parent.parent.frames){
if (isIE()){
menu=parent.parent.frames.menu;
} else {
menu=parent.parent.frames.document.menu;
}
menu.sendPointer(index); // this tells Flash to send the menu pointer to the
location corresponding to this page.
}
setCommentTopic(index);
}
function setCommentTopic(index){
if (index !=1){
var roo;
if (isIE()){
roo=window.commentroo;
} else {
roo=window.document.commentroo;
}
if(roo)
roo.setTopic(index-1);// tells Roofi what to talk about
}
}
The second function here set Comment() does much the same as the first, but
communicates with a different Flash object: the kangaroo that makes various
comments on the topic currently on screen.
The Javascript console in Mozilla and NN gives me the message that
"menu.sendPointer" is not a function. I understand that a different reference
is required for NN etc: window.document.id rather than window.id, as per IE,
but still no go. Can anyone see the problem here? I tried using "name" and "id"
within the <embed> tags that declare the Flash menu. For the sake of
completeness, here is the HTML for the menu:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=7,0,0,0" width="250" height="528" id="menu" valign="top">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="animation/menu.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#fed902" />
<embed src="animation/menu.swf" quality="high" bgcolor="#fed902" width="250"
height="528" id="menu" align="middle" valign="top"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="
http://www.macromedia.com/go/getflashplayer" />
</object>
Thanks in advance. All help rewarded generously in the afterlife.
pp