Solved

FSCommand stops work with innerHTML

Posted on 2003-12-09
3
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

622 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