saymedia bug问题

一 takeover弹出不居中问题:

 

///先清除掉原来的弹出效果,然后自己再写一个。重置弹出

import flash.events.Event;

import com.greensock.TweenLite;

import com.greensock.easing.*;

 

this.addEventListener(Event.ENTER_FRAME,onAddToStage);

function onAddToStage(e:Event=null)

{

TweenLite.killTweensOf(this);

this.removeEventListener(Event.ENTER_FRAME,onAddToStage);

var scale:Number = 0.8;

this.scaleX = scale;

this.scaleY = scale;

this.x=(stage.stageWidth-this.bg.width*scale)/2;

this.y=(stage.stageHeight-this.bg.height*scale)/2;

this.alpha = 0;

TweenLite.to(this,0.3,{alpha:1,scaleX:1,scaleY:1,x:(stage.stageWidth-this.bg.width)/2,y:(stage.stageHeight-this.bg.height)/2,delay:1,ease:Quad.easeInOut});

}

你可能感兴趣的:(media)