|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to make a popup window in flash
Hello,
Could some one give some hint about adding an action to a button then popup a new window in flash. The new window is an asp file. Many thanks in advance! |
|
#2
|
|||
|
|||
|
at its most basic:
Code:
getURL("javascript:window.open('popup.asp','','width=200,height=200');void(0);");
but to be more flaxible create a javascript function in your html page with all the code and call it from flash like: Code:
//in flash
url = "somepage.asp";
getURL("javascript:myFunction('"+url+"');void(0);");
//in html
//maybe pass the width & height etc etc as well....
function myFunction(url) {
window.open(url,'','width=200,height=200');
}
|
|
#3
|
|||
|
|||
|
Thanks for your reply
Hello,
Thanks very much for your suggestion, and it works for the first time when I add a link to it. But then after I changed the link to some other page, it isn't refreshed in IE when I open it there. Do u have any experience about this? Another thing is I have pictures in the .asp file, how to pass that back the flash file when I make a choice. Thanks again for your time! |
|
#4
|
|||
|
|||
|
random numbers
it sounds like your asp page is caching.
try appending your url with a random number as follows: var randnum = Math.random()*1000000000; ".../mypage.php?"+randnum...blah blah |
|
#5
|
|||
|
|||
|
Thanks for your reply
Thanks for ur reply and now it works well. Then I wonder do you have any idea about how to post the variables between asp file and flash file. Bucause I have code in asp file like choosing a picture from a form and I want to pass that image back to the flash page. How could the code be? Hope you have good suggestion! Thank you again very much!
<FORM name="myform" action="designpage_colormap.asp" method="post"> <input name="color" type="radio" value="001">Red <input name="color" type="radio" value="002">blue <input name="color" type="radio" value="003">marine <input name="color" type="radio" value="004" selected>white <input name="choose" type="submit" value="choose"> </FORM> |
|
#6
|
|||
|
|||
|
popup problem - ie6 domain cloaked
I am able to have a popup window created from flash using both techniques: javascript within flash and javascripted withing the page called by flash.
The problem I'm having is that i have the domain cloaked so that the page is actually masked within frames. When the popups are activated they work fine in ie5 but not at all in ie6. Would anyone know the solution to this problem? (most fustrating) thanks dev |
|
#7
|
|||
|
|||
|
additonal question?
what if the i want the file is in flash 2? how can i make 1 flash movie pop up in another window?
Quote:
|
|
#8
|
|||
|
|||
|
Quote:
just give the url of a web page with a flash movie embedded in it |
|
#9
|
|||
|
|||
|
Quote:
If you first of all pass the variables to the page with the movie embedded in it you can then get them into flash. So if you change your form to look like Code:
<FORM name="myform" action="designpage_colormap.asp" method="post" onSubmit="return sendForm();"> and make the javascript function something like Code:
function sendForm() {
var f = document.myForm;
var url = "action.php?color="+f.color.value;
window.open(url,'','width=200,height=200');
return false;
}
then your page action.php which is opened in the popup has the variable color in the querystring. If you have php/coldfusion whatever it's then easy to pass that variable onto the movie by writing it onto the querystring of the movie url in the OBJECT and EMBED tags. (If not it's more of a pain) |
|
#10
|
|||
|
|||
|
Quote:
if your frames/popup are on different domains then this won't work, it's a security issue. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > How to make a popup window in flash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|