<html>
<body>
Here's my xerte conundrum of the day.<br><br>
Can I send a
"rootIcon.broadcast('myFunctionName');" from flash and
pass arguments to the xerte function? Can't figure out how to do
it. Can I use eventObject to pass stuff from flash?
What exactly is its structure? What about the args array? Is
there a sample you could direct me to for the syntax?<br><br>
Found this somewhat related post in the archives.<br><br>
Thanks yet again! Sorry to keep bugging you but your helpfulness
just reinforces the behavior!<br>
ma
<dl><hr>
<font color="#008000">
<dd>From: d_b_burnett@hotmail.com
<dd>To: xerte@lists.nottingham.ac.uk
<dd>Subject: Call script function from HREF anchor?
<dd>Date: Tue, 22 Dec 2009 12:22:15 -0500<br>
<dd>I can't seem to get the syntax for calling a named script icon
function from an html link.<br><br>
<dd>
______________________________________________________________________
<dd>In a text icon I have:
<dd><a
href="asfunction:_level0.engine.help_function,Click">Click</a><br>
<dd>help_function is the name of an isFunc script icon somewhere above
the text icon that contains this:
<dd>eventObject.word = args[0];
<dd>rootIcon.broadcast('showDefinition');<br>
<dd>Then I have an event response off an interaction set to icon:
rootIcon and eventName: showDefinition<br>
<dd>Below that in a script:
<dd>debug(eventObject.word);
<dd>
<dd>So when you click on the word "Click", it triggers the
function and passes the word "Click" as an argument.
<dd>The function sets "Click" as the word property of
eventObject, then broadcasts the "showDefinition" event, which
is picked up by the event response.<br>
<dd>Probably just re-invented the wheel, and slightly out of round to
boot.</font>
</dl></body>
</html>