1: Getting Started
2: Building Logic
5: Game Mechanics
6: Advanced Topics
7: Testing & Tuning
8: The Last 10%
M1: Mobile - Intro
M2: Mobile - Basics
M3: Mobile - Services
M4: Mobile - Publishing
B: How-To Guides
3.0 Drafts (In Progress)
Web Access and Flash Player Security
Sometimes, when creating a game, you want it to be able to access the web. When?
Whatever the reason, to test whether your game is connecting to other sites properly, you must let the Flash Player access the Internet.
Why do we need to allow the Flash Player to access the web?
Adobe added security settings that prevent Flash Player from accessing the web without its user's permission because of possible security threats. These security settings will prevent any .SWF object on the local machine from accessing the web unless each object is given permission to do so. Here is a quote from Adobe's website:
"Some websites may access information from other sites using an older system of security. This is usually harmless, but it is possible that some sites could obtain unauthorized information using the older system."
For more information about Security Settings and why it exists you can visit Adobe's website.
How do I let games created with Stencyl access the web when testing locally?
To allow games made with Stencyl to access the web when testing them locally, you need set the permissions for Game.swf in the Global Security Settings Manager on Adobe's website. Below is a screenshot of what the panel looks like as well as what the location for a Stencyl game would be.
Unless you maintain multiple copies of Stencyl for testing purposes, you will most likely have one location to specify.
The location of Game.swf is "../Stencyl/plaf/flash/Game.swf" The location of the Stencyl directory may vary depending on the OS and where it is installed. Below are some example locations that the directory could be installed in:
Note: As of Stencyl 2.0, these paths now reside inside your WORKSPACE directory. If you do not know where this is, head to Preferences > Workspace [while no game is open] and click the "View Workspace" button
A Quick Way to Set Permissions
To set the permission for Game.swf to access the Internet, first open Stencyl. Then, you want to open a game you know will want to access the web. Test the game and have it attempt to access the web. Now, you will see a security alert display, similar to the image below, informing you that the game is attempting to access the web.
To set the permissions, click on "settings." It will bring you to the Global Security Setting panel as noted above. When you are on this page, you want to click on "Edit Locations," which will display a dropdown menu. Next, click "Add Location." It will display a dialog box as shown below.
When you see this box, click on "Browse for files..." It should open a new dialog that contains the directory where Game.swf is stored. Select Game.swf and click "Open." This will add the necessary file to the permissions list. Once this is completed, any game created in Stencyl that is tested locally or in the browser will be able to access the web.
Last Updated: 2012-04-05 by Jon
5490 have read this article
Disclaimer: The Stencyl Team does not actively monitor comments on articles. If you're seeking help for your game, please ask a question on the forums. Thanks!