| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Aug 2004
Posts: 2
|
I need to get two separate flash movies in two separate windows to communicate, this is the set up:
A movie in the main window calls a pop up win which contains a quiz swf, I need a button on this quiz which will cause this window to minimise without refreshing etc. I then need a button in the other swf in the main window to maximise this pop up swf without reloading or refreshing it so that a partially filled out quiz can be revisited as required. Basically I need to recreate the effect of Alt + tab between the two windows with flash buttons.... whats the action script I need on the buttons? thanx for any sugestions??? i. ![]() |
|
|
|
|
|
#2 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
focus() is one way to do this:
popupWindowName.focus(); this will give focus to the popup window then on the popup window you would have : opener.focus(); (opener is a keyword representing the window the opened the popup).
__________________
tg --- what the hell was i thinking? |
|
|
|
|
|
|
|
|
#3 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
here is some code:
Code:
<script type="text/javascript">
var pops;
function popit(){// this opens the popup.
var params="width=200, height=200, toolbar=no, statusbar=no, resizable=no";
pops=window.open('mypop.html','pops',params);
}
function switchWithPops(){
pops.focus();// this actually gives focus to the popup - called from flash
}
</script>
this would be the code inside your 'main' flash file: Code:
btn.onRelease=function(){
getURL("javascript: pops.focus();");
};
delay=function(){
getURL("javascript: popit();");
clearInterval(inter);// turn off the delay.
}
//built in delay: delay popup for 1 second.
var inter=setInterval(delay,1000);
Code:
btn.onRelease=function(){
getURL("javascript: opener.focus()");
};
__________________
tg --- what the hell was i thinking? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|