summaryrefslogtreecommitdiff
path: root/bPod/com/files/FileButton.as
diff options
context:
space:
mode:
Diffstat (limited to 'bPod/com/files/FileButton.as')
-rw-r--r--bPod/com/files/FileButton.as89
1 files changed, 89 insertions, 0 deletions
diff --git a/bPod/com/files/FileButton.as b/bPod/com/files/FileButton.as
new file mode 100644
index 0000000..f5adced
--- /dev/null
+++ b/bPod/com/files/FileButton.as
@@ -0,0 +1,89 @@
+
+import com.services.BuckyServices;
+import com.threads.ThreadButton;
+
+class com.files.FileButton extends ThreadButton {
+ private var username_mc:MovieClip;
+ private var backing:MovieClip;
+ private var initialAlpha:Number;
+
+ private function handleRollOut():Void {
+// _root.thumbnail.removeMovieClip();
+ makeBlack();
+ super.handleRollOut();
+ }
+
+ private function handleRollOver():Void {
+ super.handleRollOver();
+ if ( (itemData.filetype == "JPG") ||
+ (itemData.filetype == "GIF") ||
+ (itemData.filetype == "PNG") ) { displayImageThumbnail (BuckyServices.getThumbURL (itemData.filename));
+ makeWhite();
+ }
+ }
+
+ private function displayImageThumbnail(_inURL:String):Void {
+
+ _root.imagesHolder.thumbnail.unloadMovie();
+ _root.imagesHolder.createEmptyMovieClip ("thumbnail", _root.getNextHighestDepth());
+
+ try {
+ _root.imagesHolder.thumbnail.loadMovie (_inURL);
+ }
+
+ catch (_err:Error) {}
+
+ _root.imagesHolder.thumbnail._alpha = 50;
+
+ var j:MovieClip = _root.imagesHolder.thumbnail;
+
+ j._xscale = j._yscale = 200;
+/* j._x = (Stage.width/2 - j._width/2);
+ j._y = (Stage.height/2 - j._height/2);
+*/
+
+// _root.imagesHolder.thumbnail._xscale = _root.imagesHolder.thumbnail._yscale = 250;
+ }
+
+
+
+
+ private function makeWhite():Void {
+ title_mc.title_txt.textColor =0xFFFFFF;
+ }
+
+ private function makeBlack():Void {
+ title_mc.title_txt.textColor =0x000000;
+ }
+
+
+
+ private function makeButton(_val:Object):Void {
+ title_mc.title_txt.text = _val.filename;
+ title_mc.title_txt.autoSize = true;
+
+
+ if (title_mc._height > 28.1) {
+ title_mc.title_txt.autoSize = false;
+ title_mc.title_txt._height = 28.1;
+ }
+
+ initialAlpha = backing._alpha;
+
+ if (_val.filetype == "MP3") {
+ transformTheButtonColor();
+ }
+
+
+ title_mc._y = (_y + _height / 2) - (title_mc._height / 2) ;
+
+ // backing._height = title_mc.title_txt._height;
+
+ this.cacheAsBitmap = true;
+ super.setPosition();
+ }
+
+ private function transformTheButtonColor():Void {
+ }
+
+}; \ No newline at end of file