swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Different textSnapshot behavior in pdf2swf-generated f


From: Marc Hämmerle
Subject: [Swftools-common] Different textSnapshot behavior in pdf2swf-generated files
Date: Thu, 26 Jun 2008 12:27:26 +0200

hello,

we need text selection functionality for a project and stumbled upon some very strange things in swfs generated by pdf2swf. our application is written in flex & actionscript 3 so we need the files to be avm2- compatible; localconnection is not an option. pdf2swf outputs them fine since the last 2 (?) releases. but if you select text via textSnapshot and setSelected on a swf generated by pdf2swf, you get a (visual) selection with each character selected on it's own and spaces *not* selected instead of one continous line of selection (as it should be). if make myself a flash-file in the flash9 ide, put in some static textfields and a dynamic textfield for character metrics and publish it as avm2-file, the selection works as expected with our application. as i remembered that old examples for flash 7 or 8 *did* indeed work i tried that out and voila: they still work if you write your application for the avm1 and use a swf generated by pdf2swf for flash 6 (-T 6 parameter). and to make things even more weird: you can use classes in actionscript 3 that write a new header in the bytearray of loaded avm1- files to dupe them as avm2-files for the actionscript virtual machine *if* you use flash-ide generated avm1 swfs, but *not* when you use pdf2swf-generated avm1-files. it seems to me that there's a failure in the swf header outputted by swftools.

(it's probably nothing, but flash ide-generated files and pdf2swf generated files differ on the framerate when you swfdump them: ide states it as 25.00 fps and pdf2swf states them as 0.25 fps)

has anybody else stumbled upon this problems and maybe has got a solution?

marc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]