[Xerte] flash - xerte communication

Mary Ann Ahearn maryann at moberg.com
Wed Apr 14 22:18:19 BST 2010


Here's my xerte conundrum of the day.

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?

Found this somewhat related post in the archives.

Thanks yet again!  Sorry to keep bugging you but your helpfulness 
just reinforces the behavior!
ma
----------
From: d_b_burnett at hotmail.com
To: xerte at lists.nottingham.ac.uk
Subject: Call script function from HREF anchor?
Date: Tue, 22 Dec 2009 12:22:15 -0500
I can't seem to get the syntax for calling a named script icon 
function from an html link.

______________________________________________________________________
In a text icon I have:
<a href="asfunction:_level0.engine.help_function,Click">Click</a>
help_function is the name of an isFunc script icon somewhere above 
the text icon that contains this:
eventObject.word = args[0];
rootIcon.broadcast('showDefinition');
Then I have an event response off an interaction set to icon: 
rootIcon and eventName: showDefinition
Below that in a script:
debug(eventObject.word);

So when you click on the word "Click", it triggers the function and 
passes the word "Click" as an argument.
The function sets "Click" as the word property of eventObject, then 
broadcasts the "showDefinition" event, which is picked up by the 
event response.
Probably just re-invented the wheel, and slightly out of round to boot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100414/f7048a64/attachment.html


More information about the Xerte mailing list