Flash AS2实例教程:制作360度全景动画效果

2019-10-08 12:51:27于海丽

img_width = img_mc._width/2;//设置前景鼠标检测范围;
bg_width = bg_mc._width/2;//设置背景鼠标检测范围;
if (_root._xmouse>0 && _root._xmouse<page_width && _root._ymouse>0 && _root._ymouse<page_height) {
//判断鼠标是否在场景范围内;
img_mc._x = img_mc._x-(_root._xmouse-page_width/2)/step;//控制前景循环;
bg_mc._x = bg_mc._x-(_root._xmouse-page_width/2)/step*1.3;//控制背景循环,速度比前景快1.3倍;
if (img_mc._x<-(img_width-page_width)) {//以下几个if循环为检测是否超出范围;
img_mc._x = page_width;
}
if (img_mc._x>page_width) {
img_mc._x = page_width-img_width;
}
if (bg_mc._x<-(bg_width-page_width)) {
bg_mc._x = page_width;
}
if (bg_mc._x>page_width) {
bg_mc._x = page_width-bg_width;
}
}
}

素材:

Flash AS2教程:制作360度全景动画效果,PS教程,思缘教程网

Flash AS2教程:制作360度全景动画效果,PS教程,思缘教程网