all groups > flash actionscript > january 2005 >
You're in the

flash actionscript

group:

is this IE?


is this IE? adriaan_
1/16/2005 10:42:39 PM
flash actionscript: i installed SP2 on my MS Windows...and don't know if this is the problem or
that I am plain stupid...i hope none of them both...

i have this loop within my .swf, that reads out some images frome a folder.
it's really simple and works great in FireFox, but IE only get's the last
image, and doesn't open, for example, the four pop-ups that has to be
generated.

somebody knows if this is the pop-up blocker in IE or something else? very
strange, because this used to work...if i am not completly stupid....

here's the function:

function imagePopUp(dir, pic, imgCount){
if(pic == "image"){

getURL("javascript:window.open('content/image/image.html','_blank','toolbar=no
,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,widt
h=282,height=440,left=0,top=0'), _blank");
}
if(pic == "nokia"){

getURL("javascript:window.open('content/nokia/nokia.html','_blank','toolbar=no
,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,widt
h=370,height=348,left=0,top=0'), _blank");
}
else{
for(i=1; i<imgCount+1; i++){
trace(count)
getImage = new Array();
getImage = "content/"+dir+"/"+pic+"/"+pic+"_"+i+".jpg";
getURL("javascript:PopupPic('"+getImage+"')");
}
}
}


you can check the example site over here:

http://www.kazeze.nl/new/recoverdSite.html

test the problem mentioned above, by clicking > graphic design > safe romance
in Firefox it opens 4 popups and in IE only the 4th and not all four.....why
is that?

Re: is this IE? adriaan_
1/16/2005 11:02:33 PM
i installed SP2 on my MS Windows...and don't know if this is the problem or
that I am plain stupid...i hope none of them both...

i have this loop within my .swf, that reads out some images frome a folder.
it's really simple and works great in FireFox, but IE only get's the last
image, and doesn't open, for example, the four pop-ups that has to be
generated.

somebody knows if this is the pop-up blocker in IE or something else? very
strange, because this used to work...if i am not completly stupid....

here's the function:

function imagePopUp(dir, pic, imgCount){
if(pic == "image"){

getURL("javascript:window.open('content/image/image.html','_blank','toolbar=no
,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,widt
h=282,height=440,left=0,top=0'), _blank");
}
if(pic == "nokia"){

getURL("javascript:window.open('content/nokia/nokia.html','_blank','toolbar=no
,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,widt
h=370,height=348,left=0,top=0'), _blank");
}
else{
for(i=1; i<imgCount+1; i++){
getImage = "content/"+dir+"/"+pic+"/"+pic+"_"+i+".jpg";
getURL("javascript:PopupPic('"+getImage+"')");
}
}
}

you can check the example site over here:

http://www.kazeze.nl/new/recoverdSite.html

test the problem mentioned above, by clicking > graphic design > safe
romance<BR>in Firefox it opens 4 popups and in IE only the 4th and not all
four.....why is that?

thanx
Re: is this IE? Jeckyl
1/17/2005 12:15:39 PM
instead of directly executing the javascripts separately, combin the strings
into one and execute just a single javascript. If is likely that hte
browser is not able to finish processing one javascript: url before you
throw another one at it, and so it gives up on first and does seconds
instead etc.

eg (I changed the if's into a switch .. it is easier to read that way)

function imagePopUp(dir, pic, imgCount) {
var js = "";
switch (pic) {
case "image":
js +=
"window.open('content/image/image.html','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=282,height=440,left=0,top=0);";
break;
case "nokia":
js +=
"window.open('content/nokia/nokia.html','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=370,height=348,left=0,top=0);"
break;
default:
for (var i = 1; i < imgCount+1; i++) {
var getImage = "content/"+dir+"/"+pic+"/"+pic+"_"+i+".jpg";
js += "PopupPic('"+getImage+"');";
}
}
getURL("javascript:"+js);
}

--
All the best,
Jeckyl

AddThis Social Bookmark Button