Once I saw someone mention the possibility of using the "actionscript:myFunction()" approach, it seemed MUCH cleaner. My problem with the event approach is this - how do I pass parameters?
Here is my current test code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml " layout="absolute" creationComplete="initApp()">
<mx:Script>
<![CDATA[
import flash.text.TextField;
import flash.events.TextEvent ;
function initApp() {
txtArea.htmlText = "Click <a href=''><font color='#0000FF'><u>here</u></font></a> to fire event.";
txtArea.addEventListener("link", clickHandler);
}
public function clickHandler(e:TextEvent):void {
lstBox.text = e.type + " " + e.text;
}
]]>
</mx:Script>
<mx:TextArea x="528" y="96" width="544" height="244" id="txtArea"/>
<mx:TextArea x="528" y="348" width="544" height="211" id="lstBox"/>
</mx:Application>
Anyone?
THANKS!
-Pat
On 11/3/06, Mike Keesey <
[EMAIL PROTECTED]> wrote:
http://livedocs.macromedia.com/flex/2/langref/flash/events/TextEvent.htm
l
Use the "event:" protocol for the link, and the text field will dispatch
a TextEvent event.
―
Mike Keesey
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Pat Buchanan
Sent: Friday, November 03, 2006 7:28 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Hyperlink to an elemment in textarea
"...The href attribute can be a url as usual, or it can be
"actionscript:myFunction()"..."
Pinging this thread. Anyone know how this is done? My searches are
turning up more garbage than gold.
My goal is this: I want an HTML textarea that allows for linking to
other areas in the application. Like a help or quickstart page - they
just click on what they want to do and it runs some actionscript to take
them to the right tag/page/control.
Thanks everyone!
On 7/5/06, Tracy Spratt < [EMAIL PROTECTED]> wrote:
If you use the htmlText property of the textArea, you can use a subset
of html tags, including the <a> tag. The href attribute can be a url
as usual, or it can be "actionscript:myFunction()" (maybe
actionscript:parent.myFunction()) I haven't done this in 2.0 yet so I
don't have a full example.
Tracy
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of tonyx_788
Sent: Wednesday, July 05, 2006 4:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Hyperlink to an elemment in textarea
hello,
is it posible?
i know in xml this is a hyperlink to a web page
<a href=""
but how do i make a link in a textarea to an elemment in the xml?
what i want to do is reference a word or a phrase to another text in
the xml like in html
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto: [EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Software development tool | Software development | Software development services |
Home design software | Software development company |
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___