Please Help! Flash POPUP Problem!

:-\ 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.

:slight_smile: Billions of Thanks for Anyone who knows how…

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 :

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”…

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.


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

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!

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

You could also just say:


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

Hope that helps!!

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…

Come on…some one has to know it…

http://www.mindistortion.neoburn.net/home.htm

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

Sharif, this site is about learning, not giving an order for someone else to do it.
I went to 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:


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:


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.

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?

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

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

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

Download the .fla, .swf & .html files here: FILES

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

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 :stuck_out_tongue:

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!!!

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 :slight_smile:

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

:thumb:

FW

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 :stuck_out_tongue:
’||’ 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. (-:

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!