You can also send variables along with the URL, using
the page you are loading from an application server, such as a ColdFusion server (CFM) page,
expects to receive form variables. For example, suppose you want to load a CFM page named
addUser.cfm that expects two form variables, first
movie clip named
variables_mc
example:
variables_mc.firstName = "Francois";
variables_mc.age = 32;
The following code then loads addUser.cfm into a blank browser window and passes
variables_mc.name
variables_mc.getURL("addUser.cfm", "_blank", "POST");
The functionality of
to get all browsers to work the same is to call a JavaScript function in the HTML code that
uses the JavaScript
window.open()
JavaScript within your HTML template:
<script language="JavaScript">
<--
function openNewWindow(myURL) {
window.open(myURL, "targetWindow");
}
// -->
</script>
You can use the following ActionScript to call
var myURL:String = "http://foo.com";
getURL("javascript:openNewWindow('" + String(myURL) + "');");
For more information, see getURL function in the ActionScript 2.0 Language Reference.
that defines those two variables, as shown in the following
and
variables_mc.age
is dependent on what browser you use. The most reliable way
getURL()
method to open a window. Add the following HTML and
or
GET
POST
and
. To do this, you can create a
Name
age
in the
header to the CFM page:
POST
from your SWF file:
openNewWindow
Controlling SWF file playback
methods. This is useful if
565
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?