public class TagTypes

    {

        // Flash 1 tags

        public static const TAG_END:uint = 0;

        public static const TAG_SHOWFRAME:uint = 1;

        public static const TAG_DEFINESHAPE:uint = 2;

        public static const TAG_FREECHARACTER:uint = 3;

        public static const TAG_PLACEOBJECT:uint = 4;

        public static const TAG_REMOVEOBJECT:uint = 5;

        public static const TAG_DEFINEBITS:uint = 6;

        public static const TAG_DEFINEBUTTON:uint = 7;

        public static const TAG_JPEGTABLES:uint = 8;

        public static const TAG_SETBACKGROUNDCOLOR:uint = 9;

        public static const TAG_DEFINEFONT:uint = 10;

        public static const TAG_DEFINETEXT:uint = 11;

        public static const TAG_DOACTION:uint = 12;

        public static const TAG_DEFINEFONTINFO:uint = 13;

        public static const TAG_DEFINESOUND:uint = 14;

        public static const TAG_STARTSOUND:uint = 15;

        public static const TAG_STOPSOUND:uint = 16;

        public static const TAG_DEFINEBUTTONSOUND:uint = 17;

        public static const TAG_SOUNDSTREAMHEAD:uint = 18;

        public static const TAG_SOUNDSTREAMBLOCK:uint = 19;

        // Flash 2 tags

        public static const TAG_DEFINEBITSLOSSLESS:uint = 20;

        public static const TAG_DEFINEBITSJPEG2:uint = 21;

        public static const TAG_DEFINESHAPE2:uint = 22;

        public static const TAG_DEFINEBUTTONCXFORM:uint = 23;

        public static const TAG_PROTECT:uint = 24;

        public static const TAG_PATHSAREPOSTSCRIPT:uint = 25;

        // Flash 3 tags

        public static const TAG_PLACEOBJECT2:uint = 26;

        

        public static const TAG_REMOVEOBJECT2:uint = 28;

        public static const TAG_SYNCFRAME:uint = 29;

        

        public static const TAG_FREEALL:uint = 31;

        public static const TAG_DEFINESHAPE3:uint = 32;

        public static const TAG_DEFINETEXT2:uint = 33;

        public static const TAG_DEFINEBUTTON2:uint = 34;

        public static const TAG_DEFINEBITSJPEG3:uint = 35;

        public static const TAG_DEFINEBITSLOSSLESS2:uint = 36;

        // Flash 4 tags

        public static const TAG_DEFINEEDITTEXT:uint = 37;

        public static const TAG_DEFINEVIDEO:uint = 38;

        public static const TAG_DEFINESPRITE:uint = 39;

        public static const TAG_NAMECHARACTER:uint = 40;

        public static const TAG_PRODUCTINFO:uint = 41;

        public static const TAG_DEFINETEXTFORMAT:uint = 42;

        public static const TAG_FRAMELABEL:uint = 43;

        // Flash 5 tags

        public static const TAG_DEFINEBEHAVIOR:uint = 44;

        public static const TAG_SOUNDSTREAMHEAD2:uint = 45;

        public static const TAG_DEFINEMORPHSHAPE:uint = 46;

        public static const TAG_FRAMETAG:uint = 47;

        public static const TAG_DEFINEFONT2:uint = 48;

        public static const TAG_GENCOMMAND:uint = 49;

        public static const TAG_DEFINECOMMANDOBJ:uint = 50;

        public static const TAG_CHARACTERSET:uint = 51;

        public static const TAG_FONTREF:uint = 52;

        public static const TAG_DEFINEFUNCTION:uint = 53;

        public static const TAG_PLACEFUNCTION:uint = 54;

        public static const TAG_GENTAGOBJECT:uint = 55;

        public static const TAG_EXPORTASSETS:uint = 56;

        public static const TAG_IMPORTASSETS:uint = 57;

        public static const TAG_ENABLEDEBUGGER:uint = 58;

        // Flash 6 tags

        public static const TAG_DOINITACTION:uint = 59;

        public static const TAG_DEFINEVIDEOSTREAM:uint = 60;

        public static const TAG_VIDEOFRAME:uint = 61;

        public static const TAG_DEFINEFONTINFO2:uint = 62;

        public static const TAG_DEBUGID:uint = 63;

        public static const TAG_ENABLEDEBUGGER2:uint = 64;

        public static const TAG_SCRIPTLIMITS:uint = 65;

        // Flash 7 tags

        public static const TAG_SETTABINDEX:uint = 66;

        // Flash 8 tags

        

        

        public static const TAG_FILEATTRIBUTES:uint = 69;

        public static const TAG_PLACEOBJECT3:uint = 70;

        public static const TAG_IMPORTASSETS2:uint = 71;

        public static const TAG_DOABC:uint = 72;

        public static const TAG_DEFINEFONTALIGNZONES:uint = 73;

        public static const TAG_CSMTEXTSETTINGS:uint = 74;

        public static const TAG_DEFINEFONT3:uint = 75;

        public static const TAG_SYMBOLCLASS:uint = 76;

        public static const TAG_METADATA:uint = 77;

        public static const TAG_SCALINGGRID:uint = 78;

        

        

        

        public static const TAG_DOABC2:uint = 82;

        public static const TAG_DEFINESHAPE4:uint = 83;

        public static const TAG_DEFINEMORPHSHAPE2:uint = 84;

        

        // Flash 9 tags

        public static const TAG_DEFINESCENEANDFRAMELABELDATA:uint = 86;

        public static const TAG_DEFINEBINARYDATA:uint = 87;

        public static const TAG_DEFINEFONTNAME:uint = 88;

        public static const TAG_STARTSOUND2:uint = 89;

        public static const TAG_DEFINEBITSJPEG4:uint = 90;

        // Flash 10 tags

        public static const TAG_DEFINEFONT4:uint = 91;

/**

         * tagType => tag 名称 

         */     

        private static const TAG_NAMES:Array =["End","ShowFrame","DefineShape","FreeCharacter","PlaceObject","RemoveObject","DefineBits","DefineButton","JPEGTables","SetBackgroundColor","DefineFont","DefineText","DoAction","DefineFontInfo","DefineSound","StartSound","StopSound","DefineButtonSound","SoundStreamHead","SoundStreamBlock","DefineBitsLossless","DefineBitsJPEG2","DefineShape2","DefineButtonCxform","Protect","PathsArePostScript","PlaceObject2","27
(invalid)","RemoveObject2","SyncFrame","30 (invalid)","FreeAll","DefineShape3","DefineText2","DefineButton2","DefineBitsJPEG3","DefineBitsLossless2","DefineEditText","DefineVideo","DefineSprite","NameCharacter","ProductInfo","DefineTextFormat","FrameLabel","DefineBehavior","SoundStreamHead2","DefineMorphShape","FrameTag","DefineFont2","GenCommand","DefineCommandObj","CharacterSet","FontRef","DefineFunction","PlaceFunction","GenTagObject","ExportAssets","ImportAssets","EnableDebugger","DoInitAction","DefineVideoStream","VideoFrame","DefineFontInfo2","DebugID","EnableDebugger2","ScriptLimits","SetTabIndex","67
(invalid)","68 (invalid)","FileAttributes","PlaceObject3","ImportAssets2","DoABC","DefineFontAlignZones","CSMTextSettings","DefineFont3","SymbolClass","Metadata","ScalingGrid","79 (invalid)","80 (invalid)","81 (invalid)","DoABC2","DefineShape4","DefineMorphShape2","85
(invalid)","DefineSceneAndFrameLabelData","DefineBinaryData","DefineFontName","StartSound2","DefineBitsJPEG4","DefineFont4"];

/**

         * tagType => tag class

         */     

        private static const TAG_CLASS:Array = [EndTag,ShowFrameTag,DefineShapeTag,FreeCharacterTag,PlaceObjectTag,RemoveObjectTag,DefineBitsTag,DefineButtonTag,JPEGTablesTag,SetBackgroundColorTag,DefineFontTag,DefineTextTag,DoActionTag,DefineFontInfoTag,DefineSoundTag,StartSoundTag,StopSoundTag,DefineButtonSoundTag,SoundStreamHeadTag,SoundStreamBlockTag,DefineBitsLosslessTag,DefineBitsJPEG2Tag,DefineShape2Tag,DefineButtonCxformTag,ProtectTag,PathsArePostScriptTag,PlaceObject2Tag,null,RemoveObject2Tag,SyncFrameTag,null,FreeAllTag,DefineShape3Tag,DefineText2Tag,DefineButton2Tag,DefineBitsJPEG3Tag,DefineBitsLossless2Tag,DefineEditTextTag,DefineVideoTag,DefineSpriteTag,NameCharacterTag,ProductInfoTag,DefineTextFormatTag,FrameLabelTag,DefineBehaviorTag,SoundStreamHead2Tag,DefineMorphShapeTag,FrameTagTag,DefineFont2Tag,GenCommandTag,DefineCommandObjTag,CharacterSetTag,FontRefTag,DefineFunctionTag,PlaceFunctionTag,GenTagObjectTag,ExportAssetsTag,ImportAssetsTag,EnableDebuggerTag,DoInitActionTag,DefineVideoStreamTag,VideoFrameTag,DefineFontInfo2Tag,DebugIDTag,EnableDebugger2Tag,ScriptLimitsTag,SetTabIndexTag,null,null,FileAttributesTag,PlaceObject3Tag,ImportAssets2Tag,DoABCTag,DefineFontAlignZonesTag,CSMTextSettingsTag,DefineFont3Tag,SymbolClassTag,MetadataTag,ScalingGridTag,null,null,null,DoABCTag,DefineShape4Tag,DefineMorphShape2Tag,null,DefineSceneAndFrameLabelDataTag,DefineBinaryDataTag,DefineFontNameTag,StartSound2Tag,DefineBitsJPEG4Tag,DefineFont4Tag];

        

        

        /**

         * 根据编号获取tag名称 

         * @param tagType

         * @return 

         * 

         */     

        public static function getTagNameByTagType(tagType:int):String

        {

            return TAG_NAMES[tagType] || null;

        }

        

        /**

         * 根据变化获取tag class 

         * @param tagType

         * @return 

         * 

         */     

        public static function getTagClassByTagType(tagType:int):Class

        {

            return TAG_CLASS[tagType] || null;

        }

    }

}

