diff --git a/Master.as b/Master.as
index 2fbde18..3be495f 100644
--- a/Master.as
+++ b/Master.as
@@ -9,25 +9,12 @@
***************************************************************/
package {
-
import flash.net.NetConnection;
import mx.collections.ArrayCollection;
import mx.events.FlexEvent;
- //import flash.media.*;
- //import mx.core.UIComponent;
- //import flash.net.ObjectEncoding;
- //import flash.events.NetStatusEvent;
- //import flash.events.SecurityErrorEvent;
- //import flash.events.AsyncErrorEvent;
- //import flash.net.SharedObject;
- //import mx.formatters.NumberFormatter;
- //import flash.system.System;
- //import mx.controls.TextArea;
-
- public class Master {
-
+ public class Master {
/* Variables */
public var gateway:NetConnection; // AMF Gateway
public var masterObject:Object; // Parent reference
@@ -74,17 +61,17 @@
private var tuveNBW:newBio;
private var tuveUW:uploadWindow;
private var tuveCW:channelWindow;
+ private var tuveRW:registerWindow;
/* Initialization Routine */
public function init(mO:Object):Boolean {
-
/* Set Master Object */
masterObject = mO;
-
+
/* Initialize the AMF gateway */
gateway = new NetConnection();
gateway.connect("/amfphp/gateway.php");
-
+
return(true);
} /* End init */
@@ -93,9 +80,19 @@
//Alert.show("Error: " + fault.toString());
trace(fault);
}
+
+ public function validateNick(str:String):Boolean {
+ var pattern:RegExp = /^[a-zA-Z0-9]*$/;
+ var result:Object = pattern.exec(str);
+ if (result == null) {
+ return false;
+ }
+ return true;
+ }
- /* Video Window Functions */
-
+ /**************************
+ * Video Functions *
+ **************************/
/* This function opens up the video window */
public function tuveShowVW():void {
if (tuveVW == null) {
@@ -106,17 +103,39 @@
tuveVW.addEventListener("closeWindow",tuveCloseVW,false,0,true);
masterObject.addChild(tuveVW);
}
- } /* End tuveShowLW() */
-
+ } /* End tuveShowVW() */
/* This function closes the channel list window */
public function tuveCloseVW(event:FlexEvent):void {
if (tuveVW != null) {
masterObject.removeChild(tuveVW);
tuveVW = null;
}
- } /* End tuveCloseLW */
- /* End Video Window Functions */
+ } /* End tuveCloseVW */
+ public function tuveShowUW():void {
+ if (tuveUW == null) {
+ tuveUW = new uploadWindow();
+ tuveUW.tvMaster = this;
+ tuveUW.x = ((masterObject.width - tuveUW.width) / 2);
+ tuveUW.y = ((masterObject.height - tuveUW.height) /2 ) + 12;
+ tuveUW.addEventListener("closeWindow",tuveCloseUW,false,0,true);
+ masterObject.addChild(tuveUW);
+ }
+ } /* End tuveShowCW() */
+ /* This function closes the register window */
+ public function tuveCloseUW(event:FlexEvent):void {
+ if (tuveUW != null) {
+ masterObject.removeChild(tuveUW);
+ tuveUW = null;
+ }
+ } /* End tuveCloseUW */
+ /***********************
+ * End Video Functions *
+ ***********************/
+
+ /**************************
+ * Bio Functions *
+ **************************/
/* This function opens up the bio window */
public function tuveShowBW(artist:String):void {
if (tuveBW == null) {
@@ -132,17 +151,15 @@
tuveBW.bioData = artist;
tuveBW.findBio();
}
- } /* End tuveShowBW() */
-
- /* This function closes the channel list window */
+ } /* End tuveShowBW() */
+ /* This function closes the bio window */
public function tuveCloseBW(event:FlexEvent):void {
if (tuveBW != null) {
masterObject.removeChild(tuveBW);
tuveBW = null;
}
- } /* End tuveCloseLW */
- /* End bio Window Functions */
-
+ } /* End tuveCloseBW */
+
public function tuveShowNBW():void {
if (tuveNBW == null) {
tuveNBW = new newBio();
@@ -152,34 +169,19 @@
masterObject.addChild(tuveNBW);
}
- } /* End tuveShowNBW() */
-
+ } /* End tuveShowNBW() */
public function tuveCloseNBW():void {
if (tuveNBW != null) {
masterObject.removeChild(tuveNBW);
tuveNBW = null;
}
- } /* End tuveCloseLW */
-
- public function tuveShowUW():void {
- if (tuveUW == null) {
- tuveUW = new uploadWindow();
- tuveUW.tvMaster = this;
- tuveUW.x = ((masterObject.width - tuveUW.width) / 2);
- tuveUW.y = ((masterObject.height - tuveUW.height) /2 ) + 12;
- tuveUW.addEventListener("closeWindow",tuveCloseUW,false,0,true);
- masterObject.addChild(tuveUW);
- }
- } /* End tuveShowNBW() */
-
- public function tuveCloseUW(event:FlexEvent):void {
- if (tuveUW != null) {
- masterObject.removeChild(tuveUW);
- tuveUW = null;
- }
- } /* End tuveCloseLW */
-
- /* This function opens up the Channel Window */
+ } /* End tuveCloseNBW */
+ /***************************
+ * End Bio Functions *
+ ***************************/
+ /***************************
+ * Channel Functions *
+ ***************************/
public function tuveShowCW():void {
if (tuveCW == null) {
tuveCW = new channelWindow();
@@ -190,7 +192,6 @@
masterObject.addChild(tuveCW);
}
} /* End tuveShowCW() */
-
/* This function closes the Channel window */
public function tuveCloseCW(event:FlexEvent):void {
if (tuveCW != null) {
@@ -198,17 +199,27 @@
tuveCW = null;
}
} /* End tuveCloseCW */
- /* End Channel Window Functions */
-
- public function validateNick(str:String):Boolean {
- var pattern:RegExp = /^[a-zA-Z0-9]*$/;
- var result:Object = pattern.exec(str);
- if(result == null) {
- return false;
- }
- return true;
+
+ public function tuveShowRW():void {
+ if (tuveRW == null) {
+ tuveRW = new registerWindow();
+ tuveRW.tvMaster = this;
+ tuveRW.x = ((masterObject.width - tuveRW.width) / 2);
+ tuveRW.y = ((masterObject.height - tuveRW.height) /2 ) + 12;
+ tuveRW.addEventListener("closeWindow",tuveCloseRW,false,0,true);
+ masterObject.addChild(tuveRW);
+ }
+ } /* End tuveShowCW() */
+ /* This function closes the register window */
+ public function tuveCloseRW(event:FlexEvent):void {
+ if (tuveRW != null) {
+ masterObject.removeChild(tuveRW);
+ tuveRW = null;
}
-
+ } /* End tuveCloseRW */
+ /*******************************
+ * End Channel Functions *
+ *******************************/
} /* End Master */
} /* End package */
\ No newline at end of file
diff --git a/SuperTUve.mxml b/SuperTUve.mxml
index 0e2057b..161d79c 100644
--- a/SuperTUve.mxml
+++ b/SuperTUve.mxml
@@ -1,11 +1,12 @@
-
+
+ ]]>
-
-
diff --git a/registerWindow.mxml b/registerWindow.mxml
new file mode 100644
index 0000000..154b413
--- /dev/null
+++ b/registerWindow.mxml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file