<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Wait a sec.... Isn't the &lt;a> tag, with the normal usage of the href attribute, supported within text fields -- even in Flash?&nbsp;<div><br></div><div>Now, href doesn't work within the &lt;view> tag, and &lt;a> doesn't work anywhere but inside of &lt;text>, but that's another story.<br><div><br></div><div>Not that what you've done isn't useful -- but I don't think it's needed in the normal case (click to link to another page).</div><div><br><div><div>On Sep 27, 2008, at 6:26 AM, Henry Minsky wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hello,<div><br></div><div>The function to respond to a hyperlink is currently platform-dependent, although just a few days ago</div><div>I added a cross-platform mechanism to the LFC. That is available only if you run a nightly build at the moment.</div> <div><br></div><div>If you look at the implementation, the actual mechanism for Flash 8 applications is to use the syntax &lt;a href="asfunction:funcname,arg">, whereas for DHTML is it to use "javascript:somescript" for target.&nbsp;</div> <div><br></div><div>The new API is to call LzText.makeTextLink, which returns a string of the form "&lt;a href=...>displayed value&lt;/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.&nbsp;</div> <div><br></div><div><div>/**</div><div>&nbsp;&nbsp;* Return a string which can be used to insert a hyperlink in a text field.</div><div>&nbsp;&nbsp;* @param String str: The text displayed in the hyperlink.</div><div>&nbsp;&nbsp;* @param String value: The value returned when the link is clicked.</div> <div>&nbsp;&nbsp;* @access public</div><div>&nbsp;&nbsp;The text returned by makeTextLink can be appended to the text of a</div><div>&nbsp;&nbsp;text field. It will make an HTML-style anchor, and will have a</div><div>&nbsp;&nbsp;displayed representation of the string STR. When clicked, the link will</div> <div>&nbsp;&nbsp;send an ontextlink event to the text view, with a value of VALUE.</div><div>&nbsp;*/</div><div>public function makeTextLink(str, value) {</div><div>&nbsp;&nbsp; &nbsp;return this.sprite.makeTextLink(str,value);</div><div>}</div><div><br> </div><div><br></div><div><br></div><br><div class="gmail_quote">On Fri, Sep 26, 2008 at 11:29 PM, cyril alias lyric <span dir="ltr">&lt;<a href="mailto:lyric680-web@yahoo.de">lyric680-web@yahoo.de</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br> <br> how to define an hyperlink that throws an<br> onclick-event?<br> <br> I'd like to have the same behaviour as for buttons:<br> &lt;button onclick="doSomething();" /><br> <br> If possible, what is the correct syntax.<br> I tried<br> &lt;a href="" onclick="doSomething();">Link&lt;/a><br> without success.<br> <br> Cheers,<br> <font color="#888888">lyric<br> </font><div class="WgoR0d"><br> <br> <br> __________________________________________________<br> Do You Yahoo!?<br> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.<br> <a href="http://mail.yahoo.com" target="_blank">http://mail.yahoo.com</a><br> </div></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br><br> </div></div></blockquote></div><br></div></div></body></html>