A stand alone flash player

Here I need to make a flash stand-alone player that will play on PC and Mac. It will import a .swf that itself nests a .flv.

package {
  import flash.display.*;
  import flash.net.*;
  import flash.system.fscommand;
  public class basic_standalone extends MovieClip {
    public function basic_standalone () {
      var request:URLRequest = new URLRequest("themovie.swf");
      var loader:Loader = new Loader();
      //This next line prevents the viewer from rescaling the content but in Mac
      //you can still scale the .app window.
      stage.scaleMode = StageScaleMode.NO_SCALE

I had to add a mask the size of the stage and an empty sublayer to prevent assets being viewed outside the stage area if the user decided to scale the viewing window. I’d like to prevent the viewer from resizing the window but outside of using Director I haven’t found a good way to do it yet.



Posted: June 6th, 2008 | Author: | Filed under: Code Reference | No Comments »

Leave a Reply