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

Dave Burnett d_b_burnett at hotmail.com
Thu Dec 24 20:19:16 GMT 2009










OK, I tried to replicate this in Flash proper.
Works as expected if the textfield is set to static.
Dynamic or input returns null (good old undefined).

tf.typeOf in Xerte returns dynamic (naturally) and there does not seem to be a programmatic method of changing a TF to static.

Smashing my head against the wall perhaps.


From: d_b_burnett at hotmail.com
To: xerte at lists.nottingham.ac.uk
Subject: RE: [Xerte] RE: Glossary type thing,	get the word that was clicked on in string.
Date: Thu, 24 Dec 2009 09:01:36 -0500








undefined.

I'm an OOP idiot.
What am I thinking wrong here?

//retrieve an object with the text contents of the text mc i65569 
textSnap = i65569.getTextSnapshot();

//look at the functions available to me to retrieve specific data
inspect(textSnap);

//use one of the functions to get a value
debug(textSnap.getCount());


Returns undefined.
So textSnap has no values in it.
??


Subject: RE: [Xerte] RE: Glossary type thing,	get the word that was clicked on in string.
Date: Wed, 23 Dec 2009 22:32:24 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk










what does
 
inspect(textSnap[0]) give you?



From: xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Mon 21/12/2009 19:00
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: Trusted email with Microsoft’s powerful SPAM protection. Sign up now. 		 	   		  
Hotmail: Trusted email with powerful SPAM protection. Sign up now. 		 	   		  
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/171222986/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20091224/70e6d5ae/attachment.html


More information about the Xerte mailing list