Flex solves the problem of not being able to access or restrict access to local files during debugging.

The security restrictions of flash and Flex are a headache for programmers, especially when accessing local and remote resources. Often, separate settings are required, which can cause a lot of trouble during debugging. The method to fix the problem of not being able to access or restrict access to local files during debugging is simple. Just add the following to the flash/Flex compilation options: -use-network=false. Here's how to add it:
Project -> properties -> flex compiler ->
Add compilation command parameter:
Of course, this command means that the compiled swf file cannot access the network and can only be used locally.

For flash, there are not many restrictions during debugging. Local files can be used, but if you need to access the network, you need to set it in the flash player.

However, when generating SWF files in flash, there is an option for the runtime environment, which allows you to choose whether it can only access remote files or only access local files. Setting it to local allows you to access local files, while the network option works the opposite way.

Finally, here is a list of compiler parameters for Flex (cnblogs: 宋欢的博客):

  1. , -keep-generated-actionscript=true: Generates AS code during compilation and puts it in src/generated.

  2. , contributor name: Adds the contributor's name to the swf file.

  3. , creator name: Adds the author's name to the swf file.

  4. , date text: Adds the content of the data to the swf file.

  5. , default-background-color int: Sets the default background color. Default is null. Example: -default-background-color=0xCCCCFF.

  6. , default-frame-rate int: Sets the frame rate. Default is 24.

  7. , description text: Adds the description content to the swf file.

  8. , dump-config filename: Outputs the configuration content to the file specified by filename. Example: mxmlc -dump-config myapp-config.xml.

  9. , show-binding-warnings=true|false: Displays warnings when flash player cannot detect them. Default is true.

  10. , runtime-shared-libraries url [...]: Specifies a series of runtime shared libraries. If library.swf is in the web_root/libraries directory, you can use libraries/library.swf to call it.

  11. , optimize=true|false: Optimizes AS to reduce file size and increase performance. Default is false.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.