Mike Waller
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 ></TEXTFOR MAT>
Any ideas?
<CFFILE ACTION="Read"
FILE="path\whatsnew.txt"
VARIABLE="getthisText">
<cfoutput>
<script type="text/javascript">
// <![CDATA[
var flashFile ="whatsnew.swf?noCache="+(
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
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ok,
how you are trying to retreive this variable inside flash
how you are trying to retreive this variable inside flash
ASKER
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,
please show me code which you are using to use value of passed variable...
plz copy/paste here,
ASKER