summaryrefslogtreecommitdiff
path: root/bPod/com/services
diff options
context:
space:
mode:
Diffstat (limited to 'bPod/com/services')
-rw-r--r--bPod/com/services/BuckyServices.as133
1 files changed, 133 insertions, 0 deletions
diff --git a/bPod/com/services/BuckyServices.as b/bPod/com/services/BuckyServices.as
new file mode 100644
index 0000000..d2d8560
--- /dev/null
+++ b/bPod/com/services/BuckyServices.as
@@ -0,0 +1,133 @@
+
+
+class com.services.BuckyServices {
+
+ // on-stage movie clip references:
+ public static var keywordsMC:MovieClip = _root.switcher.selectionsMC.keywordsMC;
+ public static var threadsMC:MovieClip = _root.switcher.selectionsMC.threadsMC;
+ public static var filesMC:MovieClip = _root.switcher.selectionsMC.filesMC;
+
+ // scrollers for feeds
+ public static var feedThreadsMC:MovieClip = _root.switcher.selectionsMC.feedThreadsMC;
+ public static var feedItemsMC:MovieClip = _root.switcher.selectionsMC.feedItemsMC;
+
+
+ // http:// or https:// ?
+ public static var urlRoot:String;
+
+ // rss proxy processing:
+ public static var rssProxy:String = "www.carbonpictures.com/tfarnon/bucky/services/beta/buckyRSSproxy.php";
+
+ // constructors for php query strings which return lists of data
+// public static var keywords:String = "www.carbonpictures.com/tfarnon/bucky/services/beta/buckyk.php";
+ public static var keywords:String ;// = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/services_k"
+// public static var threads:String = "www.carbonpictures.com/tfarnon/bucky/services/beta/buckyth.php?k=";
+ public static var threads:String ; // = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/services_th?k=";
+// public static var files:String = "www.carbonpictures.com/tfarnon/bucky/services/beta/buckyf.php?pid=";
+ public static var files:String ; // = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/services_f?pid="
+
+// public static var tags:String;
+
+ // bucky-specific paths -- these are SET IN STONE until julian instructs otherwise
+// public static var singleFilePath:String = "www.carbonpictures.com/bucky/data/";
+ public static var singleFilePath:String ; // = "kitchenhacklab.foodhacking.com/bucky/data/";
+// public static var singleThreadPath:String = "www.carbonpictures.com/cgi-bin/bucky/details?id=";
+ public static var singleThreadPath:String ; // = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/details?id="
+
+ // repository of active (ever-changing) settings ----------------------------------
+
+ public static var activeKeyword:String; // human readable keyword name
+
+ public static var activeThread:String; // human readable thread name
+ public static var activeThreadID:Number; // bucky thread ID
+ public static var activeThreadPath:String; // full URL to active thread
+
+ public static var activeFile:String; // human readable filename
+ public static var activeFileID:Number; // bucky file ID
+ public static var activeFilePath:String; // full URL to active mp3, jpg, gif, etc.
+
+ public static var activeUserID:Number; // human readable user name
+ public static var activeUserName:String; // bucky user ID
+
+ // end repository -----------------------------------------------------------------
+
+
+ public function BuckyServices() {}
+
+ public static function init():Void
+ {
+ var u:String = _url.slice (4,5);
+
+ switch ( u ) { case ":" : urlRoot = "http://"; break;
+ case "s" : urlRoot = "https://"; break;
+ }
+
+ _root.debug.text = urlRoot + _root.keywords;
+
+ // these variables now magially come to us via the
+ // SWFObject html, instead of being hardcoded
+ // inside a flash movie
+
+// if (_root.keywords != undefined )
+// {
+ keywords = urlRoot + _root.keywords;
+ threads = urlRoot + _root.threads;
+ files = urlRoot + _root.files;
+ singleFilePath = urlRoot + _root.singleFilePath;
+ singleThreadPath = urlRoot + _root.singleThreadPath;
+ rssProxy = urlRoot + rssProxy;
+
+/* }
+ else
+ {
+*/
+/* keywords = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/services_k"
+ threads = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/services_f?pid="
+ files = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/services_th?k="
+ singleFilePath = "kitchenhacklab.foodhacking.com/bucky/data/"
+ singleThreadPath = "kitchenhacklab.foodhacking.com/cgi-bin/bucky/details?id="
+ rssProxy = urlRoot + rssProxy;
+
+ }
+*/
+ }
+
+ public static function setActiveKeyword (_inObj:Object):Void {
+ activeKeyword = _inObj.name;
+ _root.debug.text += "\nKEYWORD: " + activeKeyword;
+
+ }
+
+
+ public static function setActiveThread (_inObj:Object):Void {
+ activeThread = _inObj.name;
+ activeThreadID = _inObj.id;
+ activeThreadPath = singleThreadPath + activeThreadID;
+ _root.debug.text += "\nTHREAD:" + activeThread;
+ }
+
+ public static function setActiveFile (_inObj:Object):Void {
+ activeFile = _inObj.filename;
+ activeFilePath = urlRoot + singleFilePath + activeFile;
+ _root.debug.text += "\nFILE: " + activeFilePath;
+ }
+
+ public static function setActiveUserID (_inNumber:Number):Void {
+ activeUserID = _inNumber;
+ _root.debug.text += "\n" + activeUserID;
+ }
+
+ public static function setActiveUserName (_inString:String):Void {
+ activeUserName = _inString;
+ }
+
+ public static function getThumbURL (_inName:String):String {
+
+ return ( singleFilePath + activeThreadID + "/.thumb/b." + _inName );
+ //"www.carbonpictures.com/bucky/data/" +
+
+
+ }
+
+
+}; \ No newline at end of file