Advanced | tips | Mouse Use mouse mobile sensor mobile pictures, do site friends may be used on. I've done more than n before, maybe it's easier to do this.
source File Download
Add the following code to the first frame. Picture Clips for pictures, Dragcontrol for an empty movie clip reference.
/*
Copyright by Webstudio.com.cn.author by egoldy.2005-10-30
*/
Stop ();
The film is wide and high
var widthx=400;
var heighx=300;
Cycle
Onenterframe=function () {
Drag the reference to move as long as it's using its coordinates
Onmousemove=function () {
StartDrag ("Dragcontrol", true);
}
Trace (_root.dragcontrol._x);
Picture move
_root.picture._x+= (dragcontrol._x* ( -1)-picture._x) *0.2;
End position Condition
if (DRAGCONTROL._X>=WIDTHX) {
_root.picture._x=-picture._width;
}
Start position condition
if (dragcontrol._x<=-1) {
_root.picture._x=-1;
}
}