Solved

FSCommand stops work with innerHTML

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
To view Flash technology content error 4 6,492
Download Adobe Flash Player 6 59
flash in chrome 4 86
Text Transformation using ActionScript 3 5 115
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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 …
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 how to record live broadcast.

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now