Hello,
I've got a flash slider bar which I'm trying to use to control an
embedded Window Media Player. However I keep getting the following
error when the flash fsCommand is fired:
Error: [Exception... "'Permission denied to get property
IDispatch.duration' when calling method: [FlashIObject::evaluate]"
nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location:
"<unknown>" data: no]
I've traced this back to where the code is trying to access one of the
WMP properties: player.currentMedia.duration
The site is running in Firefox 1.0.7 with the ActiveX plugin installed,
shockwave version 7.0 r19 and WMP 10 installed.
Does anyone know if this a problem with the ActiveX/Flash
communication? And if there is a workaround?
All the relevant code is below.
Thanks,
Phil
--Javascript--
//***** Writes VBScript function to capture ActiveX FSCommand event
*******
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub playerSliders_FSCommand(ByVal command, ByVal
args)\n');
document.write('call playerSliders_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
// Accepts call from VBScript function with FSCommand parameters
function playerSliders_DoFSCommand(command, args)
{
if (command == "skip")
{
skipMe(args);
}
}
function skipMe( pos )
{
var player = window.top.document.getElementById('player');
if( player )
{
...
player.currentMedia.duration;
...
}
}
--HTML--Flash--
...
<object id="playerSliders"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
height="16" width="598" vspace="0" border="0"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
viewastext>
<param name="Movie" value="flash/playerSliders.swf">
<param name="PLAY" value="false">
<param name="LOOP" value="false">
<param name="QUALITY" value="high">
<param name="SCALE" value="SHOWALL">
<param name="SeamlessTabbing" value="1">
<embed src="flash/playerSliders.swf"
quality="high"
width="598"
height="16"
name="playerSliders"
swLiveConnect="true"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
...
--HTML--WMP--
...
<OBJECT ID='player' width=320 height=240
classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'
oncontextmenu='return false;'
type='application/x-oleobject'>
<PARAM NAME=FileName VALUE=''>
<PARAM NAME=enableContextMenu VALUE=0>
<PARAM NAME=animationatStart VALUE=0>
<PARAM NAME=transparentatStart VALUE=1>
<PARAM NAME=autoStart VALUE=1>
<PARAM NAME=uiMode VALUE='none'>
<PARAM NAME=stretchToFit VALUE=1>
<PARAM NAME=windowlessVideo VALUE=1>
</OBJECT>
...
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding