Skip to main content
Inspiring
August 16, 2013
Answered

Failed code to open a pop-up with AS1 <edited by mod - kglad>

  • August 16, 2013
  • 1 reply
  • 2205 views

Hi,

I have the following code:

on (release) {

h = 200;// height of the pop-up

w = 160;// width of the pop-up

getURL("javascript:NewWindow=window.open('../../grafico/sudespacho/mnprogram2.html','pop2','width=160,height=200, toolbar=No,location= No,scrollbars=No,status=No,resizable=No,fullscreen =No,top='+0+', left='+720+'"+"');void(0);");

}

, and in Safari 5.0.6 it opens fine, however in other browsers the pop-up has some blank space in the height located at the bottom. Is possible to add a javascript or AS2 to resize the window?, Please, Can you help me to solve that incidence?.

Regards.

<moved from as3 forum by mod - kglad>

This topic has been closed for replies.
Correct answer kglad

import the externalinterface class and use:

var s:String = 'window.open("http://www.adobe.com", "winName","height=220, width=500, scrollbars=no, top=90, left=222")';

ExternalInterface.call(s);

1 reply

kglad
Community Expert
Community Expert
August 16, 2013

you're posting in the wrong forum and your title implies you're using as3.

your code is as2 and yes, you can use javascript to size your popup window. by assigning the windows width and height.

Inspiring
August 16, 2013

Sorry for have posted in the wrong forum. However the error remains. Could you help me with some javascript to resize the window in different browsers?.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
August 16, 2013

import the externalinterface class and use:

var s:String = 'window.open("http://www.adobe.com", "winName","height=220, width=500, scrollbars=no, top=90, left=222")';

ExternalInterface.call(s);