At 1/30/14 03:05 PM, kkots wrote:
I think I ran into a problem with matrices and transformation in JSFL.
Problem solved. It turns out Flash has flipped matrices, i.e.
(a c)
(b d)
And they refer to coordinates of elements by (j;i) and those coordinates start from 0 in documentation.
I was taught in school that matrices are written
(a b)
(c d)
and coordinates of elements are (i;j) (i is vertical, j is horizontal) and start from 1.
EVERYTHING IS FREAKING TOPSY-TURVY IN THIS DUMB JSFL.
Also, I found out more bugs in JSFL:
1) You cannot determine that a shape is indeed a group until you select it and obtain it from doc.selection (which will yield you a completely different object which does not really exist), and that object will have isGroup display proper value.
2) If you use library.addItemToDocument it will override the clipboard with the symbol being added, meaning if you had cut or copied anything, it will be overriden by the symbol. This is just dumb and causes inconveniences.
3) If you change symbolType of a SymbolInstance, it will get removed from stage and get replaced by a completely different object which is put on the same spot as the old one. If you refer to the old symbol after changing its type (to, say, Movie Clip, or Button or Graphic) it will be all useless because that symbol is removed. New symbol can be obtained from the doc.selection of course which eases the problem.
Well, I think those are all the bugs. They are probably caused by lazy coding of JSFL interpreter engine, and all these problems are very silly and difficult to figure out on your own, lol.
And now flipped matrices is the new problem.
So do you guys write matrices in form
(a b)
(c d)
And get
(a b)*(x)=(a*x+b*y)
(c d)*(y)=(c*x+d*y)
or we do it like this only in Russia, and Flash is actually doing it correctly?