TextSnapshot - Adobe ActionScript® 3 (AS3 ) API Reference
this question posted in response following article: http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/flash/text/textsnapshot .html
i have been looking @ functionalities here...
there problem not clear on adobe examples or adobe forums...
is possible same svg loaded swf. able select
text charaters in svg within flash, , actual text selected can done in javascript.
when try select text inside svg file loaded flash, not selectable, , not seam
to fire events, neither 'pointer events' flash actionscript can catch.
when svg loaded can see in debugger:
evt.target.textblock.content.text
evt.target.textblock.content.rawtext
is possible load svg file has text example, 'abc' in it, swf ,
do like:
private function loadsvghandler(evt:event):void {
trace('find string iin svg: ' + evt.parent.textsnapshot.findtext(0, 'abc', false) ); // returns -1
trace('find string count in svg: ' +evt.parent.textsnapshot.charcount ); // returns 0
evt.parent.textsnapshot.setselectcolor(0x8a4862);
evt.parent.textsnapshot.setselected(0, 4, true);
trace('1) find iin svg: ' + evt.parent.textsnapshot.getselectedtext(false) ); // nothing happens
}
in tests, received no syntax error, received responses 'false' , -1 in cases.
i delved debugger etc, , looks not possible in actionscript 3.
please inform, correct, not possible in actionscript or missing something?
mark
More discussions in ActionScript 3
adobe
Comments
Post a Comment