<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><html>On Apr 20, 2008, at 8:46 AM, billy cokalopolous wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>I've been having a real tough time finding documentation on how to do the following:<br><br>I am creating a openlaszlo program , profile.lzx. I plan to compile to swf.&nbsp; My trouble is learning how to capture parameters passed to the lzx file and use those variables in the app.&nbsp; <br> <br>So:<br><br>profile.lzx?profile_id=4 (this would eventually pass to profile.swf?profile_id=4)<br><br>In the app, I want to take that ID of 4 and pass it to the following:<br><br>&lt;dataset name="dset"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; request="true" type="http"<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src="<a href="http://somedomain.com/flash_profile.php?profile_id=4">http://somedomain.com/flash_profile.php?profile_id=4</a>"/><br><br>How do I set a variable for profile_id, then how to I pass the value to the dataset tag? <br> <br>Thanks,<br>BC<br><br></blockquote></div><br><div><br></div><div>I've done this. The HTML serving up your SWF would contain something like this:</div><div><br></div><div>&lt;script type="text/javascript"></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Lz.swfEmbed({url: 'main.lzx.lzr=swf8.swf?&amp;lzproxied=false&amp;profile_id_param=4', bgcolor: '#ffffff', width: '100%', height: '100%', id: 'lzapp', accessible: 'false'});</div><div>&lt;/script></div></div><div><br></div><div>And then in your app 'profile_id_param' will be a global variable.</div><div><br></div><div>For the dataset use this:</div><div><br></div><div><div>&lt;dataset name="dset"&nbsp;request="false" type="http"&nbsp;src="<a href="http://placeholder.com">http://placeholder.com</a>"/></div><div><br></div><div>And then use a script to set the real src and params:</div><div><br></div><div>&lt;script></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>var d = canvas.datasets.dset;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>d.src = '<a href="http://somedomain.com">http://somedomain.com</a>';</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>var p = new LzParam();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>p.addValue('profile_id',&nbsp;profile_id_param, true);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>d.setQueryString(p);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>d.sendRequest();</div></div><div>&lt;/script></div><div><br></div><div>This is untested email code, but I think that's the gist of it.</div><div><br></div><div>Dave</div><div><br></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></body></html>