Welcome Guest [Log In] [Register]
Welcome to Brackenwood. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Java Script
Topic Started: Nov 13 2004, 09:53 PM (204 Views)
ASH 321
Member Avatar
Animator
How do I add Java Script to my flash doc?
Offline Profile Quote Post Goto Top
 
ASH 321
Member Avatar
Animator
Well if no-one know how to do this, then does anyone know how to make a button open a pop-up window?
Offline Profile Quote Post Goto Top
 
alexsmolik
Member Avatar
The Prince of Troy
ASH 321
Nov 14 2004, 02:56 AM
Well if no-one know how to do this, then does anyone know how to make a button open a pop-up window?

Now THAT, I know.
Actually depends what you mean by "pop-up" window. If by that you mean an Internet Explorer (or Mozilla, Firefox, Netscape whatever) window, I guess I could help.

So you've got a button, and to this button, you add this action :
This will open the link in a new window, a pop-up if you will.

Code:
 
on (release) {
getURL("http://www.yourURL", "_blank");
}
Offline Profile Quote Post Goto Top
 
ASH 321
Member Avatar
Animator
I mean pop-up where I can set the size e.g. 550 x 400.

Just I know HOW to do it with JS but I dunno how to add it :yfok:
Offline Profile Quote Post Goto Top
 
BonzaiRob
Member Avatar
The Demon Plasterer
Isn't it something like:


Code:
 

on (release) {
getUrl("javascript:openWin" "_top")
}


And then you have the code in the page the swf's in.
Offline Profile Quote Post Goto Top
 
ASH 321
Member Avatar
Animator
Yes, BUT there is more than 1 I want on a page....
Offline Profile Quote Post Goto Top
 
FhqwhgadsE2TL
Member Avatar
Flash Anim8r
:ahem: I was recently trying to do this myself and it wasn't working. I found out it was because my WIN XP was recently upgraded to SP2. Now it has that pop-up blocker crap. Well, the pop-up blocker is useful, but I even had it turned off.. and the javascript in flash still wasn't working.

Basically, if you set up a button these are all of the options for a pop-up window:

Code:
 

on (release) {
    getURL("javascript:window.open('http://www.google.com','Title',
    'fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,
    directories=no,location=no,width=640,height=480,left=100,top=100');");
}


But.. most people will probably have popups blocked.. although you can set it to allow popups at specific sites. Read more here:

http://www.quasimondo.com/archives/000379.php
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Web Development · Next Topic »
Add Reply