# Help with Flash 8 pop up windows

**URL:** https://forum.kirupa.com/t/help-with-flash-8-pop-up-windows/220848
**Category:** Uncategorized
**Created:** [March 29, 2007, 8:36pm UTC](https://forum.kirupa.com/t/help-with-flash-8-pop-up-windows/220848 "2007-03-29T20:36:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![croix](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/croix/32/3421_2.png) [@croix](https://forum.kirupa.com/u/croix)
#### Post date: [March 29, 2007, 8:36pm UTC](https://forum.kirupa.com/t/help-with-flash-8-pop-up-windows/220848/1 "2007-03-29T20:36:13Z")

</div>

OK , i have a page with 8 movie clips that show the first frame of a video.

I want each of the 8 mc’s to be a link that opens a pop up window that contains a html page with an embedded video (using youtube videos, i dont have the bandwidth to handle it myself)

I have found several tutorial for doing this via java in flash, but none seem to work for me.

In some cases, it wont work for me because there are 8 buttons, that open 8 different files.

However, i found a few tutorials that dont require java on the html page, but i get a ton of actionscript errors when i try to use these.

here are a few of the tutorials I have tried:  
[http://www.kirupa.com/developer/mx/centered\_popup.htm](http://www.kirupa.com/developer/mx/centered_popup.htm)  
[http://www.flashkit.com/tutorials/Actionscripting/Opening\_-Mohamed\_-836/index.php](http://www.flashkit.com/tutorials/Actionscripting/Opening_-Mohamed_-836/index.php)  
[http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn\_14192](http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14192)

Can anyone point me to a better method, or a tutorial that will work for what I need?

Here’s the one im currently working with  
[http://www.actionscript.org/resources/articles/22/1/Pop-Up-window-within-flash/Page1.html](http://www.actionscript.org/resources/articles/22/1/Pop-Up-window-within-flash/Page1.html)

and my code on the mc button:

```auto

on(release) {
getURL(javascript:openNewWindow('mustang.html','thewin','height=425,width=350,toolbar=no,scrollbars=no');
}

```

and my code on the targeted html page (mustang.swf):

```auto

<script language="JavaScript">
     function openNewWindow(URLtoOpen, windowName, windowFeatures) {
         newWindow=window.open(URLtoOpen, windowName, windowFeatures);
     }
</script>

```

and I even put in the

```auto

swLiveConnect=true NAME=videos.swf

```

on the embed tag for the container page, tho i read somewhere that Flash 8 doesnt need it.

Here’s the error im getting now:  
\*\ ***Error** Scene=Scene 1, layer=vid2but, frame=82:Line 2: ‘)’ or ‘,’ expected  
getURL(javascript:openNewWindow(‘mustang.html’,‘thewin’,‘height=425,width=350,toolbar=no,scrollbars=no’);

Total ActionScript Errors: 1 Reported Errors: 1\*\*

Also, if you look at the videos page ( [http://www.voiceman.com/new](http://www.voiceman.com/new) )  
the mustang mc plays twice as soon as I add that actionscript. And it doesnt behave like a button

Any ideas?
