Answers

Question and Answer:

  Home  SWFObject

⟩ Do you know why does not fscommand work in Internet Explorer with dynamic publishing?

A In order to make fscommand work in Internet Explorer Adobe recommends to add a block of VBScript to capture and forward the FSCommand calls to JavaScript. However VBScript doesn't work anymore when a Flash movie is inserted using innerHTML or outerHTML, as SWFObject's dynamic publishing method does.

Fortunately you can also use JavaScript instead of VBScript to catch the fscommand calls. A small downside is that it uses proprietary attributes (which, again, wrapped in conditional comments will keep your code valid). E.g. the following block of VBScript code:

<SCRIPT LANGUAGE=VBScript>

on error resume next

Sub myCom_FSCommand(ByVal command, ByVal args)

call myCom_DoFSCommand(command, args)

end sub

</SCRIPT>

Can be replaced with:

<!--[if IE]>

<script type="text/javascript" event="FSCommand(command,args)" for="myCom">

myCom_DoFSCommand(command, args);

</script>

<![endif]-->

 197 views

More Questions for you: