Flash Mouse Sensor Mobile pictures

Source: Internet
Author: User
Tags reference
Mouse Example: Hong Kong panorama picture


Script:
Add the following code to the first frame. Picture clip 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 this is the key he controls the width height of the film image and is customizable.
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;
}
Recommended viewing size: 600*400

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.