From 79670053c7247d3a49b607960efd284e93f057e5 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Aug 2013 17:14:26 -0500 Subject: install.pl --- bPod/com/files/FileButton.as | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 bPod/com/files/FileButton.as (limited to 'bPod/com/files/FileButton.as') 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 -- cgit v1.2.3-70-g09d2