diff --git a/Master.as b/Master.as index 7a7c629..2fbde18 100644 --- a/Master.as +++ b/Master.as @@ -73,7 +73,7 @@ private var tuveBW:bioWindow; private var tuveNBW:newBio; private var tuveUW:uploadWindow; - + private var tuveCW:channelWindow; /* Initialization Routine */ public function init(mO:Object):Boolean { @@ -178,6 +178,27 @@ tuveUW = null; } } /* End tuveCloseLW */ + + /* This function opens up the Channel Window */ + public function tuveShowCW():void { + if (tuveCW == null) { + tuveCW = new channelWindow(); + tuveCW.tvMaster = this; + tuveCW.x = ((masterObject.width - tuveCW.width) / 2); + tuveCW.y = ((masterObject.height - tuveCW.height) /2 ) + 12; + tuveCW.addEventListener("closeWindow",tuveCloseCW,false,0,true); + masterObject.addChild(tuveCW); + } + } /* End tuveShowCW() */ + + /* This function closes the Channel window */ + public function tuveCloseCW(event:FlexEvent):void { + if (tuveCW != null) { + masterObject.removeChild(tuveCW); + tuveCW = null; + } + } /* End tuveCloseCW */ + /* End Channel Window Functions */ public function validateNick(str:String):Boolean { var pattern:RegExp = /^[a-zA-Z0-9]*$/; diff --git a/SuperTUve.mxml b/SuperTUve.mxml index 917405b..0e2057b 100644 --- a/SuperTUve.mxml +++ b/SuperTUve.mxml @@ -77,6 +77,9 @@ case 2: tvMaster.tuveShowUW(); break; + case 3: + tvMaster.tuveShowCW(); + break; case 6: tvMaster.tuveShowBW(null); break; diff --git a/channelWindow.mxml b/channelWindow.mxml new file mode 100644 index 0000000..b0871a1 --- /dev/null +++ b/channelWindow.mxml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file