3 Replies Latest reply on Aug 28, 2015 3:38 AM by Ned Murphy

    AS compile to swf.

    sunrise_ansari

      Hi guyz and gurlz,

       

      I have a swf file that need to edit. I have an AS file. I want to compile this file into the swf file. How do I do that?

       

      Thank You.

        • 1. Re: AS compile to swf.
          Ned Murphy Adobe Community Professional & MVP

          You need the fla that created the swf in order to edit it.

          • 2. Re: AS compile to swf.
            sunrise_ansari Level 1

            Hi Ned Murphy,

             

            Since I don't have the fla file. I create new fla and just attach the existing AS file. So, its not working. Where should be the problem?

             

            I paste the code here.

             

            package live_video_fla

            {

               import flash.display.MovieClip;

               import flash.text.TextField;

               import flash.events.Event;

               import flash.events.ProgressEvent;

               import flash.net.URLRequest;

               import flash.net.URLVariables;

               import flash.net.URLLoader;

               import com.adobe.crypto.MD5;

               import flash.external.ExternalInterface;

               import flash.net.URLRequestMethod;

               import flash.net.URLLoaderDataFormat;

               import flash.events.SecurityErrorEvent;

               import flash.events.IOErrorEvent;

               import flash.ui.ContextMenuItem;

               import flash.ui.ContextMenuBuiltInItems;

               import flash.events.ContextMenuEvent;

               import flash.net.navigateToURL;

               import flash.ui.ContextMenu;

               import flash.media.Video;

               import flash.media.SoundTransform;

               import flash.net.NetStream;

               import fl.containers.UILoader;

               import flash.net.NetConnection;

               import flash.events.NetStatusEvent;

               import flash.geom.Rectangle;

               import flash.display.StageDisplayState;

               import com.encryption.TEA;

               import flash.utils.setTimeout;

               import flash.events.MouseEvent;

               import flash.utils.Timer;

               import flash.net.Responder;

               import flash.net.GroupSpecifier;

               import flash.display.StageAlign;

               import flash.display.StageScaleMode;

               import flash.system.Capabilities;

               import flash.net.ObjectEncoding;

              

               public dynamic class MainTimeline extends MovieClip

               {

                  

                  public var showTitle:TextField;

                 

                  public var logoutmsg:TextField;

                 

                  public var vwprebrand:MovieClip;

                 

                  public var logoutBrand:TextField;

                 

                  public var iTimers:TextField;

                 

                  public var licenseMessage:TextField;

                 

                  public var vwbrand:MovieClip;

                 

                  public var Message:TextField;

                 

                  public var preloaded;

                 

                  public var flash_version:TextField;

                 

                  public var flpVersion:String;

                 

                  public var whitelabel;

                 

                  public var version;

                 

                  public var webserver_path;

                 

                  public var ws_res;

                 

                  public var wsj;

                 

                  public var ws_login;

                 

                  public var ws_logout;

                 

                  public var ws_status;

                 

                  public var edition;

                 

                  public var statusInterval;

                 

                  public var disconnectOnTimeout;

                 

                  public var showCredit;

                 

                  public var showTimer;

                 

                  public var offlineMessage;

                 

                  public var userType;

                 

                  public var pageURL;

                 

                  public var parameterPublisher;

                 

                  public var parameterMode;

                 

                  public var parameterPrefix;

                 

                  public var parameterExtension;

                 

                  public var Room;

                 

                  public var serverRTMFP;

                 

                  public var p2pGroup;

                 

                  public var supportRTMP;

                 

                  public var supportP2P;

                 

                  public var alwaysRTMP;

                 

                  public var alwaysP2P;

                 

                  public var Server;

                 

                  public var ServerAMF;

                 

                  public var ServerProxy;

                 

                  public var tokenKey;

                 

                  public var bufferLive;

                 

                  public var bufferFull;

                 

                  public var username;

                 

                  public var loginMessage:String;

                 

                  public var Welcome;

                 

                  public var Visitor;

                 

                  public var logout_message;

                 

                  public var overLogo;

                 

                  public var overLink;

                 

                  public var standAlone;

                 

                  public var product_name;

                 

                  public var product_side;

                 

                  public var licenseTextfield;

                 

                  public var license_verified;

                 

                  public var trial_lu;

                 

                  public var trial_lr;

                 

                  public var trial_lt;

                 

                  public var trial_a;

                 

                  public var trial_ai;

                 

                  public var wl_1;

                 

                  public var wl_2;

                 

                  public var wl_h;

                 

                  public var wl_d;

                 

                  public var wl_v;

                 

                  public var pubLabel;

                 

                  public var pubLink;

                 

                  public var pubV;

                 

                  public var license_servers;

                 

                  public var servers_opened;

                 

                  public var servers_tried;

                 

                  public var servers_total;

                 

                  public var l_url;

                 

                  public var l_same;

                 

                  public var i;

                 

                  public var request:URLRequest;

                 

                  public var loader:URLLoader;

                 

                  public var video:Video;

                 

                  public var sound:SoundTransform;

                 

                  public var stream:NetStream;

                 

                  public var streamP2P:NetStream;

                 

                  public var startBuffer;

                 

                  public var loadBuffer;

                 

                  public var ai;

                 

                  public var logo:UILoader;

                 

                  public var Profile;

                 

                  public var Session;

                 

                  public var Username;

                 

                  public var connection:NetConnection;

                 

                  public var playingStream;

                 

                  public var statusTimer;

                 

                  public var reportTimer:Timer;

                 

                  public var timeStart;

                 

                  public var timeCrt:Date;

                 

                  public var lastTime;

                 

                  public var timeTotal;

                 

                  public var timeUsed;

                 

                  public var sessionTime:Number;

                 

                  public var statusText;

                 

                  public var verboseLevel;

                 

                  public var chat0;

                 

                  public var mediainput;

                 

                  public var Manager;

                 

                  public var pingTimer:Timer;

                 

                  public var rtmfpConnection:NetConnection;

                 

                  public var groupSpecifier:GroupSpecifier;

                 

                  public var CP:Object;

                 

                  public function MainTimeline()

                  {

                     super();

                     addFrameScript(0,this.frame1,1,this.frame2,2,this.frame3,3,this.frame4);

                  }

                 

                  public function preLoading(param1:Event) : void

                  {

                     var _loc2_:Number = this.stage.loaderInfo.bytesTotal;

                     var _loc3_:Number = this.stage.loaderInfo.bytesLoaded;

                     var _loc4_:* = 0;

                     if(_loc2_)

                     {

                        _loc4_ = Math.round(_loc3_ / _loc2_ * 100);

                     }

                     this.graphics.clear();

                     this.graphics.lineStyle(1,0,1);

                     this.graphics.beginFill(16777215);

                     this.graphics.drawRect(10,10,200,4);

                     this.graphics.beginFill(11180339 + 256 * _loc4_);

                     this.graphics.drawRect(10,10,_loc4_ * 2,4);

                     if(_loc2_ == _loc3_)

                     {

                        this.preLoaded();

                     }

                  }

                 

                  public function preLoaded() : *

                  {

                     this.graphics.clear();

                     removeChild(this.flash_version);

                     if(this.hasEventListener(Event.ENTER_FRAME))

                     {

                        this.removeEventListener(Event.ENTER_FRAME,this.preLoading);

                     }

                     if(this.loaderInfo.hasEventListener(Event.COMPLETE))

                     {

                        this.loaderInfo.removeEventListener(Event.COMPLETE,this.initApplication);

                     }

                     if(this.loaderInfo.hasEventListener(ProgressEvent.PROGRESS))

                     {

                        this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.showProgress);

                     }

                     nextScene();

                  }

                 

                  public function showProgress(param1:ProgressEvent) : void

                  {

                     var _loc2_:Number = Math.round(param1.bytesLoaded / param1.bytesTotal * 100);

                     this.graphics.clear();

                     this.graphics.lineStyle(1,0,1);

                     this.graphics.beginFill(16777215);

                     this.graphics.drawRect(10,10,200,4);

                     this.graphics.beginFill(11180339 + 256 * _loc2_);

                     this.graphics.drawRect(10,10,_loc2_ * 2,4);

                  }

                 

                  public function initApplication(param1:Event) : void

                  {

                     this.preLoaded();

                  }

                 

                  public function urlGET(param1:*) : String

                  {

                     if(param1.indexOf("?") >= 0)

                     {

                        var param1:* = param1 + "&";

                     }

                     else

                     {

                        param1 = param1 + "?";

                     }

                     return param1;

                  }

                 

                  public function try_license(param1:*) : *

                  {

                     var completeHandler:Function = null;

                     var errorHandler:Function = null;

                     var server:* = param1;

                     completeHandler = function(param1:Event):*

                     {

                        var lStatus:* = undefined;

                        var lMessage:* = undefined;

                        var wlok:* = undefined;

                        var evt:Event = param1;

                        var vars:URLVariables = new URLVariables();

                        try

                        {

                           vars.decode(evt.target.data);

                           lStatus = vars.s;

                           lMessage = vars.m;

                           if(vars.tlu && !trial_lu)

                           {

                              trial_lu = Number(vars.tlu);

                           }

                           if(vars.tlr && !trial_lr)

                           {

                              trial_lr = Number(vars.tlr);

                           }

                           if(vars.tlt && !trial_lt)

                           {

                              trial_lt = Number(vars.tlt);

                           }

                           if(vars.ta && !trial_a)

                           {

                              trial_a = vars.ta;

                           }

                           if(vars.tai && !trial_ai)

                           {

                              trial_ai = vars.tai;

                           }

                           if(vars.wl1 && !wl_1)

                           {

                              wl_1 = vars.wl1;

                           }

                           if(vars.wl2 && !wl_2)

                           {

                              wl_2 = vars.wl2;

                           }

                           if(vars.wlh && !wl_h)

                           {

                              wl_h = vars.wlh;

                           }

                           if(vars.wld && !wl_d)

                           {

                              wl_d = vars.wld;

                           }

                           if(vars.pubLabel)

                           {

                              pubLabel = vars.pubLabel;

                           }

                           if(vars.pubLink)

                           {

                              pubLink = vars.pubLink;

                           }

                           if(vars.pubV)

                           {

                              pubV = vars.pubV;

                           }

                           if(pubLabel)

                           {

                              setContextMenu();

                           }

                           if(wl_d && !wl_v)

                           {

                              wl_v = MD5.hash(wl_d + wl_2);

                           }

                           if(lMessage)

                           {

                              if(lMessage.length > 0)

                              {

                                 if(licenseTextfield)

                                 {

                                    licenseTextfield.text = lMessage;

                                 }

                              }

                           }

                           wlok = true;

                           if(whitelabel)

                           {

                              if(!wl_1)

                              {

                                 wlok = true;

                              }

                              else if(wl_v != wl_h)

                              {

                                 wlok = true;

                              }

                           }

                           servers_tried++;

                           if(lStatus)

                           {

                              if(lStatus == "1")

                              {

                                 if(wlok)

                                 {

                                    if(!license_verified)

                                    {

                                       goodLicense();

                                    }

                                    license_verified = true;

                                 }

                              }

                           }

                           if(servers_total == servers_tried)

                           {

                              if(whitelabel && !wl_1)

                              {

                                 licenseTextfield.visible = true;

                                 licenseTextfield.htmlText = "This edition is only for white label licenses. Contact <a href=\"http://www.testdj.com\">testdj.com</a> ...";

                              }

                              if(whitelabel && wl_v != wl_h)

                              {

                                 licenseTextfield.visible = true;

                                 licenseTextfield.htmlText = "White label license mismatch. Contact <a href=\"http://www.testdj.com\">testdj.com</a> ...";

                              }

                              if(!license_verified)

                              {

                                 // badLicense();

                              }

                              if(wl_2)

                              {

                                 setContextMenu();

                              }

                           }

                           return;

                        }

                        catch(error:*)

                        {

                           return;

                        }

                     };

                     errorHandler = function(param1:Event):*

                     {

                        ExternalInterface.call("console.log","License Error: " + param1.toString());

                     };

                     var rand:* = Math.floor(Math.random() * 1000000);

                     var hash:* = MD5.hash("testdj" + this.product_name + this.product_side + this.edition + this.version + this.parameterPrefix + this.pageURL + this.l_url + rand);

                     var request:URLRequest = new URLRequest("http://" + server + "/l.php?r=" + rand);

                     var variables:URLVariables = new URLVariables();

                     variables.pb = this.parameterPrefix;

                     variables.pu = this.pageURL;

                     variables.pp = this.parameterPublisher;

                     variables.h = hash;

                     variables.u = this.l_url;

                     variables.s = this.l_same;

                     variables.pn = this.product_name;

                     variables.ps = this.product_side;

                     variables.pe = this.edition;

                     variables.pv = this.version;

                     variables.wl = this.whitelabel;

                     request.data = variables;

                     request.method = URLRequestMethod.POST;

                     var loader:URLLoader = new URLLoader();

                     loader.dataFormat = URLLoaderDataFormat.TEXT;

                     loader.addEventListener(Event.COMPLETE,completeHandler);

                     loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,errorHandler);

                     loader.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);

                     loader.load(request);

                     this.servers_opened++;

                  }

                 

                  public function goodLicense() : *

                  {

                     if(this.username)

                     {

                        nextScene();

                     }

                  }

                 

                  public function badLicense() : *

                  {

               if(this.username)

                     {

                        nextScene();

                     }

                  }

                 

                  public function completeHandler(param1:Event) : *

                  {

                     var _loc2_:* = param1.target.data;

                     if(param1.target.data.loggedin != "1")

                     {

                        if(param1.target.data.msg)

                        {

                           this.Message.htmlText = param1.target.data.msg;

                        }

                     }

                     else

                     {

                        if(param1.target.data.username)

                        {

                           this.username = param1.target.data.username;

                        }

                        else

                        {

                           this.Message.htmlText = "No username!";

                        }

                        if(param1.target.data.welcome)

                        {

                           this.Welcome = param1.target.data.welcome;

                        }

                        if(param1.target.data.visitor)

                        {

                           this.Visitor = param1.target.data.visitor;

                        }

                        if(_loc2_.showCredit)

                        {

                           if(_loc2_.showCredit != "0")

                           {

                              this.showCredit = true;

                           }

                           else

                           {

                              this.showCredit = false;

                           }

                        }

                        if(_loc2_.disconnectOnTimeout)

                        {

                           if(_loc2_.disconnectOnTimeout != "0")

                           {

                              this.disconnectOnTimeout = true;

                           }

                           else

                           {

                              this.disconnectOnTimeout = false;

                           }

                        }

                        if(_loc2_.showTimer)

                        {

                           if(_loc2_.showTimer != "0")

                           {

                              this.showTimer = true;

                           }

                           else

                           {

                              this.showTimer = false;

                           }

                        }

                        if(_loc2_.statusInterval)

                        {

                           this.statusInterval = Number(_loc2_.statusInterval);

                        }

                        if(_loc2_.offlineMessage)

                        {

                           this.offlineMessage = _loc2_.offlineMessage;

                        }

                        if(_loc2_.userType)

                        {

                           this.userType = _loc2_.userType;

                        }

                        if(_loc2_.bufferLive)

                        {

                           this.bufferLive = Number(_loc2_.bufferLive);

                        }

                        if(_loc2_.bufferFull)

                        {

                           this.bufferFull = Number(_loc2_.bufferFull);

                        }

                        if(_loc2_.overLogo)

                        {

                           this.overLogo = _loc2_.overLogo;

                        }

                        if(_loc2_.overLink)

                        {

                           this.overLink = _loc2_.overLink;

                        }

                        if(_loc2_.server)

                        {

                           this.Server = _loc2_.server;

                        }

                        if(_loc2_.serverAMF)

                        {

                           this.ServerAMF = _loc2_.serverAMF;

                        }

                        if(_loc2_.tokenKey)

                        {

                           this.tokenKey = _loc2_.tokenKey;

                        }

                        if(_loc2_.serverProxy)

                        {

                           this.ServerProxy = _loc2_.serverProxy;

                        }

                        if(_loc2_.serverRTMFP)

                        {

                           this.serverRTMFP = _loc2_.serverRTMFP;

                        }

                        if(_loc2_.p2pGroup)

                        {

                           this.p2pGroup = _loc2_.p2pGroup;

                        }

                        if(_loc2_.supportRTMP)

                        {

                           if(_loc2_.supportRTMP == "0")

                           {

                              this.supportRTMP = false;

                           }

                        }

                        if(_loc2_.supportP2P)

                        {

                           if(_loc2_.supportP2P == "0")

                           {

                              this.supportP2P = false;

                           }

                        }

                        if(_loc2_.alwaysRTMP)

                        {

                           if(_loc2_.alwaysRTMP != "0")

                           {

                              this.alwaysRTMP = true;

                           }

                        }

                        if(_loc2_.alwaysP2P)

                        {

                           if(_loc2_.alwaysP2P != "0")

                           {

                              this.alwaysP2P = true;

                           }

                        }

                        this.Message.text = this.username;

                        if(this.license_verified)

                        {

                           nextScene();

                        }

                     }

                     var _loc3_:* = param1.target.data.loadstatus;

                  }

                 

                  public function setContextMenu() : *

                  {

                     var mdomain:* = undefined;

                     var myContextMenu:* = undefined;

                     var contextVWv:ContextMenuItem = null;

                     var contextVW:ContextMenuItem = null;

                     var menuSelectHandler:Function = null;

                     var menuItemSelectHandler:Function = null;

                     var removeDefaultItems:Function = function():void

                     {

                        myContextMenu.hideBuiltInItems();

                        var _loc1_:ContextMenuBuiltInItems = myContextMenu.builtInItems;

                        _loc1_.print = true;

                     };

                     var addCustomMenuItems:Function = function():void

                     {

                        if(!whitelabel)

                        {

                           myContextMenu.customItems.push(contextVWv);

                        }

                        myContextMenu.customItems.push(contextVW);

                        contextVW.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menuItemSelectHandler);

                        contextVWv.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menuItemSelectHandler);

                     };

                     menuSelectHandler = function(param1:ContextMenuEvent):void

                     {

                     };

                     menuItemSelectHandler = function(param1:ContextMenuEvent):void

                     {

                        if(param1.target == contextVW || param1.target == contextVWv)

                        {

                           navigateToURL(new URLRequest("http://" + mdomain),"_self");

                        }

                     };

                     mdomain = "www.testdj.com";

                     var mlabel:* = "Developed by testdj.com";

                     if(this.whitelabel)

                     {

                        mdomain = "";

                        mlabel = "Loading...";

                     }

                     if(this.pubLabel)

                     {

                        mlabel = this.pubLabel;

                     }

                     if(this.pubLink)

                     {

                        mdomain = this.pubLink;

                     }

                     if(this.wl_2)

                     {

                        mdomain = this.wl_d;

                        mlabel = "Powered by " + this.wl_d;

                     }

                     myContextMenu = new ContextMenu();

                     var vlabel:* = this.product_name + " v" + this.version;

                     if(this.product_side)

                     {

                        vlabel = vlabel + " " + this.product_side;

                     }

                     if(this.edition)

                     {

                        vlabel = vlabel + " " + this.edition;

                     }

                     contextVWv = new ContextMenuItem(vlabel);

                     contextVW = new ContextMenuItem(mlabel);

                     removeDefaultItems();

                     addCustomMenuItems();

                     myContextMenu.addEventListener(ContextMenuEvent.MENU_SELECT,menuSelectHandler);

                     contextMenu = myContextMenu;

                  }

                 

                  public function l(param1:*) : *

                  {

                     return param1;

                  }

                 

                  public function logoLoaded(param1:*) : *

                  {

                     this.logo.y = 2;

                     this.logo.x = stage.stageWidth - this.logo.width - 2;

                     this.logo.cacheAsBitmap = true;

                     this.logo.enabled = true;

                     this.logo.mouseEnabled = true;

                     setChildIndex(this.logo,numChildren - 1);

                  }

                 

                  public function logoClick(param1:*) : *

                  {

                     navigateToURL(new URLRequest(this.overLink),"_blank");

                     param1.stopPropagation();

                  }

                 

                  public function netStatus(param1:NetStatusEvent) : void

                  {

                     var event:NetStatusEvent = param1;

                     var info:Object = event.info;

                     if(info.code == "NetConnection.Connect.Closed")

                     {

                        if(!this.logout_message)

                        {

                           this.logout_message = "You have been disconnected from server.";

                        }

                        this.stopWebserver();

                        gotoAndPlay(0,"Disconnect");

                     }

                     if(info.code == "NetConnection.Connect.Success")

                     {

                        var videoclick:Function = function(param1:*):*

                        {

                           var _loc2_:Rectangle = new Rectangle(0,0,video.width,video.height);

                           stage.fullScreenSourceRect = _loc2_;

                           stage.displayState = StageDisplayState.FULL_SCREEN;

                        };

                        if(info.secureToken != null)

                        {

                           this.connection.call("secureTokenResponse",null,TEA.decrypt(info.secureToken,this.tokenKe y));

                        }

                        this.connection.call("myDetailsServer",null,this.Username,this.userType);

                        this.connection.call("joinRoomServer",null,this.Room);

                        this.video = new Video(stage.stageWidth,stage.stageHeight);

                        this.video.smoothing = true;

                        this.video.deblocking = 4;

                        this.video.width = stage.stageWidth;

                        this.video.height = stage.stageHeight;

                        this.video.x = 0;

                        this.video.y = 0;

                        addChild(this.video);

                        setChildIndex(this.video,0);

                        setTimeout(this.playStream,1000);

                        stage.addEventListener(MouseEvent.CLICK,videoclick);

                        this.startWebserver();

                     }

                  }

                 

                  public function stageResize(param1:Event) : *

                  {

                     if(stage.stageWidth > this.iTimers.width)

                     {

                        this.iTimers.x = stage.stageWidth - this.iTimers.width;

                     }

                     if(stage.stageHeight > this.iTimers.height + 30)

                     {

                        this.iTimers.y = stage.stageHeight - this.iTimers.height - 30;

                     }

                     if(this.video)

                     {

                        this.video.width = stage.stageWidth;

                        this.video.height = stage.stageHeight;

                     }

                     if(this.showTitle)

                     {

                        this.showTitle.x = 2;

                     }

                     if(this.logo)

                     {

                        this.logo.x = stage.stageWidth - this.logo.width - 2;

                     }

                  }

                 

                  public function playStream() : *

                  {

                     if(this.playingStream)

                     {

                        return;

                     }

                     if(!this.rtmfpConnection)

                     {

                        this.playRTMP();

                        return;

                     }

                     if(this.rtmfpConnection.connected)

                     {

                        this.playP2P();

                     }

                     else

                     {

                        setTimeout(this.playConnectedP2P,1000);

                     }

                  }

                 

                  public function playConnectedP2P() : *

                  {

                     if(this.rtmfpConnection.connected)

                     {

                        this.playP2P();

                     }

                     else

                     {

                        this.playRTMP();

                     }

                  }

                 

                  public function closeStreams() : *

                  {

                     if(this.stream)

                     {

                        this.stream.close();

                     }

                     if(this.streamP2P)

                     {

                        this.streamP2P.close();

                     }

                  }

                 

                  public function playRTMP() : *

                  {

                     var netStatusHandler:Function = null;

                     netStatusHandler = function(param1:NetStatusEvent):void

                     {

                        if(param1.info.code != "NetStream.Buffer.Empty" && param1.info.code != "NetStream.Buffer.Full")

                        {

                        }

                        switch(param1.info.code)

                        {

                           case "NetStream.Buffer.Empty":

                              stream.bufferTime = startBuffer;

                              break;

                           case "NetStream.Buffer.Full":

                              stream.bufferTime = loadBuffer;

                              break;

                           case "NetStream.Play.StreamNotFound":

                              break;

                           case "NetStream.Play.UnpublishNotify":

                              break;

                           case "NetStream.Play.PublishNotify":

                              stream.play(Room);

                              break;

                           case "NetStream.Play.InsufficientBW":

                              stream.play(Room);

                              break;

                           case "NetStream.Play.Start":

                           case "NetStream.Play.Reset":

                              break;

                           case "NetStream.Play.Stop":

                              break;

                        }

                     };

                     if(this.playingStream == 2)

                     {

                        return;

                     }

                     this.closeStreams();

                     this.stream = new NetStream(this.connection);

                     this.stream.client = this;

                     this.stream.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);

                     this.video.attachNetStream(this.stream);

                     this.stream.bufferTime = this.startBuffer;

                     this.stream.play(this.Room);

                     this.connection.call("askUserServer",null,"streamRTMP","",this.Room);

                     this.playingStream = 2;

                  }

                 

                  public function playP2P() : *

                  {

                     var groupStreamStatusHandler:Function = null;

                     var groupNetStatusHandler:Function = null;

                     groupStreamStatusHandler = function(param1:NetStatusEvent):void

                     {

                        if(param1.info.code != "NetStream.Buffer.Empty" && param1.info.code != "NetStream.Buffer.Full")

                        {

                        }

                     };

                     groupNetStatusHandler = function(param1:NetStatusEvent):void

                     {

                        if(param1.info.code == "NetStream.Connect.Success")

                        {

                           if(param1.info.stream == streamP2P)

                           {

                              video.attachNetStream(streamP2P);

                              streamP2P.bufferTime = startBuffer;

                              streamP2P.play(Room);

                           }

                        }

                        if(param1.info.code == "NetStream.Connect.Rejected")

                        {

                           if(param1.info.stream == streamP2P)

                           {

                           }

                        }

                     };

                     if(this.playingStream == 1)

                     {

                        return;

                     }

                     this.closeStreams();

                     this.streamP2P = new NetStream(this.rtmfpConnection,this.groupSpecifier.groupspecWithoutAuthorizations());

                     this.streamP2P.client = this;

                     this.streamP2P.addEventListener(NetStatusEvent.NET_STATUS,groupStreamStatusHandler);

                     this.rtmfpConnection.addEventListener(NetStatusEvent.NET_STATUS,groupNetStatusHandler);

                     this.connection.call("askUserServer",null,"streamP2P","",this.Room);

                     this.playingStream = 1;

                  }

                 

                  public function stringToCharacter(param1:String) : String

                  {

                     if(param1.length == 1)

                     {

                        return param1;

                     }

                     return param1.slice(0,1);

                  }

                 

                  public function stringReplace(param1:String, param2:String, param3:String) : String

                  {

                     return param1.split(param2).join(param3);

                  }

                 

                  public function stringTrim(param1:String, param2:String) : String

                  {

                     return this.trimBack(this.trimFront(param1,param2),param2);

                  }

                 

                  public function trimFront(param1:String, param2:String) : String

                  {

                     var param2:String = this.stringToCharacter(param2);

                     if(param1.charAt(0) == param2)

                     {

                        var param1:String = this.trimFront(param1.substring(1),param2);

                     }

                     return param1;

                  }

                 

                  public function trimBack(param1:String, param2:String) : String

                  {

                     var param2:String = this.stringToCharacter(param2);

                     if(param1.charAt(param1.length - 1) == param2)

                     {

                        var param1:String = this.trimBack(param1.substring(0,param1.length - 1),param2);

                     }

                     return param1;

                  }

                 

                  public function filterMessage(param1:*, param2:*, param3:* = " *** ") : *

                  {

                     var _loc4_:* = 0;

                     while(param2.exec(param1) != null)

                     {

                        var param1:* = param1.replace(param2,param3);

                        _loc4_++;

                        if(_loc4_ > 64)

                        {

                           break;

                        }

                     }

                     return param1;

                  }

                 

                  public function parseMessage(param1:*, param2:* = false) : *

                  {

                     var _loc6_:* = undefined;

                     var param1:* = " " + param1 + " ";

                     var _loc3_:Array = new Array();

                     var _loc4_:Array = new Array();

                     if(param2)

                     {

                        _loc3_.push(new RegExp(new RegExp("([^\"\'\\/\\.<>])(https?:\\/\\/(www\\.)?([\\w%\\/_\\.\\-\\?\\+=&#\\[\\]]+\\.(jpg| gif|png|bmp|swf)))([\\s,;])","i")));

                        _loc4_.push("$1<font color=\"#993333\"><u><i><a target=\"_blank\" href=\"event:$2\">$5: $4</a></i></u></font>$6");

                        _loc3_.push(new RegExp(new RegExp("([^\"\'\\/\\.<>])(https?:\\/\\/(www\\.)?youtube\\.com\\/([%\\w\\/_\\.\\?\\+=&\\-# ]+))([\\s,;])","i")));

                        _loc4_.push("$1<font color=\"#993333\"><u><i><a target=\"_blank\" href=\"event:$2\">YouTube: youtube.com/$4</a></i></u></font>$5");

                     }

                     _loc3_.push(new RegExp(new RegExp("([^\"\'\\/\\.<>])(https?:\\/\\/(www\\.)?([%\\w\\/_\\.\\-\\?\\+=&#]*))([\\s,;])"," i")));

                     _loc4_.push("$1<font color=\"#335599\"><u><i><a target=\"_blank\" href=\"$2\">$4</a></i></u></font>$5");

                     _loc3_.push(new RegExp(new RegExp("([^\"\'\\/\\.<>])(www\\.([%\\w\\/_\\.\\-\\?\\+=&#]*))([\\s,;])","i")));

                     _loc4_.push("$1<font color=\"#335599\"><u><i><a target=\"_blank\" href=\"http://$2\">$3</a></i></u></font>$4");

                     _loc3_.push(new RegExp(new RegExp("\\s@([\\w-\\.]*)","i")));

                     _loc4_.push(" <font color=\"#337799\"><u><i><a target=\"_blank\" href=\"http://www.twitter.com/$1\">Twitter: $1</a></i></u></font>");

                     _loc3_.push(new RegExp(new RegExp("([^\"\'\\/\\.<>])([\\w-\\.\\+]+@[\\w\\.-]+)([\\s,;])","i")));

                     _loc4_.push("$1<font color=\"#337755\"><u><i><a href=\"mailto: $2\">$2</a></i></u></font>$3");

                     var _loc5_:* = 0;

                     while(_loc5_ < _loc3_.length)

                     {

                        _loc6_ = 0;

                        while(_loc3_[_loc5_].exec(param1) != null)

                        {

                           param1 = param1.replace(_loc3_[_loc5_],_loc4_[_loc5_]);

                           _loc6_++;

                           if(_loc6_ > 8)

                           {

                              break;

                           }

                        }

                        _loc5_++;

                     }

                     param1 = this.stringTrim(param1," ");

                     return param1;

                  }

                 

                  public function secondsToTime(param1:Number) : String

                  {

                     var param1:Number = Math.abs(param1);

                     var _loc2_:Array = new Array(5);

                     _loc2_[0] = Math.floor(param1 / 86400 / 7);

                     _loc2_[1] = Math.floor(param1 / 86400 % 7);

                     _loc2_[2] = Math.floor(param1 / 3600 % 24);

                     _loc2_[3] = Math.floor(param1 / 60 % 60);

                     _loc2_[4] = Math.floor(param1 % 60);

                     var _loc3_:* = false;

                     var _loc4_:Number = -1;

                     var _loc5_:Number = 0;

                     while(_loc5_ < _loc2_.length)

                     {

                        if(_loc2_[_loc5_] < 10)

                        {

                           _loc2_[_loc5_] = "0" + _loc2_[_loc5_];

                        }

                        if(_loc2_[_loc5_] == "00" && _loc5_ < _loc2_.length - 2 && !_loc3_)

                        {

                           _loc4_ = _loc5_;

                        }

                        else

                        {

                           _loc3_ = true;

                        }

                        _loc5_++;

                     }

                     _loc2_.splice(0,_loc4_ + 1);

                     return _loc2_.join(":");

                  }

                 

                  public function startWebserver() : *

                  {

                     this.timeStart = new Date();

                     this.updateWebStatus(new Event(Event.COMPLETE));

                     this.statusTimer.addEventListener("timer",this.updateWebStatus);

                     this.statusTimer.start();

                     this.reportTimer.addEventListener("timer",this.updateReport);

                     this.reportTimer.start();

                  }

                 

                  public function stopWebserver() : *

                  {

                     if(this.statusTimer)

                     {

                        this.statusTimer.stop();

                     }

                     if(this.reportTimer)

                     {

                        this.reportTimer.stop();

                     }

                  }

                 

                  public function updateWebStatus(param1:Event) : *

                  {

                     this.timeCrt = new Date();

                     var _loc2_:URLRequest = new URLRequest(this.ws_status);

                     var _loc3_:URLVariables = new URLVariables();

                     _loc3_.cam = this.mediainput.camStatus;

                     _loc3_.mic = this.mediainput.micStatus;

                     _loc3_.u = this.Username;

                     _loc3_.s = this.Session;

                     _loc3_.r = this.Room;

                     _loc3_.m = this.Profile.Show;

                     this.sessionTime = this.timeCrt.time - this.timeStart.time;

                     _loc3_.ct = this.sessionTime;

                     _loc3_.lt = this.lastTime;

                     _loc2_.data = _loc3_;

                     _loc2_.method = URLRequestMethod.POST;

                     var _loc4_:URLLoader = new URLLoader();

                     _loc4_.dataFormat = URLLoaderDataFormat.VARIABLES;

                     _loc4_.addEventListener(Event.COMPLETE,this.completeWebStatus);

                     _loc4_.addEventListener(IOErrorEvent.IO_ERROR,this.errorWebStatus);

                     _loc4_.load(_loc2_);

                  }

                 

                  public function completeWebStatus(param1:Event) : void

                  {

                     if(param1.target.data.lastTime)

                     {

                        this.lastTime = Number(param1.target.data.lastTime);

                     }

                     if(param1.target.data.timeTotal)

                     {

                        this.timeTotal = Number(param1.target.data.timeTotal);

                     }

                     if(param1.target.data.timeUsed)

                     {

                        this.timeUsed = Number(param1.target.data.timeUsed);

                     }

                     if(this.disconnectOnTimeout)

                     {

                        if(this.timeTotal > 0 && this.timeUsed > this.timeTotal)

                        {

                           if(this.ws_logout)

                           {

                              navigateToURL(new URLRequest(this.ws_logout + "room=" + escape(this.Room) + "&message=" + escape("Your allowed session time expired! (" + this.secondsToTime(Math.floor(this.timeTotal / 1000)) + ")")),"_self");

                           }

                           else

                           {

                              this.connection.close();

                           }

                        }

                     }

                     if(param1.target.data.disconnect)

                     {

                        if(param1.target.data.disconnect.length > 0)

                        {

                           if(this.ws_logout)

                           {

                              navigateToURL(new URLRequest(this.ws_logout + "room=" + escape(this.Room) + "&message=" + escape(param1.target.data.disconnect)),"_self");

                           }

                           else

                           {

                              this.logout_message = param1.target.data.disconnect;

                              this.connection.close();

                           }

                        }

                     }

                  }

                 

                  public function errorWebStatus(param1:Event) : void

                  {

                  }

                 

                  public function updateReport(param1:Event) : *

                  {

                     this.timeCrt = new Date();

                     this.sessionTime = this.timeCrt.time - this.timeStart.time;

                     var _loc2_:* = this.secondsToTime(Math.floor(this.sessionTime / 1000));

                     if(this.timeTotal > 0 && this.showCredit)

                     {

                        _loc2_ = _loc2_ + (" (" + this.secondsToTime(Math.floor(this.timeUsed / 1000)) + "/" + this.secondsToTime(Math.floor(this.timeTotal / 1000)) + ")");

                     }

                     this.iTimers.text = _loc2_;

                  }

                 

                  public function onBWCheck(... rest) : Number

                  {

                     return 0;

                  }

                 

                  public function onBWDone(... rest) : void

                  {

                     var _loc2_:* = undefined;

                     var _loc3_:* = NaN;

                     var _loc4_:* = undefined;

                     var _loc5_:* = undefined;

                     var _loc6_:* = undefined;

                     if(!this.statusText)

                     {

                        return;

                     }

                     if(rest.length > 0)

                     {

                        if(!rest[0])

                        {

                           return;

                        }

                        if(isNaN(rest[0]))

                        {

                           return;

                        }

                        if(isNaN(rest[3]))

                        {

                           return;

                        }

                        _loc2_ = rest[0];

                        _loc4_ = Math.floor(_loc2_ / 8);

                        _loc3_ = rest[3];

                        _loc5_ = "<font color=\"#FF3333\">" + this.l("Very Low") + "</font>";

                        if(_loc2_ > 300)

                        {

                           _loc5_ = "<font color=\"#993333\">" + this.l("Low") + "</font>";

                        }

                        if(_loc2_ > 500)

                        {

                           _loc5_ = "<font color=\"#336633\">" + this.l("Good") + "</font>";

                        }

                        if(_loc2_ > 800)

                        {

                           _loc5_ = "<font color=\"#338833\">" + this.l("Very Good") + "</font>";

                        }

                        if(_loc2_ > 1500)

                        {

                           _loc5_ = "<font color=\"#339933\">" + this.l("Excellent") + "</font>";

                        }

                        _loc6_ = "<font color=\"#FF3333\">" + this.l("Big Delay") + "</font>";

                        if(_loc3_ < 400)

                        {

                           _loc6_ = "<font color=\"#993333\">" + this.l("Medium Delay") + "</font>";

                        }

                        if(_loc3_ < 250)

                        {

                           _loc6_ = "<font color=\"#336633\">" + this.l("Small Delay") + "</font>";

                        }

                        if(_loc3_ < 100)

                        {

                           _loc6_ = "<font color=\"#339933\">" + this.l("Excellent") + "</font>";

                        }

                        this.statusText.addText("<I><font color=\"#777777\">" + this.l("Your download (playback from server) connection speed:") + "</font></I>");

                        this.statusText.addText("<I><font color=\"#777777\">" + this.l("Download Bandwidth") + ": " + _loc2_ + " Kbps (" + _loc4_ + "kb/s). (" + _loc5_ + ")</font></I>");

                        this.statusText.addText("<I><font color=\"#777777\">" + this.l("Download Test Latency") + ": " + _loc3_ + " ms. (" + _loc6_ + ")</font></I>");

                        this.connectionMeasured(_loc4_,_loc3_);

                     }

                  }

                 

                  public function pingServer(param1:Event) : *

                  {

                     this.connection.call("pingServer",null);

                  }

                 

                  public function pingFromServer(param1:*) : *

                  {

                     this.connection.call("pongServer",null,param1);

                  }

                 

                  public function onMetaData(param1:Object) : void

                  {

                  }

                 

                  public function onCuePoint(param1:Object) : void

                  {

                  }

                 

                  public function onFI(param1:Object) : void

                  {

                  }

                 

                  public function setDataFrame(param1:*) : *

                  {

                  }

                 

                  public function onTextData(param1:*) : *

                  {

                  }

                 

                  public function onXMPData(param1:*) : *

                  {

                  }

                 

                  public function onImageData(param1:*) : *

                  {

                  }

                 

                  public function onClientResponse() : *

                  {

                  }

                 

                  public function uploadBWCheck(param1:*) : *

                  {

                     var res:* = undefined;

                     var payload:* = undefined;

                     var ro:* = undefined;

                     var i:* = undefined;

                     var onResult:Function = null;

                     var nc:* = param1;

                     onResult = function(param1:*):*

                     {

                        var _loc3_:* = undefined;

                        var _loc4_:* = undefined;

                        var _loc5_:* = undefined;

                        var _loc6_:* = undefined;

                        var _loc7_:* = undefined;

                        var _loc8_:* = undefined;

                        var _loc9_:* = undefined;

                        var _loc10_:* = undefined;

                        var _loc11_:* = undefined;

                        var _loc12_:* = undefined;

                        var _loc2_:* = new Date().getTime() / 1;

                        if(res.sent == 0)

                        {

                           res.beginningValues = param1;

                           res.beginningValues.time = _loc2_;

                           res.pakSent[res.sent++] = _loc2_;

                           nc.call("onClientBWCheck",ro,_loc2_);

                        }

                        else

                        {

                           res.pakRecv[res.count] = _loc2_;

                           res.count++;

                           _loc3_ = _loc2_ - res.beginningValues.time;

                           if(res.count == 1)

                           {

                              res.latency = Math.min(_loc3_,800);

                              res.latency = Math.max(res.latency,10);

                              res.overhead = param1.cOutBytes - res.beginningValues.cOutBytes;

                              res.pakSent[res.sent++] = _loc2_;

                              nc.call("onClientBWCheck",ro,_loc2_,payload);

                           }

                           if(res.count >= 1 && _loc3_ < 1000)

                           {

                              res.pakSent[res.sent++] = _loc2_;

                              res.cumLatency++;

                              nc.call("onClientBWCheck",ro,_loc2_,payload);

                           }

                           else if(res.sent == res.count)

                           {

                              if(this.latency >= 100)

                              {

                                 if(res.pakRecv[1] - res.pakRecv[0] > 1000)

                                 {

                                    res.latency = 100;

                                 }

                              }

                              payload.length = 0;

                              _loc4_ = param1;

                              _loc5_ = (_loc4_.cOutBytes - res.beginningValues.cOutBytes) * 8;

                              _loc6_ = (_loc2_ - res.beginningValues.time - res.latency * res.cumLatency) / 1000;

                              if(_loc6_ <= 0)

                              {

                                 _loc6_ = (_loc2_ - res.beginningValues.time) / 1000;

                              }

                              _loc7_ = Math.round(_loc5_ / _loc6_);

                              _loc8_ = Math.floor(_loc7_ / 1024);

                              _loc9_ = Math.floor(_loc8_ / 8);

                              _loc10_ = res.latency;

                              _loc11_ = "<font color=\"#FF3333\">" + l("Very Low") + "</font>";

                              if(_loc8_ > 300)

                              {

                                 _loc11_ = "<font color=\"#993333\">" + l("Low") + "</font>";

                              }

                              if(_loc8_ > 500)

                              {

                                 _loc11_ = "<font color=\"#336633\">" + l("Good") + "</font>";

                              }

                              if(_loc8_ > 800)

                              {

                                 _loc11_ = "<font color=\"#338833\">" + l("Very Good") + "</font>";

                              }

                              if(_loc8_ > 1500)

                              {

                                 _loc11_ = "<font color=\"#339933\">" + l("Excellent") + "</font>";

                              }

                              _loc12_ = "<font color=\"#FF3333\">" + l("Big Delay") + "</font>";

                              if(_loc10_ < 400)

                              {

                                 _loc12_ = "<font color=\"#993333\">" + l("Medium Delay") + "</font>";

                              }

                              if(_loc10_ < 250)

                              {

                                 _loc12_ = "<font color=\"#336633\">" + l("Small Delay") + "</font>";

                              }

                              if(_loc10_ < 100)

                              {

                                 _loc12_ = "<font color=\"#339933\">" + l("Excellent") + "</font>";

                              }

                              if(_loc9_ > 0)

                              {

                                 statusText.addText("<I><font color=\"#777777\">" + l("Your upload (broadcast to server) connection performance:") + "</font></I>");

                                 statusText.addText("<I><font color=\"#777777\">" + l("Upload Bandwidth") + ": " + _loc8_ + " Kbps (" + _loc9_ + "kb/s). (" + _loc11_ + ")</font></I>");

                                 statusText.addText("<I><font color=\"#777777\">" + l("Upload Test Latency") + ": " + _loc10_ + " ms. (" + _loc12_ + ")</font></I>");

                              }

                              connectionUploadMeasured(_loc9_,_loc10_);

                           }

                        }

                     };

                     ro = new Responder(onResult);

                     res = new Object();

                     res.latency = 0;

                     res.cumLatency = 1;

                     res.bwTime = 0;

                     res.count = 0;

                     res.sent = 0;

                     res.kbitUp = 0;

                     res.deltaUp = 0;

                     res.deltaTime = 0;

                     res.pakSent = new Array();

                     res.pakRecv = new Array();

                     res.beginningValues = {};

                     payload = new Array();

                     i = 0;

                     while(i < 1000)

                     {

                        payload[i] = Math.random();

                        i++;

                     }

                     var now:* = new Date().getTime() / 1;

                     nc.call("onClientBWCheck",ro,now,payload);

                     i = 0;

                     while(i < 9600)

                     {

                        payload[i] = Math.random();

                        i++;

                     }

                     var totalCount:* = 10;

                  }

                 

                  public function rtmfpNetStatus(param1:NetStatusEvent) : void

                  {

                     var _loc2_:Object = param1.info;

                     if(_loc2_.code == "NetConnection.Connect.Closed")

                     {

                     }

                     if(_loc2_.code == "NetStream.Connect.Rejected")

                     {

                     }

                     if(_loc2_.code == "NetConnection.Connect.Success")

                     {

                     }

                  }

                 

                  public function connectionMeasured(param1:*, param2:*) : *

                  {

                  }

                 

                  public function connectionUploadMeasured(param1:*, param2:*) : *

                  {

                  }

                 

                  public function messageFromServer(param1:*, param2:*) : *

                  {

                  }

                 

                  public function userFromServer(param1:*, param2:*) : *

                  {

                  }

                 

                  public function userOutputFromServer(param1:*, param2:*, param3:*, param4:*) : *

                  {

                  }

                 

                  public function userLeftFromServer(param1:*, param2:*) : *

                  {

                     if(param1.Username == this.Room && param2 == this.Room)

                     {

                        this.showTitle.text = this.offlineMessage;

                     }

                  }

                 

                  public function queueFromServer(param1:*, param2:*) : *

                  {

                     if(this.trial_lu)

                     {

                        if(this.trial_lu > 0)

                        {

                           if(param1 > this.trial_lu)

                           {

                              this.logout_message = "This license is limited to " + this.trial_lu + " users in each room.";

                              this.connection.close();

                           }

                        }

                     }

                  }

                 

                  public function userProfileFromServer(param1:*, param2:*, param3:*) : *

                  {

                     var _loc4_:* = undefined;

                     if(!param1)

                     {

                        return;

                     }

                     if(!param2)

                     {

                        return;

                     }

                     if(!param3)

                     {

                        return;

                     }

                     if(param2 == this.Room && param3 == this.Room)

                     {

                        _loc4_ = this.Room;

                        if(param1.Show)

                        {

                           if(param1.Show.length > 0)

                           {

                              _loc4_ = _loc4_ + ": " + param1.Show;

                           }

                           this.Profile.Show = param1.Show;

                        }

                        if(param1.FPS)

                        {

                           if(param1.FPS > 0)

                           {

                              stage.frameRate = param1.FPS;

                           }

                        }

                        if(param1.camWidth)

                        {

                        }

                        this.showTitle.text = _loc4_;

                     }

                  }

                 

                  public function userRenameFromServer(param1:*, param2:*, param3:*, param4:*) : *

                  {

                  }

                 

                  public function privateMessageFromServer(param1:*, param2:*) : *

                  {

                     this.connection.call("privateMessageServer",null,"User in video only interface: no private chat.",param2);

                  }

                 

                  public function askFromServer(param1:*, param2:*, param3:*) : *

                  {

                     var _loc4_:* = 0;

                     switch(param1)

                     {

                        case "watchRTMP":

                           setTimeout(this.playRTMP,1000);

                           break;

                        case "watchP2P":

                           setTimeout(this.playP2P,1000);

                           break;

                        case "watchStop":

                           this.closeStreams();

                           break;

                        case "streamRTMP":

                           break;

                        case "streamP2P":

                           break;

                        case "stopStream":

                           break;

                     }

                  }

                 

                  function frame1() : *

                  {

                     stop();

                     this.preloaded = false;

                     stage.align = StageAlign.TOP_LEFT;

                     stage.scaleMode = StageScaleMode.NO_SCALE;

                     this.loaderInfo.addEventListener(Event.COMPLETE,this.initApplication);

                     this.loaderInfo.addEventListener(ProgressEvent.PROGRESS,this.showProgress);

                     this.addEventListener(Event.ENTER_FRAME,this.preLoading);

                     this.flash_version = new TextField();

                     this.flpVersion = Capabilities.version;

                     this.flash_version.textColor = 7829367;

                     this.flash_version.width = 300;

                     this.flash_version.x = 20;

                     this.flash_version.y = 30;

                     addChild(this.flash_version);

                     this.flash_version.text = "Flash Version: " + this.flpVersion;

                     this.vwprebrand.visible = false;

                     stop();

                  }

                 

                  function frame2() : *

                  {

                     this.whitelabel = false;

                     this.version = 3.25;

                     this.webserver_path = "";

                     this.ws_res = "";

                     this.wsj = "";

                     this.ws_login = "vv_login";

                     this.ws_logout = "lb_logout";

                     this.ws_status = "v_status";

                     this.edition = "";

                     this.statusInterval = 10000;

                     this.disconnectOnTimeout = true;

                     this.showCredit = true;

                     this.showTimer = true;

                     this.offlineMessage = "Show Offline";

                     this.userType = 0;

                     this.pageURL = ExternalInterface.call("eval","window.location.href");

                     this.parameterPublisher = "";

                     this.parameterMode = "";

                     this.parameterPrefix = "";

                     this.parameterExtension = ".php";

                     this.Room = "Test";

                     if(root.loaderInfo.parameters.publisher)

                     {

                        this.parameterPublisher = root.loaderInfo.parameters.publisher;

                     }

                     if(root.loaderInfo.parameters.mode)

                     {

                        this.parameterMode = root.loaderInfo.parameters.mode;

                     }

                     if(root.loaderInfo.parameters.extension)

                     {

                        this.parameterExtension = root.loaderInfo.parameters.extension;

                     }

                     if(this.parameterExtension == "_none_")

                     {

                        this.parameterExtension = "";

                     }

                     if(root.loaderInfo.parameters.prefix)

                     {

                        this.parameterPrefix = root.loaderInfo.parameters.prefix;

                     }

                     if(root.loaderInfo.parameters.n)

                     {

                        this.Room = root.loaderInfo.parameters.n;

                     }

                     this.ws_status = this.parameterPrefix + this.ws_status + this.parameterExtension;

                     this.ws_login = this.parameterPrefix + this.ws_login + this.parameterExtension;

                     this.ws_logout = this.parameterPrefix + this.ws_logout + this.parameterExtension;

                     this.ws_login = this.urlGET(this.ws_login);

                     this.ws_logout = this.urlGET(this.ws_logout);

                     this.ws_login = this.ws_login + "room_name=" + this.Room;

                     this.serverRTMFP = "rtmfp://stratus.adobe.com/f1533cc06e4de4b56399b10d-1a624022ff71/";

                     this.p2pGroup = "testdj";

                     this.supportRTMP = true;

                     this.supportP2P = true;

                     this.alwaysRTMP = false;

                     this.alwaysP2P = false;

                     this.ServerProxy = "best";

                     this.tokenKey = "testdj";

                     this.bufferLive = 0.5;

                     this.bufferFull = 16;

                     this.Welcome = "Welcome!";

                     this.Visitor = "1";

                     this.logout_message = "";

                     this.overLogo = "";

                     this.overLink = "";

                     if(root.loaderInfo.parameters.n)

                     {

                        this.Room = root.loaderInfo.parameters.n;

                     }

                     this.standAlone = true;

                     this.product_name = "Live Streaming";

                     this.product_side = "Video";

                     this.licenseTextfield = this.licenseMessage;

                     this.license_verified = false;

                     this.license_servers = new Array("testdj.com","ateom.com");

                     this.servers_opened = 0;

                     this.servers_tried = 0;

                     this.servers_total = this.license_servers.length;

                     this.l_url = "";

                     this.l_same = "";

                     if(root.loaderInfo.url)

                     {

                        this.l_url = root.loaderInfo.url;

                     }

                     if(root.loaderInfo.sameDomain)

                     {

                        this.l_same = root.loaderInfo.sameDomain;

                     }

                     for(this.i in this.license_servers)

                     {

                        this.try_license(this.license_servers[this.i]);

                     }

                     if(this.standAlone)

                     {

                     }

                     this.Message.htmlText = "";

                     if(this.loginMessage != null)

                     {

                        if(this.loginMessage.length > 0)

                        {

                           this.Message.htmlText = this.loginMessage;

                        }

                     }

                     if(this.whitelabel)

                     {

                        this.vwbrand.visible = false;

                        this.licenseMessage.visible = false;

                     }

                     this.request = new URLRequest(this.ws_login);

                     this.request.method = URLRequestMethod.POST;

                     this.loader = new URLLoader();

                     this.loader.dataFormat = URLLoaderDataFormat.VARIABLES;

                     this.loader.addEventListener(Event.COMPLETE,this.completeHandler);

                     this.loader.load(this.request);

                     this.setContextMenu();

              //gotoAndPlay(3);

                     stop();

                  }

                 

                  function frame3() : *

                  {

                     this.startBuffer = this.bufferLive;

                     this.loadBuffer = this.bufferFull;

                     if(this.showTitle)

                     {

                        if(this.offlineMessage)

                        {

                           this.showTitle.text = this.offlineMessage;

                        }

                     }

                     if(this.trial_ai)

                     {

                        if(this.trial_ai.length > 0)

                        {

                           this.ai = new UILoader();

                           this.ai.scaleContent = false;

                           this.ai.x = 0;

                           this.ai.y = 0;

                           this.ai.source = this.trial_ai;

                           addChild(this.ai);

                        }

                     }

                     this.logo = new UILoader();

                     addChild(this.logo);

                     if(this.logo)

                     {

                        if(this.overLogo)

                        {

                           this.logo.source = this.overLogo;

                           this.logo.scaleContent = false;

                           this.logo.addEventListener(Event.COMPLETE,this.logoLoaded);

                           if(this.overLink)

                           {

                              this.logo.addEventListener(MouseEvent.CLICK,this.logoClick);

                           }

                        }

                     }

                     this.Profile = {};

                     if(!this.showTimer)

                     {

                        this.iTimers.visible = false;

                     }

                     if(this.username == "Flash_Test" || this.username == "<?=$username?>")

                     {

                        this.Server = "rtmp://localhost/testdj";

                     }

                     this.Session = this.username;

                     this.Username = this.Session;

                     this.connection = new NetConnection();

                     this.connection.proxyType = this.ServerProxy;

                     if(this.ServerAMF)

                     {

                        switch(this.ServerAMF)

                        {

                           case "AMF0":

                              NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;

                              this.connection.objectEncoding = ObjectEncoding.AMF0;

                              break;

                           case "AMF3":

                              NetConnection.defaultObjectEncoding = ObjectEncoding.AMF3;

                              this.connection.objectEncoding = ObjectEncoding.AMF3;

                              break;

                        }

                     }

                     this.connection.connect(this.Server,this.Session);

                     this.connection.addEventListener(NetStatusEvent.NET_STATUS,this.netStatus);

                     stage.addEventListener(Event.RESIZE,this.stageResize);

                     this.stageResize(new Event(Event.RESIZE));

                     this.playingStream = 0;

                     this.sessionTime = 0;

                     this.statusTimer = new Timer(this.statusInterval);

                     this.reportTimer = new Timer(1000);

                     this.connection.client = this;

                     this.statusText = null;

                     this.verboseLevel = 0;

                     this.chat0 = null;

                     this.mediainput = {};

                     this.mediainput.camStatus = 0;

                     this.mediainput.micStatus = 0;

                     this.Manager = null;

                     this.pingTimer = new Timer(7000);

                     this.pingTimer.addEventListener("timer",this.pingServer);

                     this.pingTimer.start();

                     this.rtmfpConnection = new NetConnection();

                     if(this.supportP2P)

                     {

                        this.rtmfpConnection.addEventListener(NetStatusEvent.NET_STATUS,this.rtmfpNetStatus);

                        if(this.serverRTMFP)

                        {

                           this.rtmfpConnection.connect(this.serverRTMFP);

                        }

                     }

                     this.groupSpecifier = new GroupSpecifier(this.p2pGroup);

                     this.groupSpecifier.multicastEnabled = true;

                     this.groupSpecifier.objectReplicationEnabled = true;

                     this.groupSpecifier.postingEnabled = true;

                     this.groupSpecifier.routingEnabled = true;

                     this.groupSpecifier.serverChannelEnabled = true;

                     this.CP = {};

                     this.CP["connection"] = this.connection;

                     this.CP["forceReplay"] = false;

                     this.CP["automuteSelf"] = true;

                     this.CP["rtmfpConnection"] = this.rtmfpConnection;

                     this.CP["groupSpecifier"] = this.groupSpecifier;

                     stop();

                  }

                 

                  function frame4() : *

                  {

                     this.logoutmsg.text = this.logout_message;

                     if(this.whitelabel)

                     {

                        this.logoutBrand.visible = false;

                     }

                     stop();

                  }

               }

            }

            • 3. Re: AS compile to swf.
              Ned Murphy Adobe Community Professional & MVP

              The problem could be anywhere and it is not likely anyone is going to try to troubleshoot all that code for you.  If you get error messages then try to focus on what they say and where they point to.