<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Aran for your help on this. The only change I had to make to
your code was putting quotes around the values and it worked like a
charm.<br>
<br>
John<br>
<br>
Aran Rhee wrote:
<blockquote cite="mid001701c71057$1152b2a0$6500a8c0@HYPERION"
type="cite">
<pre wrap="">John.
A few things.
1. The below are all parameters, not variables
so.addVariable("allowScriptAccess", "always");
so.addVariable("movie", "<?=$ray_dir?>ray_chat_loader.swf");
so.addVariable("quality", "high");
so.addVariable("wmode", "transparent");
so.addVariable("base",
</pre>
<blockquote type="cite">
<pre wrap="">"<a class="moz-txt-link-freetext" href="http://">http://</a><?=$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME
</pre>
</blockquote>
<pre wrap=""><!---->'])?>/");
The should be added like the below:
so.addParameter("allowScriptAccess", "always");
*** BTW you don't need movie param, as this is already created for you in
your swf constructor call. ***
2. FlashVars is one variable with "&" delimited values in normal embedd, but
in swfObject you pass name value pairs seperately (it constructs the
flashVars for you from the pairs). So the vars you want to add would be
something like:
so.addVariable("ID", <?=$ID?>);
so.addVariable("NickName", <?=$NickName?>);
so.addVariable("url", <?=$ray_xml?>);
so.addVariable("lang_url", <?=$ray_lang?>);
Cheers,
Aran
</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:swfobject-bounces@lists.deconcept.com">swfobject-bounces@lists.deconcept.com</a>
[<a class="moz-txt-link-freetext" href="mailto:swfobject-bounces@lists.deconcept.com">mailto:swfobject-bounces@lists.deconcept.com</a>] On Behalf Of
Lifestyle Clubhouse administrator
Sent: Saturday, 25 November 2006 2:21 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:swfobject@lists.deconcept.com">swfobject@lists.deconcept.com</a>
Subject: [SWFObject] Getting connection errors with my flash
chat program
I can't get SWFObject to work with my flash-based chat
program. Here's the original working code:
<object classid=<a class="moz-txt-link-rfc2396E" href="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"</a>
codebase=<a class="moz-txt-link-rfc2396E" href="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">"http://fpdownload.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=8,0,0,0"</a>
width="730" height="515" id="ray_chat" align="middle"> <param
name="allowScriptAccess" value="always" /> <param
name="movie" value="<?=$ray_dir?>ray_chat_loader.swf" />
<param name="quality" value="high" /> <param name="wmode"
value="transparent" /> <param name="base"
value="<a class="moz-txt-link-freetext" href="http://">http://</a><?=$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIP
</pre>
</blockquote>
<pre wrap=""><!---->T_NAME'])?>/"
</pre>
<blockquote type="cite">
<pre wrap="">/>
<param name="FlashVars"
value="ID=<?=$ID?>&NickName=<?=$NickName?>&url=<?=$ray_xml?>&l
</pre>
</blockquote>
<pre wrap=""><!---->ang_url=<?=$ray_lang?>"
</pre>
<blockquote type="cite">
<pre wrap="">/>
<embed
src="<?=$ray_dir?>ray_chat_loader.swf"
id="ray_chat"
quality="high"
wmode="transparent"
bgcolor="#ffffff"
width="730" height="515"
name="ray_chat"
align="middle"
allowScriptAccess="always"
base="<a class="moz-txt-link-freetext" href="http://">http://</a><?=$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT
</pre>
</blockquote>
<pre wrap=""><!---->_NAME'])?>/"
</pre>
<blockquote type="cite">
<pre wrap="">
FlashVars="ID=<?=$ID?>&NickName=<?=$NickName?>&url=<?=$ray_xml
</pre>
</blockquote>
<pre wrap=""><!---->?>&lang_url=<?=$ray_lang?>"
</pre>
<blockquote type="cite">
<pre wrap="">
pluginspage=<a class="moz-txt-link-rfc2396E" href="http://www.macromedia.com/go/getflashplayer">"http://www.macromedia.com/go/getflashplayer"</a> /> </object>
And here's the new code with SWFObject:
<script type="text/javascript">
var so = new SWFObject("<?=$ray_dir?>ray_chat_loader.swf",
"ray_chat", "730", "515", "8", "#ffffff");
so.addVariable("allowScriptAccess", "always");
so.addVariable("movie", "<?=$ray_dir?>ray_chat_loader.swf");
so.addVariable("quality", "high");
so.addVariable("wmode", "transparent");
so.addVariable("base",
"<a class="moz-txt-link-freetext" href="http://">http://</a><?=$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME
</pre>
</blockquote>
<pre wrap=""><!---->'])?>/");
</pre>
<blockquote type="cite">
<pre wrap=""> so.addVariable("FlashVars",
"ID=<?=$ID?>&NickName=<?=$NickName?>&url=<?=$ray_xml?>&lang_ur
</pre>
</blockquote>
<pre wrap=""><!---->l=<?=$ray_lang?>");
</pre>
<blockquote type="cite">
<pre wrap=""> so.write("flashcontent");
</script>
The script loads up, but I get a connection error with my
chat server.
I've experimented with adding "getQueryParamValue" to the
"base" and "FlashVars" variables, but that didn't work.
Any ideas? Thanks in advance.
John
_______________________________________________
SWFObject mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SWFObject@lists.deconcept.com">SWFObject@lists.deconcept.com</a>
<a class="moz-txt-link-freetext" href="http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com">http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
SWFObject mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SWFObject@lists.deconcept.com">SWFObject@lists.deconcept.com</a>
<a class="moz-txt-link-freetext" href="http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com">http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com</a>
</pre>
</blockquote>
<br>
</body>
</html>