/** * Copyright (c) 2009 apdevblog.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.apdevblog.examples.indexhibit.ui { import com.apdevblog.examples.indexhibit.SimpleExample; import com.apdevblog.examples.indexhibit.model.vo.ImageVo; import flash.display.Loader; import flash.display.LoaderInfo; import flash.display.MovieClip; import flash.display.SimpleButton; import flash.events.Event; import flash.events.MouseEvent; import flash.filters.DropShadowFilter; import flash.net.URLRequest; import flash.text.TextField; /** * Class to extend the functionality of the timeline based * exhibit movieclip in the FLA's library. * * @playerversion Flash 9 * @langversion 3.0 * * @package com.apdevblog.examples.indexhibit.ui * @author Philipp Kyeck / phil[at]apdevblog.com * @copyright 2009 apdevblog.com * @version 0.1 */ public class Exhibit extends MovieClip { public var headline:TextField; public var details:TextField; public var bg:MovieClip; public var drag:SimpleButton; public var details_btn:SimpleButton; public var detailsClose_btn:SimpleButton; public var maskContent:MovieClip; // public var img0:MovieClip; public var img1:MovieClip; public var img2:MovieClip; public var img3:MovieClip; /** * */ public function Exhibit() { // stop mc from playing any further stop(); // add listener addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true); details_btn.addEventListener(MouseEvent.CLICK, onOpenDetails, false, 0, true); // add dropshadow filters = [new DropShadowFilter(4, 45, 0x000000, 1, 12, 12, 0.15)]; } public function setImages(images:Array):void { if(images == null) { return; } var len:int = Math.min(images.length, 4); for(var i:int=0;i