12

XFL is the new uncompressed ADOBE FLASH (CS5) source file, it consists from XML definitions, most of them are clear but unfortunately, the important one are strange.

Looking to various existing sources, I can see shape's EDGE definitions like:

<Edge strokeStyle="1" edges="!0 0S4|180 0"/>
<Edge strokeStyle="1" edges="!2720 2720S6|0 2720!0 2720|0 0!0 0/2720 2720"/>
<Edge fillStyle1="1" edges="!3532 1539.5S2[#BD9.4D #577.3C 2952.5 1756.5!2952.5 1756.5[#AF6.DA #4C6.1D 3584 1119!3584 1119|3532 1539.5"/> 

Doing some tests I can say, that:

! == move to position
| == draw line from the position to the new position
/ == probably same like |
[ == draw curve
( == probably same like [

But what means the values like S4 or #BD9.4D? My not proved yet guess is, that the # values could be somehow encoded very small numbers. I have no clue what could be the S4.

Oldes
  • 935
  • 1
  • 9
  • 23

2 Answers2

12

!(x,y) moveTo

/(x,y)+ lineTo

|(x,y)+ lineTo

[(x1 y1 ex ey)+ curveTo (quadratic)

](x1 y1 ex ey)+ curveTo (quadratic)

((pBCPx pBCPy)? ; x1 y1 x2 y2 ex ey (({Q,q,P,p})? x y)+ curveTo (cubic start)

)(nBCPx nBCPy)? ; curveTo (cubic end)

Sn selection (n=bitmask, 1:fillStyle0, 2:fillStyle1, 4:stroke)

#aaaaaa.bb is a signed fixed point 32 bit number

Claus Wahlers
  • 1,211
  • 9
  • 13
  • btw.. don't you know what means the cubics values as well? – Oldes Nov 02 '10 at 14:31
  • i know everything ;) the cubics (as well as the selection flag) are merely hints for the IDE (cubics can only appear in cubics attributes) – Claus Wahlers Nov 02 '10 at 14:43
  • ...though i'm not sure what the semantics of all the parameters are. x1, y1, x2, y2 are probably control points and ex, ey the end anchor, and pBCP/nBCP stands for previous/next Bezier Control Point. Not sure about the rest. – Claus Wahlers Nov 02 '10 at 14:47
  • And what is the difference between | and / lineTo? – Oldes Nov 17 '10 at 10:11
  • I know it's an old question, but where did you find this informations, is there a spec ? – Demurgos Aug 01 '16 at 19:05
  • @Demurgos i may or may not have had access to an internal document. To my knowledge there is no official spec (my knowledge might be outdated though, i don't know). – Claus Wahlers Aug 03 '16 at 06:46
  • @ClausWahlers Thank you for you quick answer. It's a bit unfortunate that there is no spec (even unofficial sources are hardly helpful) – Demurgos Aug 03 '16 at 08:50
  • Very old question indeed, but maybe someone knows. Why edges sometimes have both fillStyle0 and fillStyle1 ? What is the expected result of this? – Marcin Zukowski Jan 25 '21 at 22:37
  • Nevermind, found some additional info here: https://github.com/SasQ/SavageFlask/blob/master/doc/FLA.txt – Marcin Zukowski Jan 25 '21 at 23:48
0

Hm... I was wrong with the guess to # values!

I've decompiled the produced shape and can say, that for example value #BD9.4D must be a silly hexadecimal encoding of number 3033.77. I would like to know, why is Adobe using something like that in code which should be human readable?

EDIT: the above is wrong, the correct result for #BD9.4D is 3033.30078125

>> (to integer! #{000BD94D}) / 256
== 3033.30078125

Also note, that numbers like #19F.2 are binary #{00019F20}

According the S4 type of values, they could be just some additional info for the FLASH editor because when I manually remove them, I can load the source and the shape is same.

Oldes
  • 935
  • 1
  • 9
  • 23