Solved

FSCommand stops work with innerHTML

Posted on 2003-12-09
3
302 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

776 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