[Xerte] RE: Glossary type thing, get the word that was clicked on in string.

Dave Burnett d_b_burnett at hotmail.com
Mon Dec 21 19:36:07 GMT 2009


Undefined in both cases.
I had tried a few variations on that previously.

even just textSnap.getCount() returns undefined, so I'm not accessing the object correctly (or it's not there, or it's empty, or...)
:-/

Thnx,

Dave 





Subject: FW: [Xerte] RE: Glossary type thing,	get the word that was clicked on in string.
Date: Mon, 21 Dec 2009 11:16:39 -0800
From: Paul.Swanson at harlandfs.com
To: xerte at lists.nottingham.ac.uk



















Oops! make that:

debug(textSnap.getSelected(0, textSnap.getCount()));

 







From: Paul Swanson 

Sent: Monday, December 21, 2009 11:13 AM

To: 'Xerte discussion list'

Subject: RE: [Xerte] RE: Glossary type thing,get the word that was
clicked on in string.





 

Try:

 

debug(textSnap.getText(0, textSnap.getCount()));  

 

Works?

 

See http://flash-reference.icod.de/TextSnapshot.html#getSelected()

 

Paul

 







From:
xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk]
On Behalf Of Dave Burnett

Sent: Monday, December 21, 2009 11:00 AM

To: Xerte list

Subject: [Xerte] RE: Glossary type thing,get the word that was clicked
on in string.





 



I found an AS2 object, but can't quite get the info out of it.



textSnap = i65569.getTextSnapshot();

debug(textSnap);

debug(textSnap[0]);



Both the debugs give me [object Object]



Generic failure or my syntax is lacking?



Cheers,

Dave







From: d_b_burnett at hotmail.com

To: 

Subject: Glossary type thing, get the word that was clicked on in string.

Date: Mon, 21 Dec 2009 10:30:09 -0500





I found something called getCharIndexAtPoint(), but I think it is AS3.

I can retrieve the mousex,y and the text obviously, but can't see a way to
correlate the two.



Or am I missing the easy way?







Hotmail:
Trusted email with powerful SPAM protection. Sign up now. 







Hotmail:
Trusted email with Microsoft’s powerful SPAM protection. Sign up
now.





 		 	   		  
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20091221/85c4d83d/attachment.html


More information about the Xerte mailing list