Attention: PROnetworks has upgraded our forum from phpbb2 to phpbb3!!

Please head over to our new converted forum at: http://www.pronetworks.org/forums/

This old forum will remain 'read-only' until approximately February 2009. We look forward to seeing you at the new forum!
Author Message
OneWayToHell
PostPosted: Sun May 16, 2004 11:22 am Reply with quote

PRO Level 7
 
 


Joined: 04 Apr 2004
Posts: 285
Location: Cork, Ireland
Hey guys, umm lol I know im bombarding you with questions lately, and I do apologize.

Its just that this page is driving me nuts, and im trying to do stuff that ive never done in my life before lol. but the client who wants the page wants all that stuff lol.
Umm how can you make it so that when you click on a link of a flash movie, it makes a pop up window come out.
Thanx in advance for all the patience and help!!! thumbsup notworthy
 
Back to top
OsirisX
PostPosted: Sun May 16, 2004 12:04 pm Reply with quote

PROfessional Member
 
 


Joined: 29 Dec 2003
Posts: 12927
Location: USA, CT
I think you can just add a hyperlink to the button, it should be under the properties of the button.
 
Back to top
OneWayToHell
PostPosted: Sun May 16, 2004 12:44 pm Reply with quote

PRO Level 7
 
 


Joined: 04 Apr 2004
Posts: 285
Location: Cork, Ireland
yeah ok, but how about the pop up, how do you creat that, like to have a specific size and stuff.
 
Back to top
adickers
PostPosted: Tue May 25, 2004 12:11 pm Reply with quote

PRO New Member
 
 


Joined: 24 May 2004
Posts: 5
Location: Philadelphia, USA
So you have this webpage, and on it you have SWF file. Inside the SWF you want to have a button or some other gizmo trigger a pop-up window, right?

No problem:
In order to accomplish this, you're going to need to have some javascript either embedded in the button in the flash movie or in the webpage itself. Let me explain:

In order to control the size, and feature of the window that you pop-up from a link on a webpage, you need to use javascript. Any regular <A> tag can launch a new window, but you won't be able to change it's size, or turn of the menu bar, location bar, or status bar - to name a few.

So here's one way:
/\/\/\/\/\/\/\/\/\/\/\
1. Create a button in flash, on a given layer
2. Give this button an instance name (let's call it btnTest for now), so we can communicate with it from ActionScript.
3. Create a new layer above the button, and add this code:

btnTest.onRelease = function() {
getURL("javascript:window.open("document.html","newWindow","width=200, height=150");
}

When you compile the SWF and try this, you will get a button that pops a new window. This window will try to load a document called "document.html", so you can change this parameter to be whatever document you wanted to load into this new popped window. The "newWindow" parameter is the name of this new window, so you can refer back to it, in another script if necessary. The last set of settings instruct this new window to be 200 pixels wide and 150 pixels tall.

You can look on the net for a more complete javascript reference on the other options you can set for the window.open call.

the other option you have:
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
if you're feeling wild, you can alter the button code in flash and use a function javascript to do the work as well:

so you flash code would look like this:

btnTest.onRelease = function() {
getURL("javascript:MyCoolWindowFunction()");
}

and on the webpage you'll need a script block with the following"

<script language='javascript'>
function MyCoolWindowFunction() {
window.open("document.html","newWindow","width=200, height=150");

}
</script>

So what are the differences? Same functionality in both methods. You may find that one will serve you differently depending upon what you need to do....

keep Flashing...........
 
Back to top
Back to top
Index >> Graphics Studio >> Flash Popup window?

Page 1 of 1

 


Tired of the Ads? Registered users have 80% less adverts.