Macromedia Flash File Format (SWF)

recompiled with RAW HTWL

Examples Shapes


Introduction Basic Types Display List Control Tags
Shapes (Examples Shapes) Gradients Buttons
Sprites Fonts and Text Shape Morphing Bitmap
Sounds Actions ActionScripts Reference

All those examples have been tested on MacOS 9.1, Netscape Communicator 4.5, Macromedia Flash Player 5.0r4.1.

(simple square) f0 only: works as expected
(simple square) f0 only: works as expected
(simple square) f1 only: works, but f0 would be better
(simple square) f1 only: works, but f0 would be better
(simple square) f0 and f1: oops?!!
(simple square) f0 and f1: well, in this case it seems it works
(two squares) f0 only: works as expected
(two squares) f0 only: works as expected
(two squares) f0 and f1: works as expected
circle: SWF needs 8 points not 4, because of quadratic Bezier

f0 only: works as expected

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle0="1">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
</DefineShape>

f0 only: works as expected

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle0="1">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
</DefineShape>

f1 only: works, but f0 would be better

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle1="1">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
</DefineShape>

f1 only: works, but f0 would be better

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle1="1">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
</DefineShape>

f0 and f1: oops?!!

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
        <SolidFillStyle color="#0000FF"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle0="1" fillStyle1="2">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
</DefineShape>

f0 and f1: well, in this case it seems it works

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
        <SolidFillStyle color="#0000FF"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle0="1" fillStyle1="2">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
</DefineShape>

f0 only: works as expected

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle0="1">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
    <StyleChange>
        <MoveTo x="600" y="1600"/>
    </StyleChange>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
</DefineShape>

f0 only: works as expected

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle0="1">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
    <StyleChange>
        <MoveTo x="600" y="1600"/>
    </StyleChange>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
    <StraightEdge dx="-1000" dy="    0"/>
</DefineShape>

f0 and f1: works as expected

<DefineShape id="1">
    <FillStyleArray>
        <SolidFillStyle color="#FF0000"/>
        <SolidFillStyle color="#0000FF"/>
    </FillStyleArray>
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1" fillStyle0="1">
        <MoveTo x="100" y="1100"/>
    </StyleChange>
    <StraightEdge dx="  500" dy="    0"/>
    <StyleChange fillStyle0="2" fillStyle1="1"/>
    <StraightEdge dx="  500" dy="    0"/>
    <StraightEdge dx="    0" dy=" -500"/>
    <StyleChange fillStyle0="1" fillStyle1="0"/>
    <StraightEdge dx="    0" dy=" -500"/>
    <StraightEdge dx="-1000" dy="    0"/>
    <StraightEdge dx="    0" dy=" 1000"/>
    <StyleChange>
        <MoveTo x="600" y="1600"/>
    </StyleChange>
    <StraightEdge dx=" 1000" dy="    0"/>
    <StraightEdge dx="    0" dy="-1000"/>
    <StraightEdge dx=" -500" dy="    0"/>
    <StyleChange fillStyle0="2" fillStyle1="1"/>
    <StraightEdge dx=" -500" dy="    0"/>
    <StraightEdge dx="    0" dy="  500"/>
    <StyleChange fillStyle0="1" fillStyle1="0"/>
    <StraightEdge dx="    0" dy="  500"/>
</DefineShape>

circle: SWF needs 8 points, not 4 (because of quadratic Bezier)

<DefineShape id="1">
    <LineStyleArray>
        <LineStyle width="80" color="#000000"/>
    </LineStyleArray>
    <StyleChange lineStyle="1">
        <MoveTo x="100" y="600"/>
    </StyleChange>
    <CurvedEdge cx="   0" cy="-327" ax=" 231" ay="-232"/>
    <CurvedEdge cx=" 232" cy="-231" ax=" 327" ay="   0"/>
    <CurvedEdge cx=" 327" cy="   0" ax=" 231" ay=" 231"/>
    <CurvedEdge cx=" 232" cy=" 232" ax="   0" ay=" 327"/>
    <CurvedEdge cx="   0" cy=" 327" ax="-232" ay=" 231"/>
    <CurvedEdge cx="-231" cy=" 232" ax="-327" ay="   0"/>
    <CurvedEdge cx="-327" cy="   0" ax="-232" ay="-232"/>
    <CurvedEdge cx="-231" cy="-231" ax="   0" ay="-327"/>
</DefineShape>

Introduction Basic Types Display List Control Tags
Shapes (Examples Shapes) Gradients Buttons
Sprites Fonts and Text Shape Morphing Bitmap
Sounds Actions ActionScripts Reference