求搜狐赛车频道的flash图片切换的全部源码
发布网友
发布时间:2022-05-16 14:53
我来回答
共8个回答
热心网友
时间:2022-05-16 16:23
注意,它是带参数的!
如果直接打开SWF效果是不一样的(没东西)
最简单的方法就是仿造它的网页写。
这是它的源代码(FLA格式)
http://pickup.mofile.com/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.plicateMovieClip("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 su = 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();
}
热心网友
时间:2022-05-16 17:41
需要这整段得代码
<script type="text/javascript">
var varText = ""
function addInfo(title,photourl,link){
if(varText!=""){
varText+="|||";
}
varText+=title+"|_|"+photourl+"|_|"+link;
}
addInfo("美女车模靓丽耀赛场","http://photocdn.sohu.com/20060702/Img244046928.jpg","http://f1.sports.sohu.com/20060702/n244047007.shtml");
addInfo("领奖台上的舒马赫跳","http://photocdn.sohu.com/20060703/Img244057774.jpg","http://f1.sports.sohu.com/20060703/n244057963.shtml");
addInfo("六车连环相撞","http://photocdn.sohu.com/20060703/Img244057291.jpg","http://f1.sports.sohu.com/20060703/n244057260.shtml");
addInfo("舒马赫在美国站夺冠","http://photocdn.sohu.com/20060703/Img244057771.jpg","http://f1.sports.sohu.com/20060703/n244056654.shtml");
//
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="558" height="172" id="01" align="middle">')
document.write('<param name="allowScriptAccess" value="sameDomain" />')
document.write('<param name="movie" value="http://photocdn.sohu.com/20060302/Img242102954.swf?info='+varText+'" />')
document.write('<param name="quality" value="high" />')
document.write('<PARAM NAME="wmode" VALUE="transparent">')
document.write('<param name="bgcolor" value="#ffffff" />')
document.write('<embed src="http://photocdn.sohu.com/20060302/Img242102954.swf" quality="high" bgcolor="#ffffff" width="558" height="172" name="01" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
document.write('</object>')
</script>
热心网友
时间:2022-05-16 19:15
你自己制作一个啊 这样就方便多了啊!!!!!
也不能什么都要靠别人的啊!
热心网友
时间:2022-05-16 21:07
这个应该是别人写的,不是网上那么容易就能找到的咚咚。
热心网友
时间:2022-05-16 23:15
下载一个“闪客精灵”的东西
热心网友
时间:2022-05-17 01:39
网上不能找到
热心网友
时间:2022-05-17 04:21
用DODO看行不行啊