Closed demurgos closed 5 years ago
The keycode error may be caused by the keycode 8: I noticed that it is valid according to the spec but the parser does not accept it. If it's not the keycode 8, it means that the spec does not match real-world usage.
I think I know why this happened: you're parsing a little-endian 16-bit value, same as me, but you parse them in an order that is reversed from mine: https://github.com/lykenware/flashback/blob/35fe6ca7922e650c263899933283d689ff202a42/src/button.rs#L114-L139
So there is no 8
keycode, and those are the some of the bits for the mouse!
EDIT: workaround: https://github.com/lykenware/flashback/commit/9369c2d21d044c6726da585904883c77f0fbd38d#diff-3b99c52753b3b50f241f1e196c5aa57dR98
Now-working example: https://lykenware.github.io/flashback/#hs:00031 (images should appear on hover)
Okay, I get it. It was probably caused by switching from the old implementation using bits!
and then messing the order of the bits.
Thanks, I'll fix it.
Fix released in version 0.3.2
See https://github.com/open-flash/swf-parser/pull/5#issuecomment-478006639