Add these settings by default: ode = _SCALE; = _LEFT;. And this for your fullscreen action: stage. I’m currently creating a Mac/PC projector in AS3 and most of code has converted just fine. Except for this: fscommand(“fullscreen”, “true”);. Miscellaneous fscommand(command:String,argument:String) commands different modes explained: AS2 scaleMode property and AS3 scaleMode property.
|Published (Last):||1 December 2010|
|PDF File Size:||1.87 Mb|
|ePub File Size:||15.88 Mb|
|Price:||Free* [*Free Regsitration Required]|
The fscommand function lets a SWF file communicate with a script in a web page.
– Details Adobe ActionScript® 3 (AS3) API Reference
However, script access is controlled by the web page’s allowScriptAccess setting. The fscommand function is not allowed if the calling SWF file is in the local-with-file-system or local-with-network sandbox and the containing HTML page is in an untrusted sandbox. Fscommad use fscommand to send a message to Flash Player, you must use predefined commands and parameters.
The following table shows the values that you can specify for the fscommand function’s command and args parameters. A projector is a SWF file saved in a format that can run as a stand-alone application—that is, without Flash Player. Not all of the commands listed in the table are available in all applications: None of the commands are available in web players. All of the commands are available fsfommand stand-alone projector applications.
AIR applications should use the flash. NativeApplication class for similar functions, such fscommnd NativeApplication.
fscommand ‘fullscreen’ not working in ASreplacement?
Only allowscale and exec are available in test-movie players. The exec command can contain only the characters A-Z, a-z,period. The exec command runs in the subdirectory fscommand only.
In other words, if you use the exec command to call an application, the application must reside in a subdirectory named fscommand. The exec command works only from within a Flash projector file.
In the web page that contains the SWF file, set the allowScriptAccess attribute to allow or deny the SWF file’s ability to access the web page, as described above. In Flash Player 10 and later running in a browser, using this method programmatically to open a pop-up window may not be successful.
Various browsers and browser configurations may block pop-up windows at any time; it is not possible to guarantee any pop-up window will appear. However, for the best chance of success, use this method to open a pop-up window only in code that executes as a direct result of a user action for example, in an event handler for a mouse click or key-press event. The fscommand function can send messages to Director Macromedia Director from Adobe.
These messages are interpreted by Lingo the Director scripting language as strings, events, or executable Lingo code. If a message is a string or an event, you must write the Lingo code to receive the message from the fscommand function and carry out an action in Director.
For more information, see the Director Support Center at www. For more information, use the keywords “Flash method” to search the Flash Support Center at www.
You should fscom,and to use fscommand for sending messages to Flash Player Usage 1 and Director Usage 3. String — A string passed to the host application for any use, or a command passed to Flash Player.
ActionScript to C++
Retrieving Data from Server When allowScriptAccess is set to “sameDomain” the defaultscripting is allowed only from SWF files that are in the same domain as the web page. Note that using this value is deprecated and not recommended, and shouldn’t be necessary if you don’t serve untrusted SWF files from your own domain.
If you do need to serve untrusted SWF files, Adobe recommends that you create a distinct subdomain and place all untrusted content there. Command Parameter args Purpose quit None Closes the projector.
Specifying false returns the player to normal menu fecommand. Specifying false hides all of the context menu items except About Flash Player and Settings.
Throws Error — If the function is not called in response to a user action, such as a mouse event or keypress event. Related API Elements flash. The following example shows how fscommand can be used to direct Flash Player to go into full screen mode and not allow scaling.
An orange box is then added to the stage using draw. In drawa click event listener is added named clickHandlerwhich responds to click events by directing Flash Player to exit using another call to fscommand. Specifying true sets Flash Player to full-screen mode. Specifying false sets the player so that the SWF file is always drawn at its original size and never scaled.
Specifying true enables the full set of context menu items. Error — If the function is not called in response to a user action, such as a mouse event or keypress event.