Dynamic FlashVars and Foxfire

Posted on 2006-03-26
Last Modified: 2008-02-01
I using Javascript to parseout values to send via FlashVars so I'm using the 'document.write' method to construct the Flash related stuff. It works fine for ie but Foxfire chokes on opening. Clearly it has to do with escaping the quotes properly...can someone point me to a working sample?

<script language="JavaScript">
      document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\",0,19,0\" WIDTH=100% HEIGHT=100% name=\"campus\" id=\"campus\" >");
      document.write("<param name=movie value=campus4.swf>");
      document.write("<PARAM NAME=FlashVars VALUE=" + parseData() + ">");
      document.write("<param name=menu value=false>");
      document.write("<param name=quality value=high>");
      document.write("<embed src=campus4.swf\" menu=false FlashVars=" + parseData() + " name=\"campus\" swliveconnect=true  quality=high pluginspage=\"\" width=\"100%\" height=\"100%\" type=\"application/x-shockwave-flash >");

Question by:juststeve
    1 Comment
    LVL 34

    Accepted Solution

    I found an issue in your code ..

    quote is missing just before the SWF name...
    embed src=\"campus4.swf\"

    and one missing quote will effect the all further codes..

    check it if it fix the issue..


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    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…
    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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
    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.

    779 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

    14 Experts available now in Live!

    Get 1:1 Help Now