swf 文件解析的更多相关文章

  1. C#的Process类调用第三方插件实现PDF文件转SWF文件

    在项目开发过程中,有时会需要用到调用第三方程序实现本系统的某一些功能,例如本文中需要使用到的swftools插件,那么如何在程序中使用这个插件,并且该插件是如何将PDF文件转化为SWF文件的呢?接下来 ...

  2. [转] swf文件加密基础

    本来打算下班回来就写这个东西,一方面算是对今天学习的一个笔记记录,另外一方面,给一些朋友普及一些swf文件加密基础知识.之所以说是基础,那是因为我也是刚学习了一点,灰常的基础.不过晚上看了一会我是传奇 ...

  3. 如何防止SWF文件被反编译

    这篇文章的标题所提出的问题的答案是“不可能”.至少对我来说是不可能的.借助适当的工具,我们可以反编译任何SWF文件.所以,不要将重要的信息置于SWF文件中.SWF文件中不要包含个人的帐号或者密码. 我 ...

  4. use SWF / Flash in cocos2d-x; cocos2d(cocos2d-x) 直接播放flash / SWF文件

    前段时间移植一个页游到手游,原先页游的项目里面有1000+的Flash人物,宠物动画,特效. 这要是全部重新做一遍,还不累死人?所以就想干脆直接在Cocos2d(x)里面播放SWF文件.(包括场景,过 ...

  5. 将SWF文件用作资源打包

    使用Flash开发网页游戏少不了与各种美术资源打交道.对于静态资源的那就是各种图片,对于会动的资源可以考虑直接做成swf.制作成swf的美术资源又可以分为两种:一种是直接将关键帧罗列在主时间轴上,那么 ...

  6. SWF文件加密、混淆

    简单说下SWF文件的混淆原理,(已经明白的请跳过本段):我们的AS源代码被编译完成后,SWF内部会形成一个字符串映射表,包含源码里出现的所有字符串(类名,包名,成员变量名,常量等).一个数字(相当于地 ...

  7. 【转载】在HTML中插入swf文件(转)

    在HTML中插入swf文件(转) 在网页里面插入swf,再平常不过了,一般会想到如下代码: Html代码 <object classid="clsid:D27CDB6E-AE6D-11 ...

  8. html中嵌入swf文件的几种方法

    转自:http://blog.163.com/yuki_1154/blog/static/7120277120126109315935/ 找了很久终于找到一个比较全面的: 1. object + em ...

  9. CocosStudio文件解析工具CsdAnalysis

    起因 因为工作需要,所以需要使用CocosStudio来制作界面动画什么的.做完了发现需要找里边对象的时候会有很长一串代码,感觉不是很爽.之前写OC代码的时候可以吧程序中的对象指针跟编辑器中的对象相对 ...

随机推荐

  1. 物联网架构成长之路(5)-EMQ插件配置

    1. 前言 上一小结说了插件的创建,这一节主要怎么编写代码,以及具体流程之类的.2. 增加一句Hello World 修改 ./deps/emq_plugin_wunaozai/src/emq_plu ...

  2. 远程桌面中Tab键不能补全的解决办法

    我们曾在之前的一篇文章中介绍了windows远程连接ubuntu的方法,在成功登陆远程桌面环境之后,发现在终端中Tab键不能自动补齐(但是Ctrl +Tab 可以用,但是需要按下组合键才能补全的话,时 ...

  3. 【九天教您南方cass 9.1】02 从地形图上绘制纵横断面

    同学们大家好,欢迎收看由老王测量上班记出品的cass9.1视频课程, 测量空间的[九天教您南方cass]专栏是九天老师专门开设cass免费教学班.希望能帮助那些刚入行的同学,并祝您一臂之力. [点击索 ...

  4. 【九天教您南方cass 9.1】 08 绘制等高线及对其处理

    同学们大家好,欢迎收看由老王测量上班记出品的cass9.1视频课程 我是本节课主讲老师九天. 我们讲课的教程附件也是共享的,请注意索取测量空间中. [点击索取cass教程]5元立得 (给客服说暗号:“ ...

  5. InstallShield:卸载时文字叠加,文字乱码

    问题: InstallShield2010打包的程序.如果程序正在运行,卸载程序,提示关闭程序,然后消息界面出现文字叠加. 定位问题: 新建Installshield项目,依次修改SetupType, ...

  6. Socket阻塞模式和非阻塞模式的区别

    简单点说: 阻塞就是干不完不准回来,    非组赛就是你先干,我现看看有其他事没有,完了告诉我一声 我们拿最常用的send和recv两个函数来说吧... 比如你调用send函数发送一定的Byte,在系 ...

  7. Mysql系列一:SQL入门

    csdn博客搬迁 连接数据库:1.在dos窗口下,进入数据库的安装目录的bin目录下,使用mysqld命令启动数据库服务,或者在计算机的服务里面启动mysql服务2.另外打开一个dos窗口,进入数据库 ...

  8. 这才是真正的裸眼3D!超级震撼!!

    大家有没认为有意思啦,反正俺是被震撼到了. 好奇异-- ! " src="http://www.yixieshi.com/uploads/allimg/141116/1446431 ...

  9. 【QT】error: 'SIGNAL' was not declared in this scope

    error: 'SIGNAL' was not declared in this scope  未在此范围内声明. connect(ui->Btnshowhello,SIGNAL(clicked ...

  10. 解决 Spring Oauth2 RedisTokenStore storeAccessToken 报错 java.lang.NoSuchMethodError: org.springframework.data.redis.connection.RedisConnection.set

    原因是Spring 版本兼容问题 参考: https://blog.csdn.net/smollsnail/article/details/78954225 继承 RedisTokenStore 修改 ...