图片放大缩小移动类

villalong10

villalong10

2016-01-29 12:55

图片放大缩小移动类,图片放大缩小移动类
-图片放大缩小移动类: -----------------------class-------------------------

class ZoomOpenMove {
   private var obj:MovieClip;
   private var pos_scale:Number;
   private var x_speed:Number;
   private var y_speed:Number;
   private var scale_speed:Number;
   private var scale_step:Number;
   public function ZoomOpenMove(_obj:MovieClip) {
      this.obj = _obj;
   }
   public function get s_speed():Number {
      return scale_speed;
   }
   public function set s_speed(_s_speed:Number):Void {
      scale_speed = _s_speed;
   }
   public function get _x_speed():Number {
      return x_speed;
   }
   public function set _x_speed(_x_x_speed:Number):Void {
      x_speed = _x_x_speed;
   }
   public function get _y_speed():Number {
      return y_speed;
   }
   public function set _y_speed(_y_y_speed:Number):Void {
      y_speed = _y_y_speed;
   }
   public function get _scale_step():Number {
      return scale_step;
   }
   public function set _scale_step(scalestep:Number):Void {
      scale_step = scalestep;
   }
   public function get _scale_speed():Number {
      return scale_speed
   }
   public function set _scale_speed(scalespeed:Number):Void {
      scale_speed = scalespeed
   }
   public function get _pos_scale():Number {
      return pos_scale;
   }
   public function set _pos_scale(posscale:Number):Void {
      pos_scale = posscale;
   }
   public function Open() {
      if (_root._xmouse<Stage.width and _root._xmouse0 and _root._ymouse0 and _root._ymouse<Stage.height) {
         obj._xscale<pos_scale ? obj._xscale=obj._yscale += scale_step : obj._xscale=obj._yscale=pos_scale;
      }
   }
   public function Zoom() {
      if (_root._xmouse<Stage.width and _root._xmouse0 and _root._ymouse0 and _root._ymouse<Stage.height) {
         obj._x += (0-obj._x)/scale_speed;
         obj._y += (0-obj._y)/scale_speed;
         obj._xscale += (100-obj._xscale)/scale_speed;
         obj._yscale += (100-obj._yscale)/scale_speed;
      }
   }
   public function Move() {
      if (obj.hitTest(_root._xmouse, _root._ymouse, true)) {
         var pos_x = _root._xmouse*(Stage.width-obj._width)/Stage.width;
         var pos_y = _root._ymouse*(Stage.height-obj._height)/Stage.height;
         obj._x += (pos_x-obj._x)/x_speed;
         obj._y += (pos_y-obj._y)/y_speed;
      }
  
展开更多 50%)
分享

猜你喜欢

图片放大缩小移动类

flash教程
图片放大缩小移动类

PS中如何快速放大、缩小、移动图像

PS 电脑
PS中如何快速放大、缩小、移动图像

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

Flash类的运用:可放大、缩小、旋转的鼠标操作类

FLASH flash教程 autocad教程
Flash类的运用:可放大、缩小、旋转的鼠标操作类

Flash AS2教程:鼠标感应放大缩小图片效果

FLASH flash教程 autocad教程
Flash AS2教程:鼠标感应放大缩小图片效果

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

ps放大缩小快捷键

PS
ps放大缩小快捷键

Photoshop制作放大缩小网页图标

PS PS基础
Photoshop制作放大缩小网页图标

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

windows环境下mysql数据库的主从同步备份步骤

windows环境下mysql数据库的主从同步备份步骤

在.NET中开发组件

在.NET中开发组件
下拉加载更多内容 ↓