<?xml version="1.0" encoding="UTF-8"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><![CDATA[小宝游戏]]></title>
  <subtitle type="html"><![CDATA[专注FLASH开发!]]></subtitle>
  <id>http://71mao.com/</id>
  <link rel="alternate" type="text/html" href="http://71mao.com/" /> 
  <link rel="self" type="application/atom+xml" href="http://71mao.com/atom.asp" /> 
  <generator uri="http://www.pjhome.net/" version="2.8">PJBlog3</generator> 
  <updated>2009-11-21T23:35:00+08:00</updated>

  <entry>
	  <title type="html"><![CDATA[Amf数据分析]]></title>
	  <author>
		 <name>c</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=3" label="Flash Game" /> 
	  <updated>2009-11-21T23:35:00+08:00</updated>
	  <published>2009-11-21T23:35:00+08:00</published>
		  <summary type="html"><![CDATA[<p>前段时间分析了一个网页游戏,美术风格类似梦幻西游,是外包的。分析代码得知，客户端资源做了一些特殊处理，是用通过netconnection发过来的decode的swf来解资源,本地是无缓存，存在内存中,自己如果用模拟的客户端去连服务器, 接受的是只是一个zip压缩的png文件,wpe抓包如下：</p>
<p><img alt="" src="http://71mao.com/attachments/month_0911/d20091121232825.jpg" /></p>
<p>看来做了域限制！用原客户端连服务器发的才是真实的decode的swf，一时找不到很好的内存读取工具，.只得用wpe抓包去分析amf3数据了，数据封包图如下：</p>
<p><img alt="" src="http://71mao.com/attachments/month_0911/b2009112203657.jpg" /></p>
<p>现RTMP协议，amf0~3数据格式已开源，不难看出找个核心的数据包：</p>
<p><strong>数据包协议头12字节<br />
</strong>03表示12字节头,channelid=3,这个是Invoke通道,NetConnection.Call()&nbsp;是用的找个通道，调用的方法在下面。<br />
00 00 00表示时间戳 Timmer=0<br />
00 31 D9表示数据大小 AMFSize=12761<br />
14表示数据包类型 AMFType=Invoke 方法调用<br />
00 00 00 00 表示StreamID = 0&nbsp;音视频流的ID<br />
<strong>AMF数据</strong><br />
02表示String<br />
0008表示String长度8<br />
6F 6E 42 57 44 6F 6E 65&nbsp; 是String的值onBWDone<br />
00表示Double<br />
40 00 00 00 00 00 00 00 表示double的<br />
05表示 null<br />
0a表示 ARRAY<br />
00 00 05 87 数组长度1415<br />
之后的就是数组里的数据，就是decode的swf数据文件.但这个只是amf序列化字节，还要转化,下面以如何得到arr[0]的值为例分析：<br />
00&nbsp;表示Double<br />
40 5e 00 00 00 00 00 00 是表示在网络中的字节循序的（符号位在低存储）8字节的IEEE-754双精度浮点数，<br />
那么读的时候就到过来，00 00 00 00 00 00 5e&nbsp;40。java转换代码如下：<br />
public static void main(String[] args) {<br />
&nbsp;&nbsp;byte[] b = new byte[8];<br />
&nbsp;&nbsp;b[0] = 0x00;<br />
&nbsp;&nbsp;b[1] = 0x00;<br />
&nbsp;&nbsp;b[2] = 0x00;<br />
&nbsp;&nbsp;b[3] = 0x00;<br />
&nbsp;&nbsp;b[4] = 0x00;<br />
&nbsp;&nbsp;b[5] = 0x00;<br />
&nbsp;&nbsp;b[6] = 0x5e;<br />
&nbsp;&nbsp;b[7] = 0x40;<br />
&nbsp;&nbsp;System.out.println(byteToDouble(b));<br />
&nbsp;}<br />
//bye转double<br />
public static double byteToDouble(byte[] b){<br />
&nbsp;&nbsp;&nbsp;&nbsp; long l;<br />
&nbsp;&nbsp;&nbsp;&nbsp; l=b[0];<br />
&nbsp;&nbsp;&nbsp;&nbsp; l&amp;=0xff;<br />
&nbsp;&nbsp;&nbsp;&nbsp; l|=((long)b[1]&lt;&lt;8);<br />
&nbsp;&nbsp;&nbsp;&nbsp; l&amp;=0xffff;<br />
&nbsp;&nbsp;&nbsp;&nbsp; l|=((long)b[2]&lt;&lt;16);<br />
&nbsp;&nbsp;&nbsp;&nbsp; l&amp;=0xffffff;<br />
&nbsp;&nbsp;&nbsp;&nbsp; l|=((long)b[3]&lt;&lt;24);<br />
&nbsp;&nbsp;&nbsp;&nbsp; l&amp;=0xffffffff;<br />
&nbsp;&nbsp;&nbsp;&nbsp; l|=((long)b[4]&lt;&lt;32);<br />
&nbsp;&nbsp;&nbsp;&nbsp; l&amp;=0xffffffffffl;<br />
&nbsp;&nbsp;&nbsp;&nbsp; l|=((long)b[5]&lt;&lt;40);<br />
&nbsp;&nbsp;&nbsp;&nbsp; l&amp;=0xffffffffffffl;<br />
&nbsp;&nbsp;&nbsp;&nbsp; l|=((long)b[6]&lt;&lt;48);<br />
&nbsp;&nbsp;&nbsp;&nbsp; l|=((long)b[7]&lt;&lt;56);<br />
&nbsp;&nbsp;&nbsp;&nbsp; return Double.longBitsToDouble(l);<br />
&nbsp;&nbsp; }</p>
<p>//当然用这个方法也可以验证一下数据<br />
public static byte[] doubleToByte(double d){<br />
&nbsp;&nbsp;&nbsp;&nbsp; byte[] b=new byte[8];<br />
&nbsp;&nbsp;&nbsp;&nbsp; long l=Double.doubleToLongBits(d);<br />
&nbsp;&nbsp;&nbsp;&nbsp; for(int i=0;i&lt;b.length;i++){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b[i]=new Long(l).byteValue();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; l=l&gt;&gt;8;<br />
&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp; return b;<br />
&nbsp; }</p>
<p>如此读1415个double数，得到一个byte[]转为bytearray,uncompress之，得到可以解文件的swf&nbsp;.<br />
注意后续的字节，分了很多个包，用wpe封包后，凑一个完整的包，再读！<br />
&nbsp;</p>
<p><strong>资料<br />
<a target="_blank" href="http://download.macromedia.com/pub/labs/amf/amf3_spec_121207.pdf">Amf数据格式</a><br />
<a target="_blank" href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/200901/012009RTMP.html">RTMP协议</a></strong></p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/83.htm" /> 
	  <id>http://71mao.com/default.asp?id=83</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[天书多语言版本]]></title>
	  <author>
		 <name>c</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=3" label="Flash Game" /> 
	  <updated>2009-10-16T10:11:32+08:00</updated>
	  <published>2009-10-16T10:11:32+08:00</published>
		  <summary type="html"><![CDATA[<p>简体中文版:<a target="_blank" href="http://t.mop.com">http://t.mop.com</a><br />
英文版:<a target="_blank" href="http://neverland.hithere.com/">http://neverland.hithere.com/</a><br />
港/澳/台/新/马版:<a target="_blank" href="https://member.runup.com.hk/">https://member.runup.com.hk/</a></p>
<p>更多版本敬请期待.......</p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/82.htm" /> 
	  <id>http://71mao.com/default.asp?id=82</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Flex Builder 3使用air 1.5记录]]></title>
	  <author>
		 <name>c</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=10" label="Air" /> 
	  <updated>2009-09-01T18:53:02+08:00</updated>
	  <published>2009-09-01T18:53:02+08:00</published>
		  <summary type="html"><![CDATA[<p>在Flex Builder3下使用建air项目使用flash builder下的sdk 4,<br />
F11报错<br />
VerifyError: Error #1053: Illegal override of scaleZ in mx.core.UIComponent. at flash.display::MovieClip/nextFrame() ..... <br />
解决方法：<br />
1.将项目根目录下的xxx-app.xml的第二行xmlns=&quot;http://ns.adobe.com/air/application/1.0&quot; 改为 xmlns=&quot;http://ns.adobe.com/air/application/1.5&quot;<br />
2.将.actionScriptProperties中的htmlPlayerVersion=&quot;9.0.28&quot;改为htmlPlayerVersion=&quot;10.0.0&quot;,并设置为只读</p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/81.htm" /> 
	  <id>http://71mao.com/default.asp?id=81</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[pv3d和box2d]]></title>
	  <author>
		 <name>c</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=5" label="ActionScript" /> 
	  <updated>2009-07-16T16:05:02+08:00</updated>
	  <published>2009-07-16T16:05:02+08:00</published>
		  <summary type="html"><![CDATA[<p>以前研究魔术笔的游戏,今日心血来潮仿制了一个pv3d和box2d的小程序,按下鼠标左键右拖动绘制盒子,按下左拖动绘制球,还比较有意思。<a target="_blank" href="http://71mao.com/attachments/month_0907/Box.rar"><strong>完整源码下载</strong></a>&nbsp;&nbsp;</p>
<p>box2d： <a target="_blank" href="http://box2dflash.sourceforge.net/ ">http://box2dflash.sourceforge.net/ </a></p>
<p>papervision3d: <a target="_blank" href="http://www.papervision3d.org">http://www.papervision3d.org</a></p>
<p>&nbsp;文件较大,耐心等待...&nbsp;</p>
<p><embed menu="true" loop="true" play="true" type="application/x-shockwave-flash" height="600" width="600" src="http://71mao.com/attachments/month_0907/DrawBox.swf"></embed></p>
<p>代码如下：</p>
<pre class="as" name="code">
package
{
	import Box2D.Collision.Shapes.b2CircleDef;
	import Box2D.Collision.Shapes.b2PolygonDef;
	import Box2D.Collision.Shapes.b2Shape;
	import Box2D.Collision.b2AABB;
	import Box2D.Common.Math.b2Vec2;
	import Box2D.Dynamics.Joints.b2MouseJoint;
	import Box2D.Dynamics.Joints.b2MouseJointDef;
	import Box2D.Dynamics.b2Body;
	import Box2D.Dynamics.b2BodyDef;
	import Box2D.Dynamics.b2DebugDraw;
	import Box2D.Dynamics.b2World;
	
	import General.FpsCounter;
	import General.Input;
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Point;
	import flash.utils.getTimer;
	
	import org.papervision3d.core.effects.view.ReflectionView;
	import org.papervision3d.lights.PointLight3D;
	import org.papervision3d.materials.shadematerials.GouraudMaterial;
	import org.papervision3d.materials.utils.MaterialsList;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.objects.primitives.Cube;
	import org.papervision3d.objects.primitives.Sphere;
	
	[SWF(width=&quot;600&quot;, height=&quot;600&quot;, backgroundColor=&quot;#000000&quot;, frameRate=&quot;40&quot;)] 
	public class DrawBox extends ReflectionView
	{
		public var w:int = 600,h:int = 600;//视野的宽和高
		public const scale:Number = 30;//缩放比率，box2d中1px = 30m
		protected var iterations:int = 10,timeStep:Number = 1/30;
		protected var world:b2World;
		protected var mouseXWorldPhys:Number,mouseYWorldPhys:Number;
		protected var isDrawing:Boolean = false,isMouseDown:Boolean = false;
        protected var clickX:Number,clickY:Number;//点击开始点
        protected var drawSprite:Sprite = new Sprite();
		
		
		protected var materialsList:MaterialsList;
        protected var light:PointLight3D = new PointLight3D(true);//灯光
        protected var gmaterials:GouraudMaterial ;
        
        static public var m_fpsCounter:FpsCounter = new FpsCounter();
		
		public function DrawBox()
		{  
			//Fps
			m_fpsCounter.x = 7;
			m_fpsCounter.y = 5;
			addChildAt(m_fpsCounter, 0);
			//绘制容器
			addChild(drawSprite);
			
			super(this.w,this.h,true,false,&quot;CAMERA3D&quot;);
			  //以舞台正中间的为起点 
			surfaceHeight = -this.h + 110;
			light.x = 1000;light.y = 1000;light.z = -1000;
			this.camera.focus = 10;this.camera.zoom = 100;
			this.gmaterials = new GouraudMaterial(light,0xcc0000,0x111111,10);
			this.materialsList = new MaterialsList({all : gmaterials});
			
			
			//初始包围盒
			var b2aabb:b2AABB = new b2AABB();
            b2aabb.lowerBound.Set(0, 0);
            b2aabb.upperBound.Set(this.w / this.scale, this.h / this.scale);
            //重力
            var g:b2Vec2 = new b2Vec2(0, 10);
            //2d物理世界
            this.world = new b2World(b2aabb, g, true);
            //debug绘制
            //this.setupDebugDraw();
            //地面
            this.createFloor();
            
            for(var i:int = 0; i &lt; 2;i++){
           		this.addCube(Math.random()*20,Math.random()*20,Math.random()*60,Math.random()*60);
            	this.addSphere(Math.random()*60,Math.random()*20,Math.random()*30);
            }
          
            //开始3d的渲染
            this.startRendering();
			//事件初始
			stage.addEventListener(Event.ENTER_FRAME, this.enterFrame);
            stage.addEventListener(MouseEvent.MOUSE_DOWN, this.onMouseDown);
            stage.addEventListener(MouseEvent.MOUSE_MOVE, this.onMouseMove);
            stage.addEventListener(MouseEvent.MOUSE_UP, this.onMouseUp);
		}
		
		//创建所有墙体
		private function createFloor() : void{
			//下
          	createBox(this.w / this.scale / 2, (this.h + 5) / this.scale ,this.w / this.scale / 2, 10 / this.scale);
            //左
            createBox(-5 / this.scale, this.h / this.scale / 2,10 / this.scale, this.h / this.scale / 2);
            //右
            createBox(this.w / this.scale, this.h / this.scale / 2,10 / this.scale, this.h / this.scale / 2);
        }
        //添加3d盒子 
        public function addCube(x:Number,y:Number,bw:Number,bh:Number):void{
        	var body:b2Body = createBox((x + bw / 2) / this.scale, (y + bh / 2) / this.scale ,bw / 2 / this.scale, bh / 2 / this.scale,false);
        	var cube:Cube = new Cube(this.materialsList, bw, (bw + bh) / 2, bh);
            scene.addChild(cube);
            body.m_userData = cube;
        }
        //添加3d球体 
        public function addSphere(x:Number,y:Number,radius:Number):void{
        	var body:b2Body = createCircle(x  / this.scale, y / this.scale , radius ,false);
        	var sphere:Sphere = new Sphere(this.gmaterials, radius);
            scene.addChild(sphere);
            body.m_userData = sphere;
        }
        
        //矩形
        private function createBox(x:Number,y:Number,hx:Number,hy:Number,isSleep:Boolean = true):b2Body{
        	var def:b2PolygonDef  = new b2PolygonDef();
        	if(isSleep == false){
        		def.density = 1;
            	def.friction = 0.7;
            	def.restitution = 0.7;
         	}
            var bodyDef:b2BodyDef  = new b2BodyDef();
            bodyDef.position.Set(x,y);
            def.SetAsBox(hx,hy);
            var body:b2Body = this.world.CreateBody(bodyDef);
            body.CreateShape(def);
            body.SetMassFromShapes();
            return body;
        }
        
        //球
        private function createCircle(x:Number,y:Number,radius:Number,isSleep:Boolean = true):b2Body{
        	var def:b2CircleDef  = new b2CircleDef();
        	if(isSleep == false){
        		def.density = 1;
            	def.friction = 0.7;
            	def.restitution = 0.7;
         	}
         	def.radius = radius / this.scale
            var bodyDef:b2BodyDef  = new b2BodyDef();
            bodyDef.position.Set(x,y);
            var body:b2Body = this.world.CreateBody(bodyDef);
            body.CreateShape(def);
            body.SetMassFromShapes();
            return body;
        }
        
      
        
		//debug绘制刚体等外观轮廓
		public function setupDebugDraw() : void {
            var dbg:Sprite = new Sprite();
            addChild(dbg);
            var dd:b2DebugDraw = new b2DebugDraw();
            dd.m_sprite = dbg;
            dd.m_drawScale = this.scale;
            dd.m_fillAlpha = 0.5;
            dd.m_lineThickness = 1;
            dd.m_drawFlags = b2DebugDraw.e_shapeBit | b2DebugDraw.e_jointBit | b2DebugDraw.e_centerOfMassBit;
            this.world.SetDebugDraw(dd);
        }
		
		//2d物理世界主循环
		public function enterFrame(evt:Event) : void{
			var physStart:uint = getTimer();
			this.updateMouseWorld();
			this.mouseDrag();
		 	this.world.Step(this.timeStep, this.iterations);
		 	 var d3d:DisplayObject3D;
		 	 for (var bb:b2Body = world.m_bodyList; bb; bb = bb.m_next){
                if (bb.m_userData is DisplayObject3D){   
                 	d3d = bb.m_userData as DisplayObject3D;
                 	d3d.x = bb.GetPosition().x * this.scale - this.w * 0.5;
                    d3d.y = (-bb.GetPosition().y) * this.scale + this.h * 0.5 + 50;
                    d3d.rotationZ = (-bb.GetAngle()) * (180 / Math.PI);
                }
    		}
    		this.singleRender();
    		m_fpsCounter.update();
    		m_fpsCounter.updatePhys(physStart);
		}
		
		public function updateMouseWorld() : void{
        	this.mouseXWorldPhys = mouseX / this.scale;
            this.mouseYWorldPhys = mouseY / this.scale;
        }
		
		//开始拖动
		public function onMouseDown(evt:MouseEvent) : void{
		 	this.clickX = mouseX;
            this.clickY = mouseY;
            this.isDrawing = true;
            this.isMouseDown = true;
		}
		//拖动绘制
		public function onMouseMove(evt:MouseEvent) : void{
		 	if (this.isDrawing){
                with(drawSprite){
	                graphics.clear();
	                graphics.beginFill(0xFF0000, 0.5);
	                if (this.clickX &gt; mouseX){
	                    graphics.drawCircle(mouseX, mouseY, Math.min(40, Point.distance(new Point(this.clickX, this.clickY), new Point(mouseX, mouseY)) / 2));
	                }else{
	                    graphics.drawRect(clickX,clickY, Math.min(200, mouseX - this.clickX), Math.min(100, mouseY - this.clickY));
	                }
                }
                this.isMouseDown = false;
            }
		}
		//拖动结束
		public function onMouseUp(evt:MouseEvent) : void{
            if (this.isDrawing){
                if (this.clickX &gt; mouseX){//向左画圆
                    this.addSphere(mouseX, mouseY,drawSprite.width/2);
                }else{//向右画方
                    this.addCube(clickX,clickY,drawSprite.width,drawSprite.height);
                }
                drawSprite.graphics.clear();
                this.isDrawing = false;
            }
            this.isMouseDown = false;
		}
		
		
		
		//拖动选中的3d对象
		public var m_mouseJoint:b2MouseJoint;
		public function mouseDrag():void{
			// mouse press
			if (isMouseDown &amp;&amp; !m_mouseJoint){
				var body:b2Body = GetBodyAtMouse();
				if (body){
					this.isDrawing = false;
                    drawSprite.graphics.clear();
					var md:b2MouseJointDef = new b2MouseJointDef();
					md.body1 = world.GetGroundBody();
					md.body2 = body;
					md.target.Set(mouseXWorldPhys, mouseYWorldPhys);
					md.maxForce = 300.0 * body.GetMass();
					md.timeStep = timeStep;
					m_mouseJoint = world.CreateJoint(md) as b2MouseJoint;
					body.WakeUp();
				}
			}
			// mouse release
			if (!isMouseDown){
				if (m_mouseJoint){
					world.DestroyJoint(m_mouseJoint);
					m_mouseJoint = null;
				}
			}
			// mouse move
			if (m_mouseJoint){
				m_mouseJoint.SetTarget(new b2Vec2(mouseXWorldPhys, mouseYWorldPhys));
			}
		}
		
		
		
		//按d键删除选中的3d对象
		public function MouseDestroy():void{
			// mouse press
			if (!this.isMouseDown &amp;&amp; Input.isKeyPressed(68/*D*/)){
				var body:b2Body = GetBodyAtMouse(true);
				if (body){
					world.DestroyBody(body);
					return;
				}
			}
		}
		
		//取当前鼠标下刚体
		private var mousePVec:b2Vec2 = new b2Vec2();
		public function GetBodyAtMouse(includeStatic:Boolean=false):b2Body{
			// Make a small box.
			mousePVec.Set(mouseXWorldPhys, mouseYWorldPhys);
			var aabb:b2AABB = new b2AABB();
			aabb.lowerBound.Set(mouseXWorldPhys - 0.001, mouseYWorldPhys - 0.001);
			aabb.upperBound.Set(mouseXWorldPhys + 0.001, mouseYWorldPhys + 0.001);
			
			// Query the world for overlapping shapes.
			var k_maxCount:int = 10;
			var shapes:Array = new Array();
			var count:int = world.Query(aabb, shapes, k_maxCount);
			var body:b2Body = null;
			for (var i:int = 0; i &lt; count; ++i)
			{
				//if (shapes[i].GetBody().IsStatic() == false || includeStatic)
				{
					var tShape:b2Shape = shapes[i] as b2Shape;
					var inside:Boolean = tShape.TestPoint(tShape.GetBody().GetXForm(), mousePVec);
					if (inside){
						body = tShape.GetBody();
						break;
					}
				}
			}
			return body;
		}
		
		
	}
}
</pre>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/80.htm" /> 
	  <id>http://71mao.com/default.asp?id=80</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[adobe真的要放弃as3吗?]]></title>
	  <author>
		 <name>c</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=5" label="ActionScript" /> 
	  <updated>2009-05-26T17:32:14+08:00</updated>
	  <published>2009-05-26T17:32:14+08:00</published>
		  <summary type="html"><![CDATA[<p>adobe真的要放弃as3吗?详文见:<a target="_blank" href="http://www.ncannasse.fr/blog/adobe_drop_as3_for_haxe"><br />
www.ncannasse.fr/blog/adobe_drop_as3_for_haxe</a></p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/79.htm" /> 
	  <id>http://71mao.com/default.asp?id=79</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[IE并发连接限制(as)]]></title>
	  <author>
		 <name>c</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=5" label="ActionScript" /> 
	  <updated>2009-05-23T16:30:33+08:00</updated>
	  <published>2009-05-23T16:30:33+08:00</published>
		  <summary type="html"><![CDATA[<p>由于ie遵守严格的标准，as 只能并发下载2个文件,其原因可能是由于带宽或下载大量小文件，其他浏览器好像没有这个限制，游戏里的小资源很多，部分打包，部分还是要实时加载，虽然只能同时下2个,但在下载大量资源时,经测试用并发还是比队列下载快，但并发下载有时无故停掉，也不抛出事件，可以做个超时处理，或不下同一个资源。这样就可以保证下载的速度，最后把资源分散,也可加速。</p>
<p>Internet Explorer and Connection Limits<br />
<a target="_blank" href="http://blogs.msdn.com/ie/archive/2005/04/11/407189.aspx">http://blogs.msdn.com/ie/archive/2005/04/11/407189.aspx</a></p>
<p>修改连接限制<br />
<a target="_blank" href="http://support.microsoft.com/kb/183110">http://support.microsoft.com/kb/183110</a></p>
<p>队列下载：<br />
BulkLoader： <a target="_blank" href="http://code.google.com/p/bulk-loader/">http://code.google.com/p/bulk-loader/</a><br />
QueueLoader： <a target="_blank" href="http://code.google.com/p/queueloader-as3/">http://code.google.com/p/queueloaderas3</a></p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/78.htm" /> 
	  <id>http://71mao.com/default.asp?id=78</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[富家西游网页版试玩]]></title>
	  <author>
		 <name>c</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=5" label="ActionScript" /> 
	  <updated>2009-03-31T12:33:35+08:00</updated>
	  <published>2009-03-31T12:33:35+08:00</published>
		  <summary type="html"><![CDATA[<p>富家西游的开发速度很迅猛，偶试玩了一下,flex开发的,做的很好. <br />
资源:整个静态资源没有单独加载,全Embed在程序里,对于这个资源量小的游戏还是可以容忍的,整个游戏主体也只有800多k,下载很快,其他资源实时加载,map自定格式.config单独分离出了.玩家角色为了沿用原有的本地客户端资源体积过于庞大.但便于换装换宠. <br />
组件:组件用的flex的,没有二次开发,各个view用MXML componet去做，skin 也绑在里面,排版调整快,分离出来也很好维护. <br />
结构:整个结构用了puremvc框架,松耦合,清晰。好像土豆的播放器也用的puremvc.确实比Cairngorm好.其次用了&ldquo;阉割&rdquo;的mx,即rsl,不信你去看看 系统盘:\Documents and Settings\{username}\Application Data\Adobe\Flash Player\AssetCache 看看是否多了swz，足足可以省掉500多k呀<br />
通讯:通讯走的socket,自定义协议.服务端应该是原有的c++版 <br />
Js:最新的swfobject 代码:本身mxml最后编译时会转为as,也无法还原.其他的还是裸奔</p>
<p><br />
试玩地址:http://game.163.com/fj/ <br />
官网博客:http://blog.163.com/fjxy_admin/?fromgame163</p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/76.htm" /> 
	  <id>http://71mao.com/default.asp?id=76</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[SFS无极限]]></title>
	  <author>
		 <name>cab</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=5" label="ActionScript" /> 
	  <updated>2009-03-08T10:20:55+08:00</updated>
	  <published>2009-03-08T10:20:55+08:00</published>
		  <summary type="html"><![CDATA[<p>群里有人要Pojie的<a target="_blank" rel="external" href="http://www.smartfoxserver.com/_cn/">SmartFoxServer</a>,说有人Po了还收Pojie费,于是乎我自己来Po<br />
截图如下<br />
<img alt="" border="0" src="http://71mao.com/attachments/month_0903/u2009324104616.jpg" /><br />
授权文件licence.sfl在server目录下,具体格式:文件构成:KEY的长度+key+DES加密配置文件<br />
解密部分代码:<br />
&nbsp;</p>
<pre class="as" name="code">
FileInputStream in = readFile(licenceFile);
//KEY的长度
int keyLen = in.read();
//key
key = new byte[keyLen];
in.read(key, 0, keyLen);
//加密的配置文件
byte[] config = new byte[in.available()];
in.read(config, 0, in.available());
//解密配置文件
DESPlus des = new DESPlus(key);
byte[] code = des.decrypt(config);
String decodeConfig = new String(code,0,code.length);
System.out.println(&quot;解密后的配置：&quot;+ decodeConfig);
</pre>
<p><br />
这个解出来的配置文件<br />
&nbsp;</p>
<pre class="as" name="code"><!--l version="1.0" encoding="UTF-8-->

<smartfoxlicence></smartfoxlicence>

	<type></type>PRO

	<clientname></clientname>--== Free Demo Licence ==--

	<ipaddresses></ipaddresses>
		<ip></ip>*.*.*.*
	

	<maxclients></maxclients>20


</pre>
<p><br />
具体的使用方法下载代码看注释吧<img alt="下载文件" style="margin: 0px 2px -4px 0px" src="http://71mao.com/images/download.gif" /> <a target="_blank" href="http://71mao.com/attachments/month_0903/42009325155753.rar">点击下载此文件</a><br />
<br />
<br />
如何使用as3写客户端：<a target="_blank" rel="external" href="http://www.jorgebucaran.com/blog/smartfoxserver-tutorials/">http://www.jorgebucaran.com/blog/smartfoxserver-tutorials/</a><br />
<br />
<br />
<br />
&nbsp;</p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/75.htm" /> 
	  <id>http://71mao.com/default.asp?id=75</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[IE8  Rc1下载地址错误]]></title>
	  <author>
		 <name>cab</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=5" label="ActionScript" /> 
	  <updated>2009-03-08T10:20:30+08:00</updated>
	  <published>2009-03-08T10:20:30+08:00</published>
		  <summary type="html"><![CDATA[前日在win 7 用了一下En版的IE8 ,接着Chrome又出了新版，今早中文IE8&nbsp;&nbsp;Rc1(正式版)也出了,可惜下载地址错误滴 <img src="http://71mao.com/images/smilies/Face_09.gif" border="0" style="margin:0px 0px -2px 0px" alt=""/> window xp版 全链接到window 2003上去了，下载后无法安装,哪个汗呀......................错误地址:<br/><a href="http://www.microsoft.com/china/windows/products/winfamily/ie/beta/support.mspx" target="_blank" rel="external">http://www.microsoft.com/china/windows/products/winfamily/ie/beta/support.mspx</a><br/><br/><br/>正确地址：<br/><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx" target="_blank" rel="external">http://www.microsoft.com/windows/internet-explorer/default.aspx</a>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/74.htm" /> 
	  <id>http://71mao.com/default.asp?id=74</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Web MMORPG比较]]></title>
	  <author>
		 <name>cab</name>
		 <uri>http://71mao.com/</uri>
		 <email>83392943@QQ.com</email>
	  </author>
	  <category term="" scheme="http://71mao.com/default.asp?cateID=5" label="ActionScript" /> 
	  <updated>2009-03-08T10:20:04+08:00</updated>
	  <published>2009-03-08T10:20:04+08:00</published>
		  <summary type="html"><![CDATA[<p>Web MMORPG比较<br/><br/>天书<br/><a href="http://t.mop.com" target="_blank" rel="external">http://t.mop.com</a><br/>关键词:as3 java 完成度最高 耗费资源最小 游戏内容最丰富<br/>通讯:socket<br/>组件:统一 标准<br/>代码处理:自定义修改文件内容  混淆<br/>地图加载：分块加载<br/><br/><br/>摩尔庄园 <br/><a href="http://www.51mole.com/" target="_blank" rel="external">http://www.51mole.com/</a>  <br/>关键词:as3 php?  社区 儿童<br/>通讯:Socket<br/>协议：包长+包版本+协议号+id+结果+数据<br/>代码处理:修改文件头+zib打包<br/>地图加载：分场景<br/> <br/><br/>武侠世界 <br/><a href="http://wxflash.hopecool.com/" target="_blank" rel="external">http://wxflash.hopecool.com/</a> <br/>关键词:as3 aswing asp.net  webserivce  <br/>通讯:Socket<br/>代码:未处理<br/>地图加载：整张swf  3d场景2d地图<br/><br/>昆仑世界 <br/><a href="http://kl.kunlun.com/" target="_blank" rel="external">http://kl.kunlun.com/</a>  <br/>关键词:as3  flash cs3组件 shareobject    php<br/>通讯:socket 数据有简单加密 URLLoader http方式post传值 <br/>代码处理:修改tag+简单修改文件内容<br/>借鉴了qqzone动画加密方式,你可以看看这个<br/><a href="http://flash.qzone.net.cn/flash/29DJA.swf" target="_blank" rel="external">http://flash.qzone.net.cn/flash/29DJA.swf</a>  加密作者:blueshell 效果作者:<a href="http://293299.qzone.qq.com" target="_blank" rel="external">http://293299.qzone.qq.com</a><br/>在看看昆仑的这个<br/><a href="http://static1.kl.kunlun.com/gamedebug20090313.swf" target="_blank" rel="external">http://static1.kl.kunlun.com/gamedebug20090313.swf</a><br/>地图加载：zip包加载解析  分块加载 解zip来自于<a href="http://www.riaidea.com/blog/archives/35.html" target="_blank" rel="external">http://www.riaidea.com/blog/archives/35.html</a><br/>音效:js控制windows media player播放mid<br/><br/><br/>魔力学堂 <br/><a href="http://mc.qeedoo.com/" target="_blank" rel="external">http://mc.qeedoo.com/</a>   <br/>关键词:flex as3 php?  Cookie<br/>通讯:Proxy+NetConnection<br/>协议:AMF0<br/>代码处理:encode(文件名)+zib打包<br/>地图加载：整张jpg  3d场景2d地图<br/><br/><br/>乐土 <br/><a href="http://www.letu365.com/" target="_blank" rel="external">http://www.letu365.com/</a> <br/>工具语言:as2 jsp<br/>代码:as2使用SWF Encrypt 混淆、帧代码、as3裸体<br/><br/>海底世界<br/><a href="http://www.club-fish.com/" target="_blank" rel="external">http://www.club-fish.com/</a><br/>关键字:儿童社区 puerMVC  as3.0  flex<br/>通讯：NetConnection<br/>加载:加载量过大 过慢 场景过大<br/><br/>易度迷城3<br/><a href="http://v3.idoll.cn/" target="_blank" rel="external">http://v3.idoll.cn/</a><br/>关键字:社区 类qq秀、猫游记美术风格  as3+Fms+php<br/>通讯:NetConnection SharedObject  http/get  socket  太杂了吧<br/>协议数据交换:rtmp amf0 URLVariables  …….<br/>flashcs3开发 怎么做版本控制? <img src="http://71mao.com/images/smilies/Face_13.gif" border="0" style="margin:0px 0px -2px 0px" alt=""/>  <br/>代码处理:修改文件后缀名,代码裸体 <br/><br/>弹弹堂<br/><a href="http://udblogin.duowan.com/ddt/ddt_login.jsp" target="_blank" rel="external">http://udblogin.duowan.com/ddt/ddt_login.jsp</a> <br/>通讯：用asp.net的ajax之ashx请求数据<br/>js:完全复制于天书奇谈<br/>音效:flv<br/><br/>很有几个游戏借鉴复制天书的js,html,img哦………… <img src="http://71mao.com/images/smilies/Face_06.gif" border="0" style="margin:0px 0px -2px 0px" alt=""/></p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://71mao.com/article/73.htm" /> 
	  <id>http://71mao.com/default.asp?id=73</id>
  </entry>	
		
</feed>
