بالفعل عزيزي ذاك سكريبت جافا . و ها هو لك عزيزي تفضل طريقة عمله
نحتاج لصفحتين . نفترض Index.html و الثانية test.html .
و لصورتين للسكرول . نفترض up.gif و down.gif .
بالصفحة index.html نضع الكود التالي قبل </head>
كود:
<SCRIPT language="JavaScript">
//Scroll
var timer;
var currYpos = 0;
function doScrolling(move){
currYpos = window.frames["scroller"].document.body.scrollTop;
currYpos += move;
window.frames["scroller"].scrollTo(0, currYpos);
}
var fRunning =0
function StartTrans(which2,xchng)
{
if (fRunning == 0)
{
fRunning = 1
which2.filters.blendTrans.Apply();
which2.src = xchng;
which2.filters.blendTrans.Play()
}
}
function EndTrans(which2,xchng)
{
fRunning = 0
which2.filters.blendTrans.Apply();
which2.src = xchng;
which2.filters.blendTrans.Play()
}
</SCRIPT>
و نضع الصورتين بهذا الكود داخل body
كود:
<img border="0" src="images/dwn.gif" onmouseover="timer = window.setInterval('doScrolling(2)', 5);" onmouseout="window.clearInterval(timer);" style="cursor:hand" width="13" height="13">
<img border="0" src="images/up.gif" onmouseover="timer = window.setInterval('doScrolling(-2)', 5);" onmouseout="window.clearInterval(timer);" style="cursor:hand" width="13" height="13">
و نضع كود iframe في المكان الذي نريد و نعطيه id & name = scroller . يعني الكود بهذه الطريقة
كود:
<iframe id="scroller" name="scroller" marginwidth="1" marginheight="1" height="100%" width="100%" scrolling="no" border="0" frameborder="0" src="test.htm
">
تحفظ الصفحة . و تضع صفحة test.html حاول ان يكون محتواها طويل لترى تاثير السكرول .
نحفض كل شيء و راح تشوف النتيجة . ملاحضة يمكنك تغيير كل متغير حسب محتجاتك . يعني طور الفريم و طور و عرض الصور . .... الخ
تحياتي ...