/ Published in: ActionScript 3
Often when you are testing your SWF inside the Flash IDE you need things to be different than for the live version.
Example: The path to loaded images is not the same when you "test movie" and your server. So instead of having to change the variable "path" all the time manually from "test" to "live" you can use "Capabilities.playerType" to check in what environment your SWF is.
Expand |
Embed | Plain Text
var path:String = "../images/"; // default live if(Capabilities.playerType == 'External') { // change the path for testing inside the Flash IDE path = "images/"; }
You need to login to post a comment.
