Smoerble
asked on
FSCommand stops work with innerHTML
When I dynamically include my Flash file in HTML using innerHTML, it looses its ability to communicate with the browser via FSCommand. If I use the same Flash with the standard <object>... approach it works fine.
<div id="emptyflashcontainer">< /div>
<script>
var container=document.getElem entById("e mptyflashc ontainer") ;
container.innerHTML="<obje ct classid='...' codebase='...' id='...'><param name='movie' value='mymovie.swf'></obje ct>"
</script>
Flash is loaded and played correctly but it seems all FSCommand ability FROM the Flash is lost with this approach. The browser can still communicate TO the Flash via Javascript.
I need to load this Flash after the HTML page has finished, therefore I need to use innerHTML or similar.
<div id="emptyflashcontainer"><
<script>
var container=document.getElem
container.innerHTML="<obje
</script>
Flash is loaded and played correctly but it seems all FSCommand ability FROM the Flash is lost with this approach. The browser can still communicate TO the Flash via Javascript.
I need to load this Flash after the HTML page has finished, therefore I need to use innerHTML or similar.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.