Solved

FSCommand stops work with innerHTML

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

746 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

11 Experts available now in Live!

Get 1:1 Help Now