如何在 as3 (Action Scripts 3) 中将舞台缩放到矩形区域?

how to zoom stage to rectangle area in as3 (Action Scripts 3)?

如何在 as3 (Action Scripts 3) 中将舞台缩放到矩形区域?

我有一个文本,当鼠标悬停在单词上时,颜色发生了变化。 现在,当单击单词时我需要放大到这个单词并隐藏另一个单词?

将您的文本放入影片剪辑中,并为影片剪辑实例命名为 yourWord。

  yourWord.addEventListner(MouseEvent.CLICK,onCLICK);
    function on CLICK(e:MouseEvent){
    yourWord.xScale = yourWord.yScale = 2;
    }

注意: 如果你想要一些缓动动画,那么你可以使用 tweenlite 库或 flash 内置的 tweener 方法。

这是为了缩放,其余的词都是开箱即用的,对吧?隐藏其他话:你好。你是说

翻译:
你是说 "hide other words", zoom to send other words out of stage?

var zoomAmount:Number=3;//مقدار زوم  , zoom amount
var wordX:number=???;// موقعیت طولی نقطه ی بالا-چپ کلمه ی مورد نظر ,x of zooming word
var wordY:number=???;// موقعیت ارتفاعی نقطه ی بالا-چپ کلمه ی مورد نظر ,y of zooming word


txt.addEventListener("click",zoom);


function zoom(e:MouseEvent=null){
     this.x=-wordX;
     this.y=-wordY;
     this.scaleX=this.scaleY=zoomAmount;

希望这篇文章对您有所帮助☺