Posted By

simurai on 10/15/08


Tagged

test flash movie live IDE playerType


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

THEPWN3R
damarev
moselicious
adrianparr
Michel3D
glpunk


Check if your SWF is in "test movie" or "live" mode


 / 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.

  1. var path:String = "../images/"; // default live
  2. if(Capabilities.playerType == 'External') {
  3. // change the path for testing inside the Flash IDE
  4. path = "images/";
  5. }

Report this snippet  

You need to login to post a comment.