[ActionScript 3.0] Security sandbox type Sandboxtype, judging whether the current program is air or Web program

Source: Internet
Author: User

Represents the type of security sandbox in which the called file is running.

Security.sandboxTypehas one of the following values:

    • remote( Security.REMOTE ): This file is from the Internet URL and runs under a domain-based sandbox rule.
    • localWithFile( Security.LOCAL_WITH_FILE ): This file is a local file that has not been trusted by the user and is not a SWF file that is published using the network name. This file can read data from a local data source, but it cannot communicate with the Internet.
    • localWithNetwork( Security.LOCAL_WITH_NETWORK ): This SWF file is a local file that has not been trusted by the user and has been published using the network name. This SWF file can communicate with the Internet, but it cannot read data from a local data source.
    • localTrusted( Security.LOCAL_TRUSTED ): This file is a local file, and the user has set it to a trusted file using the Flash Player Settings Manager or the Flashplayertrust configuration file. This file can either read data from a local data source or communicate with the Internet.
    • application( Security.APPLICATION ): This file runs in an air application and is installed with the application's package (AIR file). By default, files in the Air application sandbox can access any file in any domain across scripts (although files outside the air application sandbox are not allowed to access air files across scripts). By default, files in the AIR application sandbox can load content and data from any domain.

Usage:

if "Application" ) {  //air program }

[ActionScript 3.0] Security sandbox type Sandboxtype, judging whether the current program is air or Web program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.