最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
拖动及动态遮罩
时间:2022-07-02 17:08:54 编辑:袖梨 来源:一聚教程网
码如下:
import .display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Rectangle
var rect:Rectangle = new Rectangle(80,120, 350, 160);
var circle:Sprite = new Sprite();
circle.graphics.beginFill(0xFFCC00);
circle.graphics.drawCircle(0, 0, 80);
circle.x=200
circle.y=200
addChild(circle);
circle.buttonMode=true
circle.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
function mouseDown(event:MouseEvent):void {
circle.startDrag(true,rect);
}
circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
function mouseReleased(event:MouseEvent):void {
circle.stopDrag();
}
mc.mask=circle
mc为导入的一背景图片转的影片剪辑
相关文章
- 微博手机网页版快捷入口-微博APP网页版一键直达链接 02-15
- 俄罗斯搜索引擎地址大全-俄罗斯搜索Yandex官方入口 02-15
- 2026海棠线上文学城直达入口-海棠线上文学城2026官方网址一键链接 02-15
- emo了是什么梗-emo了梗解析 02-15
- 快手官网网页版入口-快手官方网页版直达 02-15
- 动物塑形性格测试网站推荐-动物塑形性格测试网站链接合集 02-15