isabelstripes
02-01-2003, 09:14 PM
I am using Flash MX.
I have a getURL function in my flash movie(movie1.swf) which calls on Javascript to open a popup window with another flash movie(movie2.swf) in it...the pop window works great but now I need to pass a variable as well.
The global variable(samples) is declared in movie1.swf (which is on level 2 if that matters) and the button is pressed a value is assigned to it.
Ideally, _I want the variable be passed to the the next movie(movie2.swf) and then go the appropriate frame and start playing based on that variable. (frames labels in movie2.swf are the same as the assigned values). _I do not know how to do this through Javascript. _I am very new to Flash and am extremely limited with Javscript so this has been very painful for me. __I would appreciate any help anyone can give me.
Below I have put my action script and javascript
Thank you
on (release) {
samples = "sample 1";
getURL("javascript:openNewWindow('movie2.swf','portfolio', 'height=400,width=400,toolbar=no,scrollbars=no')");
}
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures){
newWindow=window.open(URLtoOpen, windowName, windowFeatures);}
</script>
I have a getURL function in my flash movie(movie1.swf) which calls on Javascript to open a popup window with another flash movie(movie2.swf) in it...the pop window works great but now I need to pass a variable as well.
The global variable(samples) is declared in movie1.swf (which is on level 2 if that matters) and the button is pressed a value is assigned to it.
Ideally, _I want the variable be passed to the the next movie(movie2.swf) and then go the appropriate frame and start playing based on that variable. (frames labels in movie2.swf are the same as the assigned values). _I do not know how to do this through Javascript. _I am very new to Flash and am extremely limited with Javscript so this has been very painful for me. __I would appreciate any help anyone can give me.
Below I have put my action script and javascript
Thank you
on (release) {
samples = "sample 1";
getURL("javascript:openNewWindow('movie2.swf','portfolio', 'height=400,width=400,toolbar=no,scrollbars=no')");
}
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures){
newWindow=window.open(URLtoOpen, windowName, windowFeatures);}
</script>