class Border extends MovieClip {
private var borderClip:MovieClip;
public var x:Number;
public var y:Number;
public var width:Number;
public var height:Number;
public function Border() {
createEmptyMovieClip("borderClip", 1000);
x = this._x;
y = this._y;
width = this._width;
height = this._height;
}
public function makeBorder():Void {
with (borderClip) {
lineStyle(0, 0xff0000, 100);
beginFill(0xff6600,20);
moveTo(this.x, this.y);
lineTo(this.x + this.width, this.y);
lineTo(this.x + this.width, this.y + this.height);
lineTo(this.x, this.y + this.height);
lineTo(this.x, this.y);
endFill();
}
}
public function removeBorder():Void {
borderClip.clear();
}
public function onRollOver():Void {
swapDepths(10000);
makeBorder();
}
public function onRollOut():Void {
removeBorder();
}
public function onDragOut():Void {
removeBorder();
}
public function onPress():Void {
this.startDrag();
}
public function onRelease():Void {
stopDrag();
}
public function onReleaseOutside():Void {
stopDrag();
}
}

相关文章:

  • 2021-05-20
  • 2022-12-23
  • 2021-12-04
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2019-12-09
  • 2021-10-23
  • 2021-10-15
  • 2021-07-27
  • 2022-12-23
相关资源
相似解决方案