Made to Order Software Corporation Logo

FSCommand2

SWF Action
Action Category: 
Miscellaneous
Action Details: 
0
Action Identifier: 
45
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (i), pop i1 (s)
Action Operation: 
i1 := pop();
for(idx := 2; idx < i1 + 2; ++i1) {
  sidx := pop();
}
fscommand2(s2, s3, ..., s(i1 + 1));
Action Flash Version: 
8

Execute the external command (s2) passing on parameters (s3, s4 ... sn.) The external command is likely a JavaScript function.

IMPORTANT NOTES

Ammar Mardawi sent a correction for this action and it looks like it works the way it is described now.

As of version 9, this action is not defined in the official Flash documents. It also does not seem to be functional in a movie. In order to run an FSCommand, use the Get URL2 with a URL that starts with "FSCommand:". For example, in an SSWF script:

action {
   push "FSCommand:hidemenu";
   push "_self";
};
action "url";

This Flash code will call the JavaScript function named:

    <flash script name>_DoFSCommand(command, args);

Where the <flash script name> is the name you give your embed tag (name="my_movie" means my_movie_DoFSCommand() is called.)

For instance, you could generate an alert with the following code:

<script type="text/javascript">
  function my_movie_DoFSCommand(command, args)
  {
     alert(command + " was posted!");
  }
</script>
<embed src="movie_no1.swf" name="my_movie" ... ></embed>

Note that the filename does not need to match the name.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.