flex game
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flashx.textLayout.formats.BackgroundColor;
import spark.effects.interpolation.RGBInterpolator;
public class Map extends Sprite implements IMap
{
//格子的宽高
private var grid:int = 20;
private var hitArr:Array = new Array();
public function Map()
{
var mapArray:Array;
mapArray = MapArray.getMapArr(1);
initMap(mapArray);
}
private function initMap(tempArray:Array):void{
for (var i:int = 0; i < tempArray.length; i ++){
for (var j:int = 0; j < tempArray[i].length; j++){
var Obj:MovieClip ;
switch(tempArray[i][j]){
//空白
case 0:
continue;
case 1:
Obj = new wall_1(i,j);
hitArr.push(Obj);
break;
default:
Obj = new wall_1(i,j);
hitArr.push(Obj);
}
Obj.addEventListener("destory",ObjectDestory);
Obj.x = j*grid;
Obj.y = i*grid;
addChild(Obj);
}
}
}
//删除
private function ObjectDestory(e:Event):void{
}
}
}
相关文档:
HScrollBar{
up-arrow-skin: ClassReference( null );
down-arrow-skin: ClassReference( null );
}
VScrollBar{
up-arrow-skin: ClassReference( null );
down-arrow-skin: ClassReference( null );
}
http://www.brentlamborn.com/post/Flex-Scrollbar-Remove-up-down-arrows.aspx ......
最近在看Flex3权威指南,里面对页面架构和RIA技术总结的很好。
一. 基于页面架构的Web应用流程
1. 用户打开浏览器,向WEB服务器请求一个页面。
2. WEB服务器收到请求。
3. (optional)网络服务器把请求交给应用服务器来动态组装页面。
&nb ......
刚学完JSP,想为Flex配置Tomcat服务器,并不像MyEclipse那么简单。看了很多教程还是觉得挺麻烦的。结合几个教程,成功在http://127.0.0.1:8080/flexserver1/ 中显示出结果。所以把自己的过程叙述一下:
前提: 已安装Flexbuilder3,tomca6.0
  ......
A界面,B界面
A调用B,B中有TabNavigator
我想在A中获得B第二个标签的控件。报空值异常
---解决办法
在TabNavigator属性中添加creationPolicy=“all”,意思是TabNavigator创建的时候所有子视图全部实例化,否则只实例化默认视图,虽然这样做会导致程序启动稍微慢一些。 ......