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 +++++++++++++++++++++++++++++++++++ bPod/com/files/FileScroller.as | 15 ++++++ bPod/com/files/FileSelectionSystem.as | 19 ++++++++ 3 files changed, 123 insertions(+) create mode 100644 bPod/com/files/FileButton.as create mode 100644 bPod/com/files/FileScroller.as create mode 100644 bPod/com/files/FileSelectionSystem.as (limited to 'bPod/com/files') 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 diff --git a/bPod/com/files/FileScroller.as b/bPod/com/files/FileScroller.as new file mode 100644 index 0000000..991cf9c --- /dev/null +++ b/bPod/com/files/FileScroller.as @@ -0,0 +1,15 @@ +import com.oop.ScrollingMenuFrame; + +class com.files.FileScroller extends ScrollingMenuFrame +{ + var intRate:Number = 20; // scroller speed + + public function doLoad(_dataArray:Array):Void { + holder_mc.attachMovie("FileSelectionSystem", "files", 1000); + holder_mc["files"].doInit(_dataArray, "FileButton"); + +// holder_mc._x = 0; // use as needed! this puts the vert scroller back in view + holder_mc._y = 0; // when a keyword tile is clicked. + } + +}; \ No newline at end of file diff --git a/bPod/com/files/FileSelectionSystem.as b/bPod/com/files/FileSelectionSystem.as new file mode 100644 index 0000000..d93ea58 --- /dev/null +++ b/bPod/com/files/FileSelectionSystem.as @@ -0,0 +1,19 @@ +import com.threads.ThreadSelectionSystem; +import com.services.BuckyServices; + +class com.files.FileSelectionSystem extends ThreadSelectionSystem { + + private var itemsPerRow:Number = 1; + private var vertSpace:Number = 1; + + public function doAction():Void { + + var theItem:Object = systemData[getCurrentSelection()]; + var fileURL:String = BuckyServices.singleFilePath + theItem.filename; + + _root.debug.text = theItem.theURL; + + if (theItem.filetype == "MP3") { _root.player.init ( theItem ); } + else { getURL (theItem.theURL, "_blank"); } + } +}; \ No newline at end of file -- cgit v1.2.3-70-g09d2