Ashish,
The following is from the docs:
++
The following code shows that the link event is dispatched when a user
clicks the hypertext link:
import flash.text.TextField;
import flash.events.TextEvent;
var tf:TextField = new TextField();
tf.htmlText = "Click Me.";
tf.addEventListener("link", clickHandler);
addChild(tf);
function clickHandler(e:TextEvent):void {
trace(e.type); // link
trace(e.text); // myEvent
}
Hilary
www.bridel.org
On 9/14/06, ashishpatel2007 <[EMAIL PROTECTED]> wrote:
> I am trying to make this work in Flex 2 and looked at Nahuel's code.
> However, I do not see in his example where he is using something similar when a user clicks text WITHIN htmlText. Please
> correct me if I am wrong, but I think Nahuel uses the full text when
> the user clicks the enter key or presses the search button. I am
> trying to do the following:
>
> textRange1.htmlText="unclickableText href='asfunction:callfunction'>clickableText"
> I want to a call a function within the same .mxml file when the user
> clicks on 'clickableText'. The function will eventually do a pop-up
> based on the text the user clicked.
>
> I don't think asfunction is available in Flex2.
>
> Any help would be appreciated.
>
> Thanks in advance,
> ashish
> --- In flexcoders@yahoogroups.com, "jgraham_us" <[EMAIL PROTECTED]> wrote:
> >
> > I need this to work in Flex 1.5, is there a similar way to get it to
> > work? Basically I just need to know when the link was clicked or
> > for that matter the marker was clicked.
> >
> > --- In flexcoders@yahoogroups.com, "JesterXL" wrote:
> > >
> > > Learn from the master. Nahuel's app won in his category in the
> > Flex Derby.
> > > As a judge, I gave him mad props for getting this to work. Here's
> > how he
> > > did it:
> > >
> > > http://www.asfusion.com/blog/entry/inserting-yahoo-maps-in-a-flex-
> > 2-application
> > >
> > > - Original Message -
> > > From: "jgraham_us"
> > > To:
> > > Sent: Tuesday, July 18, 2006 1:32 AM
> > > Subject: [flexcoders] Yahoo Maps questions
> > >
> > >
> > > 1) I have a marker CustomPOIMarker, I want to embed a link and
> > call
> > > an actionscript function in my flex code. I have tried this with
> > > and without _parent,parent and it never works. If I put a link to
> > > an HTML page it works fine. But I need to notify my application
> > > when the click has occured. Any ideas? or a better way to do
> > this?
> > >
> > > Example.
> > >
> > > var markerArgs = {index:"marker 1",description:" > > href='asfunction:parent.cpiClicked'>print something",
> > > title:" > > href='asfunction:_parent.cpiClicked'>print something",
> > > markerColor:0x990099, strokeColor:0x00};
> > > .
> > > .
> > > .
> > > function cpiClicked() : Void
> > > {
> > > Echo.debug("Marker 1 clicked");
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> > >
> >
>
>
>
>
>
>
>
> --
> 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
>
>
>
>
>
>
>
>
>
>
>
--
Hilary
--
--
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/