Ben,
> I have this script which will show the latest topic from my
> message board.
>
> <script language="JavaScript" type="text/javascript"
> src="http://www.deepandtwisted.co.uk/community/
> topics_anywhere.php?mode=show&f=a&n=10&b=non&lp
> i=y&t=_blank"></script>
JavaScript requires a JavaScript engine, which isn't included with Flash
(Flash has its own script, ActionScript). Most browsers have a JavaScript
engine, which is why scripts like the one above usually work in a browser.
You can use the getURL() function in ActionScript to trigger JavaScript
in the HTML page, but ... well, your script points to a PHP file and
features a number of parameters. I presume the PHP file returns a string of
JavaScript rather than a normal page ... if this is so, you *may* be able to
use getURL() with the java script: protocol, as referenced in the
documentation, but I'm not sure your SWF will be able to "get" that it has
to hit the PHP document first to retrieve the JavaScript.
getURL("java script:'http://www.deepandtwisted.co.uk/community/topics_anywher
e.php?code=show&f=a&n=10&b=non&lpi=y&t=_blank'");
David
stiller (at) quip (dot) net
"Luck is the residue of good design."
|