Skip to main content
Known Participant
May 5, 2011
Question

Creating Pop up Window from Flash with Actionscript 3

  • May 5, 2011
  • 2 replies
  • 19491 views

Hello!

Im still new at this but would appreciate some help with this.

I have created a Flash banner with Actionscript 3.

Within the banner I would like to make an animated button that when clicked will open

another swf file within a pop up window with specified dimensions.

I have found java codes that work with Actionscript 2,

and also with Flash player 5 and lower.

But my banner uses effects that require me to export the clip no lower than Flash player 10.

Can I still create a pop up window with specific dimensions?

Thank you very much in advance for your help!!!

Kindest regards,

Coz

This topic has been closed for replies.

2 replies

aneelbakshi
Inspiring
May 5, 2011

Flash code

m1.addEventListener("click", openNew);
function openNew(e:Event) {
    ExternalInterface.call("openWin");
}

Javascript code

<script language="javascript">

function openWin(){
     window.open('popup.htm','Popup','width=1004,height=657,scrollbars=no,resizable=no,status=no');
}

</script>

Just copy and paste this

relaxatraja
Inspiring
May 5, 2011

If you'r going to show another swf within your swf, then just create a new movieclip and load the swf inside that and keep the depth to the highest level to show the popup.

bkrascalAuthor
Known Participant
May 5, 2011

First, thank you for your help!

Actually, the plan is..

The header is an SWF.. within this clip I made a button..

When clicking on this button, a separate window must open with containing an swf file that is much bigger than the header.

For this separate swf file, I have already embedded it within an HTML page. But I want this HTML page to open with the dimensions

900 x 800 exactly.

I hope I explained this well enough.. Any ideas?

aneelbakshi
Inspiring
May 5, 2011

In as2 or as3 you can use ExternalInterface.call() function to call javascript function of your html wrapper  and in that javascript function you can write code for opening your externl html popup window using window.open