Solved

FSCommand stops work with innerHTML

Posted on 2003-12-09
3
305 Views
Last Modified: 2010-08-05
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.getElementById("emptyflashcontainer");
container.innerHTML="<object classid='...' codebase='...' id='...'><param name='movie' value='mymovie.swf'></object>"
</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.
0
Comment
Question by:Smoerble
3 Comments
 
LVL 27

Accepted Solution

by:
negatyve earned 250 total points
ID: 9909154
>it looses its ability to communicate with the browser via FSCommand

Just a suggestion: for reasons of compatibility, you should never use "FScommand" via browser. Use

getURL("javascript:function_name(parameters)");

instead (FScommand is not compatible with NN)

>If I use the same Flash with the standard <object>... approach it works fine.

exactly, what does the flash movie do with the fscommand?

>I need to load this Flash after the HTML page has finished, therefore I need to use innerHTML or similar.

try this method:

sample: http://flash-mx.html.it/guide/swf/negatyve_javascript/lastLoaded/imagesPreloader.html
source: http://flash-mx.html.it/guide/zip/negatyve_javascript/lastLoaded.zip

the flash movie is loaded only when all the pictures of the page are loaded. works with Netscape Navigator, Internet Explorer, Mozilla.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question