Hello,
The function to respond to a hyperlink is currently platform-dependent,
although just a few days ago
I added a cross-platform mechanism to the LFC. That is available only if you
run a nightly build at the moment.

If you look at the implementation, the actual mechanism for Flash 8
applications is to use the syntax <a href="asfunction:funcname,arg">,
whereas for DHTML is it to use "javascript:somescript" for target.

The new API is to call LzText.makeTextLink, which returns a string of the
form "<a href=...>displayed value</a>" which you can append to the content
of your LzText field. When clicked, it sends a "ontextlink" event back to
the LzText object, with the value you choose.

/**
  * Return a string which can be used to insert a hyperlink in a text field.
  * @param String str: The text displayed in the hyperlink.
  * @param String value: The value returned when the link is clicked.
  * @access public
  The text returned by makeTextLink can be appended to the text of a
  text field. It will make an HTML-style anchor, and will have a
  displayed representation of the string STR. When clicked, the link will
  send an ontextlink event to the text view, with a value of VALUE.
 */
public function makeTextLink(str, value) {
    return this.sprite.makeTextLink(str,value);
}




On Fri, Sep 26, 2008 at 11:29 PM, cyril alias lyric
<[EMAIL PROTECTED]>wrote:

> Hello,
>
> how to define an hyperlink that throws an
> onclick-event?
>
> I'd like to have the same behaviour as for buttons:
> <button onclick="doSomething();" />
>
> If possible, what is the correct syntax.
> I tried
> <a href="" onclick="doSomething();">Link</a>
> without success.
>
> Cheers,
> lyric
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
> gegen Massenmails.
> http://mail.yahoo.com
>



-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to