Link to home
Start Free TrialLog in
Avatar of Mike Waller
Mike WallerFlag for United States of America

asked on

Can't insert variable using SWFObject

I'm trying to 1) read a txt file, then 2) insert a string from a txt file into a flash textfield using SWFObject.  The string though has double quotes around each element (see below).  Here's my SWFObject script but the flash movie doesn't even show up in the page:

<CFFILE ACTION="Read"
    FILE="path\whatsnew.txt"
    VARIABLE="getthisText">
      

<cfoutput>
<script type="text/javascript">

            // <![CDATA[
            var flashFile ="whatsnew.swf?noCache="+(new Date().getTime());
            var so = new SWFObject("whatsnew.swf", "whatsnew", "766", "700", "7.0.0.0", "##000000");
            so.addParam("wmode", "transparent");
            so.addParam("menu", "false");
            so.addVariable("gettext", "#getthisText#");
            so.write("flashcontent");
            // ]]>
</script>
</cfoutput>

Here's the txt file:

<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">test</FONT></P></TEXTFORMAT>


Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Waller

ASKER

Hi Aneesh, tried that but didn't work.
ok,

how you are trying to retreive this variable inside flash
Through a textfield
I mean to say,
please show me code which you are using to use value of passed variable...

plz copy/paste here,