コード例 #1
0
 public Movie(TagDefineMovie define)
 {
     _define        = define;
     _curFrame      = null;
     _isBoundsDirty = true;
     _tweenMode     = kTweenMode.SkipNoLabelFrames;
     _depthDisplays = new Display[define.maxDepth];
     _movieCtrl     = new MovieCtrl(this);
     _caches        = new utList <Display>();
     if (string.IsNullOrEmpty(define.className))
     {
         this.nameInHierarchy = define.characterId.ToString();
     }
     else
     {
         this.nameInHierarchy = define.className;
     }
     this.cascadeColorEnabled   = true;
     this.cascadeOpacityEnabled = true;
 }
コード例 #2
0
        public TagDefine parseDefine(Flash flash, byte[] data, Cursor cursor)
        {
            //find nextIndex
            int dataLength = Utils.ReadInt32(data, cursor);
            int nextIndex  = cursor.index + dataLength;

            //parse
            byte      type = Utils.ReadByte(data, cursor);
            TagDefine def  = null;

            if (type == TagDefine.DEF_TYPE_GRAPHIC)
            {
                def = new TagDefineGraphic(flash, data, cursor);
            }
            else if (type == TagDefine.DEF_TYPE_SPRITE)
            {
                def = new TagDefineMovie(flash, data, cursor);
            }

            //nextIndex
            cursor.index = nextIndex;

            return(def);
        }