You can use asfunction.
function foo (bar) {
trace (bar);
}
this.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, 200, 100);
my_txt.autoSize = true;
my_txt.html = true;
my_txt.htmlText = "<a href=\"asfunction:foo, Hello Word!\">Click Me</a>";
-- JOR
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
sebastian wrote:
Hello again, a more difficult question maybe...
Is there any way for me to capture a user click on an href tag inside of
a CSS formatted html text field?
Here is what I do:
- CDATA formatted text in an XML file.
- load it and associate a CSS file to a generated text field at run time.
- resulting <a> tags have links assigned to them.
- user 'clicks' them -> event capture??
In other words: what I need to do is to hear the event so I can dispatch
an event to my Controller class [who then sends info to the stats class,
and opens a browser window with predetermined formatting].
At the moment I can't see a way for this event to be heard by my
controller. Maybe this is simple? maybe its impossible, or complex...
any ideas? Javascript maybe?
Thanks for your help!
seb.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com