/    Sign up×
Community /Pin to ProfileBookmark

expandable banner flash on mouseover

Hi, i`ve a problem look,—>
this script expand a banner onmouseover but only works on Ie;
in firefox it put`
s undefined;
could anyone help me?

[code=php]
<SCRIPT language=javascript>
if (navigator.appVersion.indexOf(“Win”)>=0 && parseFloat(navigator.appVersion.substr(navigator.appVersion.indexOf(“MSIE “)+5))>=5)
{
var adMousedOver_0 = 0;
var move_pixel_0 = 5;
var move_interval_0 = 10;
var expanded_height_0 = 560;
var roll_down_0;
var roll_up_0;
var clipped_0 = 60;
var oImg_0;
var altText;
var clickThrough;
var imgPath;

altText = “whatever”;
clickThrough = “http://www.dyxney.com”;
imgPath = “image.jpg”;
//imgPath = “space.gif”;
function adDoDrop_0(obj){
adtechhideElement_0();
oImg_0 = obj;
if(roll_up_0!=null){window.clearInterval(roll_up_0);}
roll_down_0 = window.setInterval(“adRollDown_0()”, move_interval_0);
}
function adRollDown_0(){
clipped_0 += move_pixel_0;
if(clipped_0 < expanded_height_0){
oImg_0.style.clip=’rect(auto, auto, ‘ + clipped_0 + ‘, auto)’;
}else{
oImg_0.style.clip=’rect(auto)’;
window.clearInterval(roll_down_0);
clipped_0 = expanded_height_0;
}
}
function adUnDoDrop_0(obj) {
adtechshowElement_0();
oImg_0 = obj;
if(roll_down_0!=null){window.clearInterval(roll_down_0);}
roll_up_0 = window.setInterval(“adRollUp_0()”, move_interval_0);
}
function adRollUp_0(){
if (clipped_0 > move_pixel_0){
clipped_0 -= move_pixel_0;
}
if(clipped_0 > 60){
oImg_0.style.clip=’rect(auto, auto, ‘ + clipped_0 + ‘, auto)’;
}else{
oImg_0.style.clip=’rect(auto, auto, 60, auto)’;
window.clearInterval(roll_up_0);
clipped_0 = 60;
}
}
document.write(‘<div id=”1″ style=”height:60; width:464;”><table border=”0″ bgcolor=”#FFFFFF” cellpadding=”0″ cellspacing=”0″ style=”position:absolute; clip:rect(auto, auto, 60, auto);z-index:200;” onmouseover=”adDoDrop_0(this);” onmouseout=”adUnDoDrop_0(this);”><tr><td><a target=”_blank” href=”‘ + clickThrough + ‘”>’);

//<–//object
document.write(‘<div id=”2″ style=”height:100%; width:100%;”‘);
document.write(“<object classid=’clsid:D27CDB6E-AE6D-11cf-96B8-444553540000′”);
document.write(” id=’flashhome’ width=’597′ height=’215′ align=” title=’has flash’>”);
document.write(“<param name=’movie’ value=’banner.swf’><param name=’play’ value=’true’>”);
document.write(“<param name=’loop’ value=’false’><param name=’quality’ value=’high’>”);
document.write(“<param name=’menu’ value=’true’><param name=’bgcolor’ value=’#333333′>”);
document.write(“<embed src=’banner.swf’ play=’true’ loop=’false’ quality=’high’ menu=’true’ bgcolor=’#333333′”);
document.write(” swLiveConnect=’false’ width=’597′ height=’215′ name=’flashhome’ align=””);
document.write(” type=’application/x-shockwave-flash’>”);
document.write(“</embed></object>”);
//document.write( ‘<img border=”0″ width=”468″ src=”‘ + imgPath + ‘” alt=”‘ + altText+’height=”1″ width=”1″>’);
//object–>
document.write(‘<onmouseover=”document.cktrackingimg_0.src=’http://'” /></a></td></tr></table></div>’);

}else{
document.write(‘<a target=”_blank” href=”‘ + clickThrough + ‘”><img border=”0″ src=”‘ + imgPath + ‘” width=”468″ height=”60″ alt=”‘ + altText + ‘”></a>’);
}
document.close();
function adtechhideElement_0() {
for (i = 0; i < document.all.tags(‘SELECT’).length; i++){obj = document.all.tags(‘SELECT’)[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = “hidden”;}
for (i = 0; i < document.all.tags(‘OBJECT’).length; i++){obj = document.all.tags(‘OBJECT’)[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = “hidden”;}
for (i = 0; i < document.all.tags(‘APPLET’).length; i++){obj = document.all.tags(‘APPLET’)[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = “hidden”;}
}
function adtechshowElement_0() {
for (i = 0; i < document.all.tags(‘SELECT’).length; i++){obj = document.all.tags(‘SELECT’)[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = “”;}
for (i = 0; i < document.all.tags(‘OBJECT’).length; i++){obj = document.all.tags(‘OBJECT’)[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = “”;}
for (i = 0; i < document.all.tags(‘APPLET’).length; i++){obj = document.all.tags(‘APPLET’)[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = “”;}
}
</SCRIPT>
[/code]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @insanomaniac spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...