<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:simpleType name="identifier">
        <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:pattern value="[0-9a-zA-Z_]+"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- added -->
    <xs:simpleType name="sampleRate">
      <xs:restriction base="xs:unsignedInt">
        <xs:enumeration value="0"/>
        <xs:enumeration value="5512"/>
        <xs:enumeration value="11025"/>
        <xs:enumeration value="22050"/>
        <xs:enumeration value="44100"/> 
     </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="audioBitrate">
      <xs:restriction base="xs:integer">
        <xs:enumeration value="8"/>
        <xs:enumeration value="16"/>
        <xs:enumeration value="24"/>
        <xs:enumeration value="32"/>
        <xs:enumeration value="40"/>
        <xs:enumeration value="48"/>
        <xs:enumeration value="56"/>
        <xs:enumeration value="64"/>
        <xs:enumeration value="80"/>
        <xs:enumeration value="96"/>
        <xs:enumeration value="112"/>
        <xs:enumeration value="128"/>
        <xs:enumeration value="144"/>
        <xs:enumeration value="160"/>
        <xs:enumeration value="192"/>
        <xs:enumeration value="224"/>
        <xs:enumeration value="256"/>
        <xs:enumeration value="320"/>
      </xs:restriction>
    </xs:simpleType>
    <!-- end of added -->
    <xs:simpleType name="coordType">
        <xs:restriction base="xs:string">
            <xs:pattern value="(\+|\-)?\d+(px|tw)?"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="eventType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="dragOut"/>
            <xs:enumeration value="dragOver"/>
            <xs:enumeration value="releaseOutside"/>
            <xs:enumeration value="release"/>
            <xs:enumeration value="press"/>
            <xs:enumeration value="rollOut"/>
            <xs:enumeration value="rollOver"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="content-type">
        <xs:restriction base="xs:string">
            <xs:enumeration value="image/jpeg"/>
            <xs:enumeration value="image/gif"/>
            <xs:enumeration value="image/png"/>
            <xs:enumeration value="image/bmp"/>
            <xs:enumeration value="image/pcx"/>
            <xs:enumeration value="image/wmf"/>
            <xs:enumeration value="sound/wav"/>
            <xs:enumeration value="sound/mp3"/>
            <xs:enumeration value="sound/wma"/>
            <xs:enumeration value="sound/ogg"/>
            <xs:enumeration value="audio/x-wav"/>
            <xs:enumeration value="audio/mpeg"/>
            <xs:enumeration value="font/ttf"/>
            <xs:enumeration value="movie/swf"/>
            <xs:enumeration value="application/x-shockwave-flash"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="encoding">
        <xs:restriction base="xs:string">
            <xs:enumeration value="base64"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="alignType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="left"/>
            <xs:enumeration value="right"/>
            <xs:enumeration value="center"/>
            <xs:enumeration value="justify"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="actions">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="actionScript"/>
                <xs:element ref="actionGoToFrame"/>
                <xs:element ref="actionGetURL"/>
                <xs:element ref="actionPlay"/>
                <xs:element ref="actionStop"/>
                <xs:element ref="actionStopSounds"/>
                <xs:element ref="actionFSCommand"/>
                <xs:element ref="actionSetTarget"/>
                <xs:element ref="actionGoToLabel"/>
                <xs:element ref="actionNextFrame"/>
                <xs:element ref="actionPrevFrame"/>
                <xs:element ref="actionCallFunction"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionScript">
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="event" type="eventType" use="optional" default="press"/>
                    <xs:attribute name="src" type="xs:string" use="optional"/>
                    <xs:attribute name="version" type="xs:float" use="optional" default="2.0"/>
                    <xs:attribute name="id" type="identifier" use="optional"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionGetURL">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
            <xs:attribute name="url" type="xs:string" use="required"/>
            <xs:attribute name="target" type="xs:string" use="optional" default=""/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionGoToFrame">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
            <xs:attribute name="index" type="xs:unsignedShort" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionPlay">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionStop">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionStopSounds">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionFSCommand">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
            <xs:attribute name="command" type="xs:string" use="required"/>
            <xs:attribute name="args" type="xs:string" use="optional" default=""/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionSetTarget">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
            <xs:attribute name="spriteName" type="xs:string" use="optional" default=""/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionGoToLabel">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
            <xs:attribute name="frameLabel" type="xs:string" use="optional" default=""/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionNextFrame">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionPrevFrame">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="bitmapFillStyle">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="content"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="src" type="xs:string" use="optional"/>
            <xs:attribute name="width" type="coordType" use="optional" default="0"/>
            <xs:attribute name="height" type="coordType" use="optional" default="0"/>
            <xs:attribute name="type" use="optional" default="tiled">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="tiled"/>
                        <xs:enumeration value="clipped"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="alpha" type="xs:unsignedByte" use="optional"/>
            <xs:attribute name="transparentColor" type="xs:string" use="optional"/>
            <xs:attribute name="jpegQuality" use="optional">
                <xs:simpleType>
                    <xs:restriction base="xs:unsignedByte">
                        <xs:minInclusive value="0"/>
                        <xs:maxInclusive value="100"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="smoothing" type="xs:boolean" use="optional" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="button">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="actionScript"/>
                <xs:element ref="actionGoToFrame"/>
                <xs:element ref="actionGetURL"/>
                <xs:element ref="actionPlay"/>
                <xs:element ref="actionStop"/>
                <xs:element ref="actionStopSounds"/>
                <xs:element ref="actionFSCommand"/>
                <xs:element ref="startSound"/>
                <xs:element ref="stopSound"/>
                <xs:element ref="actionSetTarget"/>
                <xs:element ref="actionGoToLabel"/>
                <xs:element ref="actionNextFrame"/>
                <xs:element ref="actionPrevFrame"/>
                <xs:element ref="actionCallFunction"/>
            </xs:choice>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="type" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="push"/>
                        <xs:enumeration value="menu"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="up" type="identifier" use="required"/>
            <xs:attribute name="over" type="identifier" use="required"/>
            <xs:attribute name="down" type="identifier" use="required"/>
            <xs:attribute name="hit" type="identifier" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="arc">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="fillTransformAttrs"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="x" type="coordType" use="required"/>
            <xs:attribute name="y" type="coordType" use="required"/>
            <xs:attribute name="radius" type="coordType" use="required"/>
            <xs:attribute name="secondRadius" type="coordType" use="optional"/>
            <xs:attribute name="startAngle" type="xs:float" use="optional" default="0"/>
            <xs:attribute name="endAngle" type="xs:float" use="optional" default="360"/>
            <xs:attribute name="closed" type="xs:boolean" use="optional" default="false"/>
            <xs:attribute name="lineStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyleS" type="xs:string" use="optional"/>
            <xs:attribute name="fillTransform" type="xs:string" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="circle">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="fillTransformAttrs"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="x" type="coordType" use="required"/>
            <xs:attribute name="y" type="coordType" use="required"/>
            <xs:attribute name="radius" type="coordType" use="required"/>
            <xs:attribute name="width" type="coordType" use="optional"/>
            <xs:attribute name="secondRadius" type="coordType" use="optional"/>
            <xs:attribute name="secondWidth" type="coordType" use="optional"/>
            <xs:attribute name="startAngle" type="xs:float" use="optional" default="0"/>
            <xs:attribute name="endAngle" type="xs:float" use="optional" default="360"/>
            <xs:attribute name="lineStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyleS" type="xs:string" use="optional"/>
            <xs:attribute name="fillTransform" type="xs:string" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="font">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="content"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="src" type="xs:string" use="optional"/>
            <xs:attribute name="name" type="xs:string" use="optional" default=""/>
            <xs:attribute name="chars" type="xs:string" use="optional" default=""/>
            <xs:attribute name="faceIndex" type="xs:unsignedInt" use="optional" default="0"/>
            <xs:attribute name="autoFillChars" type="xs:boolean" use="optional" default="true"/>
            <xs:attribute name="kerning" type="xs:boolean" use="optional" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="frame">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="show"/>
                <xs:element ref="hide"/>
                <xs:element ref="modify"/>
                <xs:element ref="startSoundStream"/>
                <xs:element ref="startSound"/>
                <xs:element ref="stopSound"/>
                <xs:element ref="replace"/>
                <xs:element ref="actions"/>
                <xs:element ref="export"/>
            </xs:choice>
            <xs:attribute name="label" type="xs:string" use="optional"/>
            <xs:attribute name="index" type="xs:unsignedShort" use="required"/>
            <xs:attribute name="blank" type="xs:boolean" use="optional" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="gradientEntry">
        <xs:complexType>
            <xs:attribute name="color" type="xs:string" use="required"/>
            <xs:attribute name="ratio" type="xs:unsignedByte" use="required"/>
            <xs:attribute name="alpha" type="xs:unsignedByte" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="gradientFillStyle">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="gradientEntry" maxOccurs="8"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="type" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="radial"/>
                        <xs:enumeration value="linear"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="hide">
        <xs:complexType>
            <xs:attribute name="showId" type="identifier" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="htmlText">
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="id" type="identifier" use="required"/>
                    <xs:attribute name="x" type="coordType" use="required"/>
                    <xs:attribute name="y" type="coordType" use="required"/>
                    <xs:attribute name="width" type="coordType" use="required"/>
                    <xs:attribute name="height" type="coordType" use="required"/>
                    <xs:attribute name="color" type="xs:string" use="optional"/>
                    <xs:attribute name="fontSize" type="coordType" use="optional"/>
                    <xs:attribute name="font" type="xs:string" use="optional"/>
                    <xs:attribute name="align" type="alignType" use="optional"/>
                    <xs:attribute name="leftMargin" type="coordType" use="optional"/>
                    <xs:attribute name="rightMargin" type="coordType" use="optional"/>
                    <xs:attribute name="indent" type="coordType" use="optional"/>
                    <xs:attribute name="leading" type="coordType" use="optional"/>
                    <xs:attribute name="autoSize" type="xs:boolean" use="optional" default="false"/>
                    <xs:attribute name="border" type="xs:boolean" use="optional" default="false"/>
                    <xs:attribute name="multiline" type="xs:boolean" use="optional" default="false"/>
                    <xs:attribute name="selectable" type="xs:boolean" use="optional" default="true"/>
                    <xs:attribute name="wordWrap" type="xs:boolean" use="optional" default="true"/>
                    <xs:attribute name="fontId" type="identifier" use="optional"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="image">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="content"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="src" type="xs:string" use="optional"/>
            <xs:attribute name="x" type="coordType" use="required"/>
            <xs:attribute name="y" type="coordType" use="required"/>
            <xs:attribute name="width" type="coordType" use="optional" default="0"/>
            <xs:attribute name="height" type="coordType" use="optional" default="0"/>
            <xs:attribute name="lineStyle" type="xs:string" use="optional"/>
            <xs:attribute name="alpha" type="xs:unsignedByte" use="optional"/>
            <xs:attribute name="transparentColor" type="xs:string" use="optional"/>
            <xs:attribute name="jpegQuality" use="optional">
                 <xs:simpleType>
                      <xs:restriction base="xs:unsignedByte">
                           <xs:minInclusive value="0"/>
                           <xs:maxInclusive value="100"/>
                      </xs:restriction>
                 </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="smoothing" type="xs:boolean" use="optional" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="video">
      <xs:complexType>
        <xs:attribute name="id"           type="identifier" use="required"/>
        <xs:attribute name="src"          type="xs:string"  use="required"/>
        <xs:attribute name="width"        type="coordType"  use="optional" default="0"/>
        <xs:attribute name="height"       type="coordType"  use="optional" default="0"/>
        <xs:attribute name="audioBitrate" type="audioBitrate"    use="optional" default="128"/> 
        <xs:attribute name="videoBitrate" type="xs:nonNegativeInteger" use="optional" default="0"/>
        <xs:attribute name="disabledAudio" type="xs:boolean"        use="optional" default="false"/>
        <xs:attribute name="loop"          type="xs:boolean" use="optional" default="false"/>
      </xs:complexType>
    </xs:element>
    <xs:element name="layers">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="layer"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="layer">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="frame" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="lineStyle">
        <xs:complexType>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="color" type="xs:string" use="optional" default="#FFFFFF"/>
            <xs:attribute name="width" type="coordType" use="optional" default="1px"/>
            <xs:attribute name="alpha" type="xs:unsignedByte" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="modify">
        <xs:complexType>
            <xs:attribute name="showId" type="identifier" use="required"/>
            <xs:attributeGroup ref="placeAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="fillTransformAttrs">
        <xs:complexType>
            <xs:attribute name="moveX" type="coordType" use="optional"/>
            <xs:attribute name="moveY" type="coordType" use="optional"/>
            <xs:attribute name="rotate" type="xs:float" use="optional"/>
            <xs:attribute name="rotateCenterX" type="coordType" use="optional"/>
            <xs:attribute name="rotateCenterY" type="coordType" use="optional"/>
            <xs:attribute name="skewX" type="xs:float" use="optional"/>
            <xs:attribute name="skewY" type="xs:float" use="optional"/>
            <xs:attribute name="scaleX" type="xs:float" use="optional"/>
            <xs:attribute name="scaleY" type="xs:float" use="optional"/>
            <xs:attribute name="direct" type="xs:boolean" use="optional" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="movie">
        <xs:complexType>
            <xs:sequence minOccurs="0">
                <xs:element ref="classpath" minOccurs="0" maxOccurs="1"/> 
                <xs:element ref="styles" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="objects" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="layers" minOccurs="0" maxOccurs="1"/>
            </xs:sequence>
            <xs:attribute name="width" type="coordType" use="optional" default="550"/>
            <xs:attribute name="height" type="coordType" use="optional" default="400"/>
            <xs:attribute name="frameRate" use="optional" default="12">
                <xs:simpleType>
                    <xs:restriction base="xs:float">
                        <xs:minExclusive value="0"/>
                        <xs:maxExclusive value="256"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="bgColor" type="xs:string" use="optional" default="#FFFFFF"/>
            <xs:attribute name="SWFVersion" use="optional" default="6">
                <xs:simpleType>
                    <xs:restriction base="xs:unsignedByte">
                        <xs:enumeration value="4"/>
                        <xs:enumeration value="5"/>
                        <xs:enumeration value="6"/>
                        <xs:enumeration value="7"/>
                        <xs:enumeration value="8"/>
                        <xs:enumeration value="9"/>
                        <xs:enumeration value="10"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="compressed" type="xs:boolean" use="optional" default="false"/>
            <xs:attribute name="saveObjectsFirst" type="xs:boolean" use="optional" default="true"/>
            <xs:attribute name="useNetwork" type="xs:boolean" use="optional" default="true"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="classpath">
        <xs:complexType>
            <xs:attribute name="path" type="xs:string" />
        </xs:complexType>
    </xs:element>
    <xs:element name="objects">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="rectangle"/>
                <xs:element ref="polygon"/>
                <xs:element ref="arc"/>
                <xs:element ref="circle"/>
                <xs:element ref="oval"/>
                <xs:element ref="square"/>
                <xs:element ref="image"/>
                <xs:element ref="morph"/>
                <xs:element ref="shape"/>
                <xs:element ref="text"/>
                <xs:element ref="htmlText"/>
                <xs:element ref="sound"/>
                <xs:element ref="button"/>
                <xs:element ref="sprite"/>
                <xs:element ref="font"/>
                <!-- added -->
                <xs:element ref="video"/>
                <!-- end of added -->
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="oval">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="fillTransformAttrs"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="x" type="coordType" use="required"/>
            <xs:attribute name="y" type="coordType" use="required"/>
            <xs:attribute name="width" type="coordType" use="required"/>
            <xs:attribute name="height" type="coordType" use="required"/>
            <xs:attribute name="lineStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyleS" type="xs:string" use="optional"/>
            <xs:attribute name="fillMatrix" type="xs:string" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="point">
        <xs:complexType>
            <xs:attribute name="x" type="coordType" use="required"/>
            <xs:attribute name="y" type="coordType" use="required"/>
            <xs:attribute name="control" type="xs:boolean" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="polygon">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
                <xs:element ref="point" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element ref="fillTransformAttrs" minOccurs="0" maxOccurs="1"/>
            </xs:choice>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="lineStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyleS" type="xs:string" use="optional"/>
            <xs:attribute name="fillTransform" type="xs:string" use="optional"/>
            <xs:attribute name="closed" type="xs:boolean" use="optional" default="true"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="rectangle">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="fillTransformAttrs"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="x" type="coordType" use="required"/>
            <xs:attribute name="y" type="coordType" use="required"/>
            <xs:attribute name="width" type="coordType" use="required"/>
            <xs:attribute name="height" type="coordType" use="required"/>
            <xs:attribute name="lineStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyleS" type="xs:string" use="optional"/>
            <xs:attribute name="fillTransform" type="xs:string" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="morph">
        <xs:complexType>
            <xs:choice minOccurs="2" maxOccurs="2">
                <xs:element ref="rectangle"/>
                <xs:element ref="polygon"/>
                <xs:element ref="arc"/>
                <xs:element ref="circle"/>
                <xs:element ref="oval"/>
                <xs:element ref="square"/>
                <xs:element ref="image"/>
            </xs:choice>
            <xs:attribute name="id" type="identifier" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="shape">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
                <xs:element ref="rectangle"/>
                <xs:element ref="polygon"/>
                <xs:element ref="arc"/>
                <xs:element ref="circle"/>
                <xs:element ref="oval"/>
                <xs:element ref="square"/>
                <xs:element ref="image"/>
            </xs:choice>
            <xs:attribute name="id" type="identifier" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="replace">
        <xs:complexType>
            <xs:attribute name="showId" type="identifier" use="required"/>
            <xs:attribute name="objectId" type="identifier" use="required"/>
            <xs:attributeGroup ref="placeAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="show">
        <xs:complexType>
            <xs:attribute name="objectId" type="identifier" use="required"/>
            <xs:attribute name="id" type="xs:string" use="optional"/>
            <xs:attributeGroup ref="placeAttrs"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="solidFillStyle">
        <xs:complexType>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="color" type="xs:string" use="optional" default="#000000"/>
            <xs:attribute name="alpha" type="xs:unsignedByte" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="sound">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="content"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="src" type="xs:string" use="optional"/>
            <xs:attribute name="keepOriginalQuality" use="optional" />
            <xs:attribute name="mp3Quality" type="audioBitrate" use="optional" />
            <xs:attribute name="sampleRate" type="sampleRate" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="sprite">
        <xs:complexType>
            <xs:sequence minOccurs="0">
                <xs:element ref="content" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="styles" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="objects" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="layers" minOccurs="0" maxOccurs="1"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="optional"/>
            <xs:attribute name="src" type="xs:string" use="optional"/>
            <xs:attribute name="lockroot" type="xs:boolean" use="optional" default="true"/>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="width" type="coordType" use="optional" default="0"/>
            <xs:attribute name="height" type="coordType" use="optional" default="0"/>
            <xs:attribute name="exportAsRaster" type="xs:boolean" default="false" use="optional"/>
            <xs:attribute name="clipped" type="xs:boolean" default="false" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="square">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element ref="fillTransformAttrs"/>
            </xs:sequence>
            <xs:attribute name="id" type="identifier" use="required"/>
            <xs:attribute name="x" type="coordType" use="required"/>
            <xs:attribute name="y" type="coordType" use="required"/>
            <xs:attribute name="size" type="coordType" use="required"/>
            <xs:attribute name="lineStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyle" type="xs:string" use="optional"/>
            <xs:attribute name="fillStyleS" type="xs:string" use="optional"/>
            <xs:attribute name="fillTransform" type="xs:string" use="optional"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="startSound">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
            <xs:attribute name="objectId" type="identifier" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="startSoundStream">
        <xs:complexType>
            <xs:attribute name="objectId" type="identifier" use="required"/>
            <xs:attribute name="trimFrames" type="xs:unsignedShort" use="optional"/>
            <xs:attribute name="trimToMovie" type="xs:boolean" use="optional" default="false"/>
            <xs:attribute name="stopOnFinish" type="xs:boolean" use="optional" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="stopSound">
        <xs:complexType>
            <xs:attribute name="event" type="eventType" use="optional" default="press"/>
            <xs:attribute name="objectId" type="identifier" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="styles">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="lineStyle"/>
                <xs:element ref="solidFillStyle"/>
                <xs:element ref="bitmapFillStyle"/>
                <xs:element ref="gradientFillStyle"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="text">
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="id" type="identifier" use="required"/>
                    <xs:attribute name="x" type="coordType" use="required"/>
                    <xs:attribute name="y" type="coordType" use="required"/>
                    <xs:attribute name="width" type="coordType" use="required"/>
                    <xs:attribute name="height" type="coordType" use="required"/>
                    <xs:attribute name="color" type="xs:string" use="optional"/>
                    <xs:attribute name="fontSize" type="coordType" use="optional"/>
                    <xs:attribute name="font" type="xs:string" use="optional"/>
                    <xs:attribute name="align" type="alignType" use="optional"/>
                    <xs:attribute name="leftMargin" type="coordType" use="optional"/>
                    <xs:attribute name="rightMargin" type="coordType" use="optional"/>
                    <xs:attribute name="indent" type="coordType" use="optional"/>
                    <xs:attribute name="leading" type="coordType" use="optional"/>
                    <xs:attribute name="autoSize" type="xs:boolean" use="optional" default="false"/>
                    <xs:attribute name="border" type="xs:boolean" use="optional" default="false"/>
                    <xs:attribute name="multiline" type="xs:boolean" use="optional" default="false"/>
                    <xs:attribute name="selectable" type="xs:boolean" use="optional" default="true"/>
                    <xs:attribute name="wordWrap" type="xs:boolean" use="optional" default="true"/>
                    <xs:attribute name="fontId" type="identifier" use="optional"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="content">
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="type" type="content-type" use="required"/>
                    <xs:attribute name="encoding" type="encoding" use="optional" default="base64"/>
                    <xs:attribute name="filename" type="xs:string" use="optional"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:attributeGroup name="placeAttrs">
        <xs:attribute name="moveX" type="coordType" use="optional"/>
        <xs:attribute name="moveY" type="coordType" use="optional"/>
        <xs:attribute name="rotate" type="xs:float" use="optional"/>
        <xs:attribute name="rotateCenterX" type="coordType" use="optional"/>
        <xs:attribute name="rotateCenterY" type="coordType" use="optional"/>
        <xs:attribute name="skewX" type="xs:float" use="optional"/>
        <xs:attribute name="skewY" type="xs:float" use="optional"/>
        <xs:attribute name="scaleX" type="xs:float" use="optional"/>
        <xs:attribute name="scaleY" type="xs:float" use="optional"/>
        <xs:attribute name="morphPhase" type="xs:unsignedShort" use="optional"/>
        <xs:attribute name="morphFrames" type="xs:unsignedShort" use="optional"/>
        <xs:attribute name="shiftRed" use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:short">
                    <xs:minInclusive value="-32768"/>
                    <xs:maxInclusive value="32767"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="shiftGreen" use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:short">
                    <xs:minInclusive value="-16384"/>
                    <xs:maxInclusive value="16383"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="shiftBlue" use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:short">
                    <xs:minInclusive value="-16384"/>
                    <xs:maxInclusive value="16383"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="shiftAlpha" use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:short">
                    <xs:minInclusive value="-16384"/>
                    <xs:maxInclusive value="16383"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="multRed"   use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:float">
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="multGreen" use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:float">
                    <xs:minInclusive value="-64"/>
                    <xs:maxInclusive value="63"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="multBlue"  use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:float">
                    <xs:minInclusive value="-64"/>
                    <xs:maxInclusive value="63"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="multAlpha" use="optional">
            <xs:simpleType>
                <xs:restriction base="xs:float">
                    <xs:minInclusive value="-64"/>
                    <xs:maxInclusive value="63"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="maskId" type="identifier" use="optional"/>
        <xs:attribute name="transform" type="xs:string" use="optional"/>
        <xs:attribute name="directTransform" type="xs:boolean" use="optional" default="false"/>
    </xs:attributeGroup>
<!-- Undocumented //-->
    <xs:element name="paramString">
        <xs:complexType>
            <xs:attribute name="value" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="paramInteger">
        <xs:complexType>
            <xs:attribute name="value" type="xs:integer" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="paramDouble">
        <xs:complexType>
            <xs:attribute name="value" type="xs:double" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="actionCallFunction">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="paramString"/>
                <xs:element ref="paramInteger"/>
                <xs:element ref="paramDouble"/>
            </xs:choice>
            <xs:attribute name="name" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="export">
        <xs:complexType>
            <xs:attribute name="objectId" type="identifier" use="required"/>
        </xs:complexType>
    </xs:element>
</xs:schema>
