We need a design for how to handle clickable <a> links in LzText fields.
The "asfunction" mechanism that we have been using in swf8 does not work for
<a> links in swf9.
The new mechanism is that you click on a link of the form <a
href="event:sometext">, the flash text field gets
a TextEvent.LINK event with "sometext" as it's text slot.
So we need to install a listener on the TextField for that event. The
question is what should we do with it?
I propose the link's text string would be forwarded to the LzText object,
as a standard Laszlo event. We could call the event
onlinkclicked.
I don't know if we want the overhead of installing this listener at the swf9
level on every text field, so maybe there would be
a method to call to enable clickable links on an LzText?
LzText.enableLinks(true|false)
I'm not sure how to make this cross platform; we could have a LFC function
you call to make a "cross platform link", which in
the case of swf8 or dhtml, would make a link that called a javascript
function which called back the "onlinkclicked" event
with the supplied arg.
So you could say
mytext.setAttribute('text', LzText.makeLink("click me", "callback value"));
And that would generate a link which, when clicked, called mytext.
sendEvent("callback value")
Discuss...
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]