當前位置:編程學習大全網 - 源碼下載 - 求搜狐賽車頻道的flash圖片切換的全部源碼

求搜狐賽車頻道的flash圖片切換的全部源碼

註意,它是帶參數的!

如果直接打開SWF效果是不壹樣的(沒東西)

最簡單的方法就是仿造它的網頁寫。

這是它的源代碼(FLA格式)

/2752717630741857

這是它的ACTION腳本:

mainmove:

// Action script...

// [Action in Frame 1]

stop ();

System.useCodepage = true;

var my_array = info.split("|||");

delete info;

var i = 0;

while (i < my_array.length)

{

var zu = my_array[i].split("|_|");

my_array[i] = {title: zu[0], photourl: zu[1], link: zu[2]};

my_array[i].title = my_array[i].title.split("");

my_array[i].title = my_array[i].title.join("\r");

i++;

} // end while

nextFrame ();

// [Action in Frame 2]

function goto(n)

{

var _l2 = n;

var _l3 = this;

moveNum = _l2;

var _l1 = 0;

while (_l1 < my_array.length)

{

_l3["mc" + _l1].leftMove = _l1 <= _l2;

_l1++;

} // end while

} // End of the function

var i = 0;

while (i < my_array.length)

{

var mc = mca.duplicateMovieClip("mc" + i, i, my_array[i]);

mc.n = i;

mc.lx = mc._x + i * 21;

mc.rx = mc._x + 474 + i * 21;

mc.leftMove = true;

mc._x = mc.lx;

mc.gotoAndStop(i + 1);

mc.load_mc.loadMovie(mc.photourl);

i++;

} // end while

mca._visible = false;

var sudu = 10;

var t = getTimer();

moveNum = 3;

onMouseMove = function ()

{

t = getTimer();

};

onEnterFrame = function ()

{

var _l3 = this;

var _l2 = 0;

while (_l2 < my_array.length)

{

var _l1 = _l3["mc" + _l2];

if (_l1.leftMove)

{

if (_l1._x > _l1.lx)

{

_l1._x = _l1._x + (_l1.lx - _l1._x) / 7;

if (_l1._x <= _l1.lx)

{

} // end if

} // end if

}

else if (_l1._x < _l1.rx)

{

_l1._x = _l1._x + (_l1.rx - _l1._x) / 7;

if (_l1._x >= _l1.rx)

{

} // end if

} // end if

_l2++;

} // end while

if (getTimer() - t > 4000)

{

if (!zzq_mc._visible)

{

zzq_mc.open();

} // end if

} // end if

};

sprite2:

stop ();

sprite3:

// Action script...

// [Action in Frame 1]

function open()

{

num = _root.moveNum;

_visible = true;

a = 0;

onEnterFrame = function ()

{

a++;

if (a > 1)

{

a = 119;

this.onEnterFrame = function ()

{

a = (a + 1) % 120;

if (a == 0)

{

gotoPage();

} // end if

};

} // end if

};

} // End of the function

function close()

{

_visible = false;

_parent.t = getTimer();

delete onEnterFrame;

} // End of the function

function gotoPage()

{

var _l1 = _root.my_array.length - 1;

num = (num + 1) % (_l1 * 2);

var _l2 = _l1 - Math.abs(num - _l1);

_root.goto(_l2);

} // End of the function

bt.useHandCursor = false;

_visible = false;

this.swapDepths(100);

button1:

on (release)

{

getURL(link, "_blank");

}

botton2:

on (release)

{

getURL(link, "_blank");

}

botton3:

on (rollOver)

{

close();

}

  • 上一篇:Warz遊戲源代碼
  • 下一篇:智能客服減少了人工成本智用AI,但真的能解決客戶問題嗎?
  • copyright 2024編程學習大全網