一聚教程网:一个值得你收藏的教程网站

热门教程

AS2/ AS3 SWF Encrypt5.0测试版的LOGO的方法

时间:2022-06-28 22:18:14 编辑:袖梨 来源:一聚教程网

根据自己的使用习惯写的,从理论上讲有可能会误把符合相同要求(尺寸和坐标与swf encrypt的logo一样及使用了默认实例名)的mc删除

function unswfencryptlogo() {
        for (var p in this) {
                var _mc = this[p];
                if (typeof _mc == "object" && _mc._width == 0 && _mc._height == 0 && math.abs(_mc._x)<1 && math.abs(_mc._y)<1) {
                        _mc._name.indexof("instance") != -1 && (_mc._visible=false);
                }
                if (typeof _mc == "movieclip" && math.abs(160-_mc._width)<3 && math.abs(70-_mc._height)<3 && math.abs(_mc._x-100)<1 && math.abs(_mc._y-37.5)<1) {
                        _mc._name.indexof("instance") != -1 && _mc.unloadmovie();
                }
        }
}
unswfencryptlogo();
//-------------------------deleteswfencryptlogo-as3-------------------------
function unswfencryptlogo() {
        for (var p:uint =0; p                 var _mc = getchildat(p);
                if (_mc as simplebutton && _mc.width == 0 && _mc.height == 0&&math.abs (_mc.x)<1&&math.abs (_mc.y)<1) {
                        _mc.name.indexof("instance") != -1 && (_mc.visible=false);
                } else if (_mc as movieclip && math.abs(160-_mc.width)<3 && math.abs(70-_mc.height)<3&&math.abs (_mc.x-100)<1&&math.abs (_mc.y-37.5)<1) {
                        _mc.name.indexof("instance") != -1 &&(_mc.visible=false);
                }
        }
}
unswfencryptlogo();

 

热门栏目