# Please Help! Flash POPUP Problem!

**URL:** https://forum.kirupa.com/t/please-help-flash-popup-problem/27552
**Category:** flash
**Created:** [August 4, 2003, 1:43am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552 "2003-08-04T01:43:25Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)
#### Post date: [August 4, 2003, 1:43am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/1 "2003-08-04T01:43:25Z")

</div>

:-\ I seriously need help. I didnt know where else to come to.

Well, what i’m doing is i’m making a Flash site. Now, I have already-made-movies, so i wanna bring em onto this site. But the problem is, I cant copy and paste everysingle keyframe of the made movies onto this site, it’ll take too long, and take up super space slowing my site down.

So I was thinking, making buttons in flash that make a popup window containing that movie.

Okay, I already know how to do that, the popup containing the movie works perfectly because I installed a extension from Macromedia.

The thing is, how do I make it so that when the button is clicked, it doesnt show the java script on the address bar (also known as location)??? Whats the actionscript?

In conclusion : I dont want the java script to appear on the address bar after the button is clicked.

🙂 Billions of Thanks for Anyone who knows how…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 1:52am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/2 "2003-08-04T01:52:32Z")

</div>

Heres a example I made. First click the open on the top of the page, and then click the launch button and quickly look at the address bar (http:// thingy)…I dont want that java to appear. I know its possible to do because I know another site who did it, just cant get contact wit the owner…ask me if you wanna see that site…but for now heres the example :

> **[Yahoo Small Business - Cheap Domains, Web Hosting, Website Builder, Ecommerce...](https://smallbusiness.yahoo.com/)**
>
> Yahoo Small Business Offers Cheap Domain Names, Web Hosting, Easy Website Builder, Business Email, Local Listings, and Ecommerce Solutions for Your Small Business.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 2:43am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/3 "2003-08-04T02:43:09Z")

</div>

Ok, i’ll make it easier for you. I’ll make a button, gimme the code for the popup, i’ll put it in the actionscript panel, also gimme the code for the “no java on address bar”…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 2:50am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/4 "2003-08-04T02:50:39Z")

</div>

No,no,no…  
If you have swf files already made and a main swf file to load those swf files, put an emptyMovieClip on your stage where you want the top left hand corner of your external swf files and then load them into that container movieClip.

```auto

on(release){
_root.container.loadMovie("othermovie.swf");
}

```

Here’s a tutorial on how to do it. Don’t use the java thing for that, it’s an overkill…  
[http://www.kirupa.com/developer/mx/full\_site.htm](http://www.kirupa.com/developer/mx/full_site.htm)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 3:55pm UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/5 "2003-08-04T15:55:18Z")

</div>

I dont want the load movie, i already knew how to do that, i’m talking about like some comics i made, i wanna show people comics!!! I want a pop up, there has to be a way!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 5:01pm UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/6 "2003-08-04T17:01:27Z")

</div>

Sure, there’s a way; there’s actually a couple. I figured loading in your movies would be easier because you could make your own custom looking window if you wanted to, but, if not, that’s okay! (-:

Check out this tut:  
[http://www.kirupa.com/developer/mx/centered\_popup.htm](http://www.kirupa.com/developer/mx/centered_popup.htm)

You could also just say:

```auto

getURL("javascript|:window.open('url','winName','options');");

//take out the '|', that's there to prevent popup posts here

```

That doesn’t display the javascript anywhere either, I use that on one of my client’s sites.

Seeing that your splash page is written in HTML, if you wanted to keep it that way I suggest using this:  
[http://www.dynamicdrive.com/dynamicindex8/popwin.htm](http://www.dynamicdrive.com/dynamicindex8/popwin.htm)

Hope _that_ helps!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 5:16pm UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/7 "2003-08-04T17:16:18Z")

</div>

Ok, i’ve tried that thing, and it doesnt even work, while the java still shows. Anyways, let me tell you exactly what i want. Then you can make the script for me and I dont have to wonder what the hell i’m doing.

The file I want to popup : "Drawing.swf"  
Width: 350  
Height: 285  
Locations/Directories/And all that crap: No  
Show Jave Anywhere? : No

\*\*\*\*…is it that hard? I’m getting so frustrated right now, if someone can do this for me, they can make my day and i’ll have the knowledge of the main function of my site - Popup Windows Holding Movies…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 7:56pm UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/8 "2003-08-04T19:56:25Z")

</div>

Come on…some one has to know it…

[http://www.mindistortion.neoburn.net/home.htm](http://www.mindistortion.neoburn.net/home.htm)

Go there, press movies, click on a movie, press launch, thats exactly the effect I want!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 4, 2003, 9:16pm UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/9 "2003-08-04T21:16:10Z")

</div>

Sharif, this site is about learning, not giving an order for someone else to do it.  
I went to [mindistortion.neoburn.net](http://mindistortion.neoburn.net) and found that they are using exactly what was in the  
tutorial at Kirupa that I pointed you to.

That tutorial pulls up an HTML file, I know.  
You put your SWF into an HTML using  
File\>Publish Settings and cliking HTML - Flash makes the file for you.  
But, I’m an easygoing guy, I’ll cut and paste the code for you…and change it:

This goes on your button:

```auto

on (release) {
	//customize the window that gets opened
	// 0 equals NO.
	// 1 equals YES.
	address = "Drawing.html";
	target_winName = "SharifDrawing";
	width = 350;
	height = 285;
	toolbar = 0;
	location = 0;
	directories = 0;
	status = 0;
	menubar = 0;
	scrollbars = 0;
	resizable = 0;
	//sends data back to the function
	openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}

```

then put this on your timeline:

```auto

Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) { 
	getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",top='+((screen.height/2)-(" + h/2 + "))+',left='+((screen.width/2)-(" + w/2 + "))+'" + "')}else{myWin.focus();};void(0);");
}

```

Now you need to put your SWF into an HTML file called ‘Drawing.html’. Again, Flash will do this for you.  
If you really just want to pull up the SWF file, change ‘Drawing.html’ to ‘Drawing.swf’.  
You will have the entire path to that swf file in the title bar

- the only way around that is to use and HTML file an the \<\*\*title\> tags.

I AM trying to help you, not piss you off.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 12:20am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/10 "2003-08-05T00:20:36Z")

</div>

You’re right that I should learn instead of asking for the actionscript…I’m just frustrated right now 'cause nothing I try is working.

Ok…still, i’ve tried to use the html and the swf, java still shows. I wanna see you make one like what I’m saying. Make one in geocities.

How do I give you the .fla of the thing I want to pop up?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 1:23am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/11 "2003-08-05T01:23:19Z")

