forked from: forked from: forked from: forked from: forked from: forked from: forked from: forked from: flash on 2009-10-7

by hacker_o5nv66b6 forked from forked from: forked from: forked from: forked from: forked from: forked from: forked from: flash on 2009-10-7 (diff: 18)
♥0 | Line 105 | Modified 2009-10-07 18:52:06 | MIT License
play

ActionScript3 source code

/**
 * Copyright hacker_o5nv66b6 ( http://wonderfl.net/user/hacker_o5nv66b6 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/xp5f
 */

// forked from hacker_o5nv66b6's forked from: forked from: forked from: forked from: forked from: forked from: forked from: flash on 2009-10-7
// forked from hacker_o5nv66b6's forked from: forked from: forked from: forked from: forked from: forked from: flash on 2009-10-7
// forked from hacker_o5nv66b6's forked from: forked from: forked from: forked from: forked from: flash on 2009-10-7
// forked from hacker_o5nv66b6's forked from: forked from: forked from: forked from: flash on 2009-10-7
// forked from hacker_o5nv66b6's forked from: forked from: forked from: flash on 2009-10-7
// forked from hacker_o5nv66b6's forked from: forked from: flash on 2009-10-7
// forked from hacker_o5nv66b6's forked from: flash on 2009-10-7
// forked from hacker_o5nv66b6's flash on 2009-10-7
 package 
{
	import flash.text.*;
	import flash.geom.*;
	import flash.display.*;
	import flash.filters.*;
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.net.URLVariables;
	import flash.events.MouseEvent;
	import fl.transitions.Tween;  
	import fl.transitions.easing.*;  
	import jp.progression.*;
	import jp.progression.config.*;
	import jp.progression.debug.*;
	import jp.progression.events.*;
	import caurina.transitions.Tweener;
	import com.actionscriptbible.Example;
	import flash.display.MovieClip;
	import flash.text.TextFormat;
	import flash.text.TextField;
	import flash.events.*;
	import flash.system.Security;
	import flash.filters.*;
	import flash.utils.*

	public class Index extends Sprite 
	{
		/************************************* 
		基本情報 
		*************************************/  
		public var drawPos:Sprite=new Sprite()
		public var myXML:XML;  
		public var xmlPath:String = "http://www.dear-webdesign.com/fla/090410/thumb.xml";  
		public var xmlLoader:URLLoader = new URLLoader(new URLRequest(xmlPath));  
		public var loader:Loader;  
		public var imgNum:uint = 4;  
private var _textField:TextField;
		/************************************* 
		配列 
		*************************************/  
		public var mainFld:Array = new Array();  
		public var thumbFld:Array = new Array();  

		public function Index():void 
		{
		 //xmlLoader.addEventListener(Event.COMPLETE, setXmlLoad);  
			startThumb();  
			startMain();  
		}
		public function startThumb():void
		{

			for(var i:uint = 0; i <= imgNum - 1; i++)
			{
				loader = new Loader();  
				thumbFld.push(loader);  
				var u:uint = i + 1;
				thumbFld[i].load(new URLRequest("http://www.dear-webdesign.com/fla/090410/img/thumb0" + u + ".png"));
			}
			setThumbImg();  
		}
		public function startMain():void
		{
			for(var i:uint = 0; i <= imgNum - 1; i++)
			{
				loader = new Loader();  
				mainFld.push(loader);  
			}
		}
		public function setThumbImg():void
		{
			for(var i:uint = 0; i <= imgNum - 1; i++)
			{
				thumbFld[i].x = 120 * (i % 6);
				thumbFld[i].y = (77) * Math.round(i / 6 -0.5) + 320;
				addChild(thumbFld[i]);  
				buttonMode = true;  
				mouseChildren = false;  
				addEventListener(MouseEvent.CLICK, setThumbClick);  
			}
		}
		private function setThumbClick(e:MouseEvent):void 
		{
			setAction(e.target);  
					    _textField = new TextField();
			_textField.appendText("aaaaa");
            _textField.width = 465;
            _textField.height = 465;
            _textField.wordWrap = true;
            _textField.selectable = true;
            _textField.multiline = true;
			addChild(_textField);
		}
		//
		public function setAction(obj:Object):void
		{
			var targetNum:uint = obj.name.substr(-1, 1) ;  
			var targetMain:String = "load0" + targetNum;  
		    _textField = new TextField();
			_textField.appendText("http://www.dear-webdesign.com/fla/090410/img/thumb0" + targetNum + ".png" + "\n\n");
            mainFld[targetNum - 1].load(new URLRequest("http://www.dear-webdesign.com/fla/090410/img/sample0" + targetNum + ".png"));  
            _textField.width = 465;
            _textField.height = 465;
            _textField.wordWrap = true;
            _textField.selectable = true;
            _textField.multiline = true;
			addChild(_textField);
			var myTween:Tween;
			myTween = new Tween(getChildByName(targetMain), "alpha", None.easeOut, 0, 1, 0.3, true);  
			setChildIndex(getChildByName(targetMain), (numChildren - 1));  
			this["container"]["load0" + targetNum].addChild(mainFld[targetNum - 1]);  
		}       
	}
}

Forked