Hi,
I want dynamic time-controlled slider.
I using my code in setinterval but I have 2 bug.
Bug 01: Flash file is not transparent (Opera and safari not run, IE 7,8,9, Mozilla, Chrome has running)
Bug 02: First Flash file is playing but others file does not play.
JS code:
HTML CodePHP Code:$(function () {sShow();});
var s = 0;
var sLength = $("#img div").length;
$.Sld = function (sm) {
if (s < sm - 1) {
s++;
Sl(s);
}
else {
Sl(0);
s = 0;
}
}
setInterval("$.Sld(" + sLength + ")", 2000);
function sShow() {
$("#img div").hide();
$("#img div:first").show();
$("#swf div").hide();
$("#swf div:first").show();
$("#text div").removeClass("sActive");
$("#text div:first").addClass("sActive");
$("#text div").click(function () {
Sl($(this).index());
s = $(this).index();
return false;
})
}
function Sl(i) {
$("#img div").hide(200);
$("#img div:eq(" + i + ")").toggle(200);
$("#swf div").hide(200);
$("#swf div:eq(" + i + ")").toggle(200);
$("#text div").removeClass("sActive");
$("#text div:eq(" + i + ")").addClass("sActive");
}
HTML Code:<div id="img"> <div style="display: none; "><img src="/FilePath/Slider/Images/1.JPG" width="1015px"></div> <div style="display: none; "><img src="/FilePath/Slider/Images/2.JPG" width="1015px"></div> <div style="display: none; "><img src="/FilePath/Slider/Images/3.JPG" width="1015px"></div> <div style="display: none; "><img src="/FilePath/Slider/Images/4.JPG" width="1015px"></div> <div style="display: none; "><img src="/FilePath/Slider/Images/5.JPG" width="1015px"></div> <div style="display: none; "><img src="/FilePath/Slider/Images/6.JPG" width="1015px"></div> <div style="display: none; "><img src="/FilePath/Slider/Images/7.JPG" width="1015px"></div> </div> <div id="swf"> <div><object type="application/x-shockwave-flash" data="Flash/1.swf" id="y01"><param name="wmode" value="transparent"></object></div> <div><object type="application/x-shockwave-flash" data="Flash/2.swf" id="y02"><param name="wmode" value="transparent"></object></div> <div><object type="application/x-shockwave-flash" data="Flash/3.swf" id="y03"><param name="wmode" value="transparent"></object></div> <div><object type="application/x-shockwave-flash" data="Flash/4.swf" id="y04"><param name="wmode" value="transparent"></object></div> <div><object type="application/x-shockwave-flash" data="Flash/5.swf" id="y05"><param name="wmode" value="transparent"></object></div> <div><object type="application/x-shockwave-flash" data="Flash/6.swf" id="y06"><param name="wmode" value="transparent"></object></div> <div><object type="application/x-shockwave-flash" data="Flash/7.swf" id="y07"><param name="wmode" value="transparent"></object></div> </div> <div id="text"> <div>01</div> <div>02</div> <div>03</div> <div>04</div> <div>05</div> <div>06</div> <div>07</div> </div>


Reply With Quote

Bookmarks