</div>

I dont know, it works for all the other sites…maybe its cause I have a free site and not a paid one…Ⓜ

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 2:18am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/12 "2003-08-05T02:18:08Z")

</div>

Well sharif i think you just need to calm down & take some deep breaths, everything will end up working ok if you just relax.

Freddy has been very patient & generous, & given you the code to make it all work, and posted the link with all the tutorial info for you to follow.

I’ll now use Freddys code & give you a demonstration, and the .fla for you to play with.

Check the demo out here: [DEMO](http://www.fragfest.com.au/firewight/popup/popup.html)

I think you’ll find it works exactly the way you want.

Download the .fla, .swf & .html files here: [FILES](http://www.fragfest.com.au/firewight/popup/popup.zip)

Hopefully you should be able to examine those simple files and see how to use Freddys & Kirupas code in your own work. Best of luck.

Cheers!

FW

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 5:32am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/13 "2003-08-05T05:32:52Z")

</div>

This is huge for you, and something I have never tried. This script will only work when it’s online. Why? I’m not sure. I tried FIREWIGHT’s script, plus the one on the tutorial. If you Ctrl+enter your movie to test it - it will NOT work. If you put the same stuff online - it will.

This could be your problem.

I noticed that blank spaces were filled with %20 (url encode for a blank space) in the address bar. I played with it for a while and got the popup to popup, but with ‘errors on page’.

Believe me, I’m not giving you false info. There are mods here that would correct me if I’m wrong. They have before, and they will again…(sorry mods!!)

BTW - my platform is Windows 2000; don’t know if that’s my problem - a lot of people would say it is 😛

One more thing: Thank you to FIREWIGHT for making the example files. I tested it and it works perfectly (like the DEMO shows). Kudos to FIREWIGHT!!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 6:20am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/14 "2003-08-05T06:20:34Z")

</div>

hey freddy, what does ‘|’ do in flash? i read the help files, but they’re not too helpful :-\ I was gonna make a new thread but while you were at it, just thought of askin it here 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 9:17am UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/15 "2003-08-05T09:17:09Z")

</div>

Hey no worries, it’s great to give something back, even if it was only a small thing.

:thumb:

FW

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 1:50pm UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/16 "2003-08-05T13:50:16Z")

</div>

blah-de-blah (I love that name!!)

I was using it in that link above because this board has a PHP filter that sucks out the work ‘javascript’ if you try to post that word with window.open(). I think it’s to protect this board from a poster making an automatic popup on the threads. Sorry if I caused confusion.

Here’s a tech answer so I cover my bases - just in case 😛  
’||’ in flash is a bitwise ‘or’ operator. I don’t know if just one ‘|’ does anything. If it does, it’s in the little actionscript reference on Flash MX under Operators\>Bitwise Operators.

BTW - while I’m posting - a couple posts ago I couldn’t figure out why that popup script doesn’t work when you hit CTRL+ENTER - I think I figured it out this morning. When you hit CTRL+ENTER, Flash calls up your Flash Player Plugin - not an browser window. Therefore, that javascript has no original window to go to. Your computer will automatically open a new window and plug in the javascript. I think that’s why it doesn’t work from CTRL+ENTER. I think it still would from IE though. (-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 2:59pm UTC](https://forum.kirupa.com/t/please-help-flash-popup-problem/27552/17 "2003-08-05T14:59:12Z")

</div>

OMG! It works perfectly now. I totally forgot about publishing in html. Thank you guys so much. Freddy, sorry for being a pain, its just that without this popup, my site would mean nothing. Thank you soooooooooooooo much. A billion thanks to Firewhight, and A trillion thanks to FreddyThunder. YEA! I’m so happy! Haha! :azn: :azn: :azn:

You’ve made my day!
