<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>ウェ部ログ２</title>
      <link>http://webu.org/blog2/</link>
      <description>flash as3 pv3d box2dなどの勉強・メモ。　ほんとにメモです。</description>
      <language>ja</language>
      <copyright>Copyright 2012</copyright>
      <lastBuildDate>Fri, 09 Mar 2012 15:49:51 +0900</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=3.36</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
         <title>ng wordチェック</title>
         <description>		public function isNGWord( word:String ):Boolean{
			
			var ngword:Array = [&quot;unko&quot;,&quot;chinko&quot;];	
			
			//検索ワードにNGワードが含まれるか検索
			var reg:RegExp = null;
			var len:uint = ngword.length;
			for( var i:uint=0; i&lt;len; i++ ){
				if( ( new RegExp( ngword[i], &quot;gix&quot; ) ).test( word ) ){
					return true;
				}
			}
			
			return false;
		}</description>
         <link>http://webu.org/blog2/2012/03/ng_word.html</link>
         <guid>http://webu.org/blog2/2012/03/ng_word.html</guid>
         <category></category>
         <pubDate>Fri, 09 Mar 2012 15:49:51 +0900</pubDate>
      </item>
      
      <item>
         <title>ustream memo</title>
         <description>		public function initialize(id:String=&quot;8439142&quot;,password:String=&quot;&quot;):void {
			_log.debug(&quot;initialzie&quot;);
			this.visible = true;
			_id = id;
			_password = password;

				
			setChildIndex(mc, numChildren - 1);
			
			var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
			_loader = new Loader();
			_loader.contentLoaderInfo.addEventListener(&apos;complete&apos;, onLoaded);
			_loader.load(new URLRequest(&quot;http://www.ustream.tv/flash/viewer.rsl.swf&quot;), context );
	
		}
		
		
		private function onLoaded(e:Event=null):void
		{
			_log.debug(&quot;onLoaded&quot;);
			(_loader.contentLoaderInfo.applicationDomain.getDefinition(&quot;tv.ustream.localization.Locale&quot;)).nameSpace = &quot;flash.viewer&quot;;
			
			_loader.contentLoaderInfo.removeEventListener(&apos;complete&apos;, onLoaded);
			var Cls:* = _loader.contentLoaderInfo.applicationDomain.getDefinition(&quot;tv.ustream.viewer.logic.Logic&quot;)
			_logic = new Cls();
			_logic.addEventListener( &quot;createChannel&quot;, onCreateChannel, false, 0, true );
			_channel = _logic.createChannel(_id, true, _password);
				
		}</description>
         <link>http://webu.org/blog2/2012/01/ustream_memo.html</link>
         <guid>http://webu.org/blog2/2012/01/ustream_memo.html</guid>
         <category>ustream</category>
         <pubDate>Mon, 23 Jan 2012 21:22:28 +0900</pubDate>
      </item>
      
      <item>
         <title>singleton</title>
         <description>function DataManager() {
	if (__instance) { throw new ArgumentError(&quot;&quot;); }
}
		
public static var __instance:DataManager;
public static function getInstance():DataManager {
		if ( __instance === null ) {
			__instance = new DataManager;
			
		}
		return __instance;
}
</description>
         <link>http://webu.org/blog2/2012/01/singleton_1.html</link>
         <guid>http://webu.org/blog2/2012/01/singleton_1.html</guid>
         <category>as3</category>
         <pubDate>Thu, 19 Jan 2012 20:30:12 +0900</pubDate>
      </item>
      
      <item>
         <title>airでBitmapDataの保存</title>
         <description>			var pngSource:BitmapData = new BitmapData (stage.stageWidth, stage.stageHeight);
			pngSource.draw(stage);
			var ba:ByteArray = PNGEncoder.encode(pngSource);
			
			var dir:File = File.desktopDirectory.resolvePath(&quot;AIR_Test/hoge&quot;); 
			dir.createDirectory(); 
			
			var file:File = dir.resolvePath(&quot;test.png&quot;);
			var fileStream:FileStream = new FileStream();
			fileStream.open(file, FileMode.WRITE);
			fileStream.writeBytes(ba);
			fileStream.close();</description>
         <link>http://webu.org/blog2/2012/01/airbitmapdata.html</link>
         <guid>http://webu.org/blog2/2012/01/airbitmapdata.html</guid>
         <category>air</category>
         <pubDate>Tue, 17 Jan 2012 14:17:17 +0900</pubDate>
      </item>
      
      <item>
         <title>countDown</title>
         <description>package 
{
	/**
	 * ...
	 * @author watanab
	 */
	public class CountDown
	{
		
		public var days:Number = 0;
		public var hours:Number = 0;
		public var min:Number = 0;
		public var sec:Number = 0;
		
		
		public function CountDown()
		{
			
		}
		
		public static function getSabun(
			today:Date, targetDate:Date
		):CountDown {

			var currentYear:Number = today.getFullYear();
			var currentTime:Number = today.getTime();
			var targetTime:Number = targetDate.getTime();

			//Determines how much time is left.  Note: Leaves time in milliseconds

			var timeLeft:Number = targetTime - currentTime;

			var sec		:Number = Math.floor(timeLeft/1000);
			var min		:Number = Math.floor(sec/60);
			var hours	:Number = Math.floor(min/60);
			var days	:Number = Math.floor(hours/24);

			var cd:CountDown = new CountDown();
			cd.days = days;
			cd.sec = (sec % 60);
			cd.min = (min % 60);
			cd.hours = (hours % 24);
			
			return cd;
		}
		
		
	}

}
</description>
         <link>http://webu.org/blog2/2012/01/countdown.html</link>
         <guid>http://webu.org/blog2/2012/01/countdown.html</guid>
         <category>as3</category>
         <pubDate>Thu, 05 Jan 2012 21:00:05 +0900</pubDate>
      </item>
      
      <item>
         <title>localconnection使い方</title>
         <description>おくる
--------------------------------------
_connecter = new LocalConnection();
_connecter.addEventListener(StatusEvent.STATUS, onStatus);
_connecter.send(&quot;key&quot;, &quot;method_name&quot;, param);

        private function onStatus(event:StatusEvent):void {
			trace(event.level);
            switch (event.level) {
                case &quot;status&quot;:
			_connecter.close();
			//せいこう
                    break;
                case &quot;error&quot;:

                    break;
            }
        }

---------------------------------------
うける
---------------------------------------
_connecter = new LocalConnection();
_connecter.client = this;
_connecter.allowDomain(&quot;*&quot;);
_connecter.connect(&quot;key&quot;);	
			
		public function sendData(param):void{
			
			
			
		}
		











</description>
         <link>http://webu.org/blog2/2011/12/localconnection.html</link>
         <guid>http://webu.org/blog2/2011/12/localconnection.html</guid>
         <category>as3</category>
         <pubDate>Wed, 14 Dec 2011 11:50:37 +0900</pubDate>
      </item>
      
      <item>
         <title>flv memo</title>
         <description>http://www.publicroots.com/fmt/archives/000187.html</description>
         <link>http://webu.org/blog2/2011/12/flv_memo.html</link>
         <guid>http://webu.org/blog2/2011/12/flv_memo.html</guid>
         <category>as3</category>
         <pubDate>Mon, 05 Dec 2011 19:02:25 +0900</pubDate>
      </item>
      
      <item>
         <title>swfobject</title>
         <description>var swfName=&quot;main.swf&quot;;
var vars = {
	test	:&quot;testtest&quot;
};
if (swfobject.getQueryParamValue(&quot;mid&quot;)) {
	vars.mid = swfobject.getQueryParamValue(&quot;mid&quot;);
};
			
			var params = {
				wmode:wmode,
				bgcolor:&quot;#000000&quot;,
				allowfullscreen:&quot;true&quot;,
				allowScriptAccess:&quot;always&quot;,
				menu:&quot;false&quot;
			};
			
			var attributes = { id:&quot;flashContent&quot;, name:&quot;flashContent&quot; };
			swfobject.embedSWF(swfName, divName, ww, hh, &quot;10&quot;, &quot;&quot;, vars, params, attributes);</description>
         <link>http://webu.org/blog2/2011/11/swfobject.html</link>
         <guid>http://webu.org/blog2/2011/11/swfobject.html</guid>
         <category>as3</category>
         <pubDate>Wed, 23 Nov 2011 22:42:53 +0900</pubDate>
      </item>
      
      <item>
         <title>配列をランダムに入れ替え</title>
         <description>			for (var i: int = 0; i &lt;  ary.length;  i++) {
				
				var idx1	:int = Math.floor( Math.random() * ary.length );
				var idx2	:int = Math.floor( Math.random() * ary.length );
				
				var tmp:* = ary[idx1];
				ary[idx1] = ary[idx2];
				ary[idx2] = tmp;
				
			}</description>
         <link>http://webu.org/blog2/2011/11/post_106.html</link>
         <guid>http://webu.org/blog2/2011/11/post_106.html</guid>
         <category>as3</category>
         <pubDate>Tue, 22 Nov 2011 16:09:09 +0900</pubDate>
      </item>
      
      <item>
         <title>弧の表示</title>
         <description>		public static function drawLine(g:Graphics, radius:Number, arc:Number) {
			
			var startAngle:Number = 0;
			var x:Number = 0;
			var y:Number = 0;
			
			x+=radius;

			g.moveTo(x, y);
			//arc = arc % 360;
			arc=(arc&gt;360) ? 360 : arc;
			var segs = Math.ceil(Math.abs(arc)/45);
			var segAngle = arc/segs;
			var theta = -(segAngle/180)*Math.PI;
			var angle = -(startAngle/180)*Math.PI;
			var ax = x - Math.cos(angle)*radius;
			var ay = y - Math.sin(angle) * radius;
			
			if (segs&gt;0) {
				for (var i = 0; i&lt;segs; i++) {
					angle += theta;
					var angleMid = angle-(theta/2);
					var bx = ax+Math.cos(angle)*radius;
					var by = ay+Math.sin(angle)*radius;
					var cx = ax+Math.cos(angleMid)*(radius/Math.cos(theta/2));
					var cy = ay+Math.sin(angleMid)*(radius/Math.cos(theta/2));
					g.curveTo(cx, cy, bx, by);
				}
			
			}
			
			g.lineTo(x-radius,y);
		}</description>
         <link>http://webu.org/blog2/2011/10/post_105.html</link>
         <guid>http://webu.org/blog2/2011/10/post_105.html</guid>
         <category>as3</category>
         <pubDate>Tue, 25 Oct 2011 21:37:03 +0900</pubDate>
      </item>
      
      <item>
         <title>log10</title>
         <description>log10(x) = Math.log(x) * (Math.LOG10E)

http://www.geisya.or.jp/~mwm48961/kou2/log2.html
より</description>
         <link>http://webu.org/blog2/2011/10/log10.html</link>
         <guid>http://webu.org/blog2/2011/10/log10.html</guid>
         <category>as3</category>
         <pubDate>Wed, 19 Oct 2011 00:29:50 +0900</pubDate>
      </item>
      
      <item>
         <title>Markerをつける</title>
         <description>	
				var latLng:LatLng
				var option:MarkerOptions = new MarkerOptions({
					icon: mc,
					hasShadow: false,
					clickable: false,
					draggable: false
				});
				
					var marker:Marker = new Marker(latLng, option);
					_map.addOverlay( marker );</description>
         <link>http://webu.org/blog2/2011/10/marker.html</link>
         <guid>http://webu.org/blog2/2011/10/marker.html</guid>
         <category>googlemaps</category>
         <pubDate>Fri, 14 Oct 2011 19:19:00 +0900</pubDate>
      </item>
      
      <item>
         <title>そのラベルを持っているか。</title>
         <description>		private function _hasLabel(label:String):Boolean {
			
			for each(var frameLabel:FrameLabel in this.currentLabels) {
				if (frameLabel.name == label) return true;
			}
			return false;
		}</description>
         <link>http://webu.org/blog2/2011/10/post_104.html</link>
         <guid>http://webu.org/blog2/2011/10/post_104.html</guid>
         <category>as3</category>
         <pubDate>Wed, 12 Oct 2011 15:00:08 +0900</pubDate>
      </item>
      
      <item>
         <title>addCommas 数字にコンマをつける</title>
         <description>http://www.cgiinteractive.com/blog/2009/05/formatting-numbers-with-commas-in-as3/</description>
         <link>http://webu.org/blog2/2011/09/addcommas.html</link>
         <guid>http://webu.org/blog2/2011/09/addcommas.html</guid>
         <category>as3</category>
         <pubDate>Wed, 28 Sep 2011 23:40:11 +0900</pubDate>
      </item>
      
      <item>
         <title>中心極限定理</title>
         <description>(Math.random()+Math.random()+Math.random()/3

とかすると、

0.5を中心としたガウス分布に近づいていく。</description>
         <link>http://webu.org/blog2/2011/09/post_103.html</link>
         <guid>http://webu.org/blog2/2011/09/post_103.html</guid>
         <category>as3</category>
         <pubDate>Fri, 16 Sep 2011 18:51:10 +0900</pubDate>
      </item>
      
   </channel>
</rss>

