Grap & highlight 'selected text' in a loaded SVG file via Actionscript.


i have been looking @ functionalities here...

http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/fla sh/text/textsnapshot.html

 

i trying find out if possible via flex, flex library or something...

 

there problem not clear on adobe examples or adobe forums...

 

is possible same svg loaded swf. able select

text charaters in svg in flash/flex, , 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 text svg in debugger:

evt.target.textblock.content.text

evt.target.textblock.content.rawtext

 

 

is possible load svg file has text example, 'abc' in it, swf and

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

http://www.wisechamber.com/pro/mark-webley



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support