Protect your Flash content from fraud and stealing

Home | Features | Flash Extensions | Samples | Download | Order | Support

FlashArmor Flash Extensions

Open External Files

You can open any external file of registered type using a viewer/editor, associated with the file extension on the user system. File will be opened in a popup window. You can use usual ActionScript code:

myButton.onRelease = function() {
    fscommand("exec", "mydir/myfile.pdf");

In the example above PDF file must be located in the subdirectory "mydir" of the directory, where FlashArmor Projector is located.

Load External Files into a MovieClip

You can call a special dialog in order to let user to choose a file to load into some predefined movieclip, using usual ActionScript code:

myButton.onRelease = function() {
    loadMovie("$open$Load Image$SWF Movie|*.swf|PNG Images|*.png$./", "square");

Here you can see a special string as the movie URL. Its parameters are separated by $ sign and start with $ sign. It is important to preserve this string structure. Parameters are described below:

  • "open" - is the dialog type. It may be "open" or "save", though "save" does just the same as "open" in the current version. This feature will be extended in the upcoming versions.
  • "Load Image" - is the dialog title
  • "SWF Movie|*.swf|....PNG Images|*.png" - is the dialog filter. It contains a set of file types together with masks, which let your user to change file type. At least one kind of files must be assigned here. You can assign any file type, supported by Flash, plus PNG file type, supported by FlashArmor Projector.
  • "./" - is the current directory to start from. This is a path, considered relatively to Projector's executable location. Please note that you must save all such files, only as external files. Though nothing prevents you from similar dialog creation in pure Flash/ActionScript to load files, stored inside FlashArmor Projector executable. You can do it as soon as you know what are their filemames.
  • "square" - is the name of MovieClip object where to load images to. You can use usual ActionScript syntax when you define its name, using "_root", "this", "_parent", etc. reserved words.

Popup windows

You can open a popup window from your main Flash movie using the next ActionScript code:

myButton.onRelease = function() {
    fscommand("newwindow", "popupswf.swf");

Window created will be of "popupswf.swf" movie's scene size.

Draggable windows

You can assign a draggable area in the main or popup window using the next ActionScript code:

myButton.onDragOver = function() {
    fscommand("hitarea", "caption");

Of course this will work only in non-fullscreen windows.

Openworld Learning, LLC