公告

更新

 

互联网 JS控件 按钮 黑色 灰色 白色 蓝色 绿色 黄色 橙色

> flash > 杂乱整理

flash里鼠标左右移动图片移动代码
0
作者:     来源:     日期:2008/6/26 10:54:34     人气:      标签:

1.在flash第一帧的帧上插入如下代码

 

function moveGraphic(clip, speed)
{
    if (_root._xmouse >= right && this._x > right)
    {
        clip._x = clip._x + (right - clip._x) / 1;
    }
    else if (_root._ymouse >= bottom && clip._y > bottom)
    {
        clip._y = clip._y + (bottom - clip._y) / 1;
    }
    else
    {
        clip._x = clip._x - (clip._x + _xmouse * speed);
        clip._y = clip._y - 0;
    } // end else if
} // End of the function
stop ();
var right = 1004;
var bottom = 620;
var speed;
var clip;
var nInterval = setInterval(moveGraphic, 10, clip1, 2.000000E-001);
var n1Interval = setInterval(moveGraphic, 10, clip2, 1.500000E-001);
var n2Interval = setInterval(moveGraphic, 10, clip3, 3.000000E-001);
var n2Interval = setInterval(moveGraphic, 10, clip4, 2.500000E-001);

 

 

 

2.新建影片一,影片的名称为clip2

3.新建影片二,影片的名称为clip3

 

运行就可以了

Copyright 2008 网站频道 All Rights Resverved.
提供:网页特效 JS广告 网站截图 酷站推荐 交流群:3506863
     页面执行时间0.0625秒 查询数据库8次