现在的位置: 首页 > 综合 > 正文

ActionScript 3.0

2013年04月18日 ⁄ 综合 ⁄ 共 2364字 ⁄ 字号 评论关闭

游戏开发参考

周云的FLASH小游戏开发教室_基础篇(共11节) 游戏制作前的准备

http://www2.flash8.net/teach/6500.htm 

Flash 区块游戏开发

 

 

第一方法一:
var funName:Function = function(a:int,b:int):int{
   return a+b;

定义方法二:
function funName(a:int,b:int):int{
   return a+b;
}

Active Window Blur
I was checking out a website yesterday when it suddenly reminded me of a Pixelfumes experiment I remembered seeing many moons ago. After finding it with a quick Google search, just for kicks, I decided to play around and update the idea to AS3. I didn’t bother with the constant updating to accomadate video as that seemed a tad processor hungry, but it wouldn’t be difficult to implement at all. What I would rather do with it is make it possible to open several windows at once all masking the same background image. Maybe later on tonight.
Anyway here’s the script for interested parties. An example follows below. Thank you to Pixelfumes for the original idea and AS2 script.
WindowBlur.as:
http://blog.onebyonedesign.com/actionscript/active-window-blur/

上面的是一个毛玻璃效果的蒙层代码。

 

 

 

 

 

pixelblitz {离子系统}

http://code.google.com/p/pixelblitz/downloads/list

 

AS+JSON+PHP远程通信框架
参考:http://plter.com/?p=738

 

当BulkLoader把所有的资源都加载完成后,可以使用以下的代码来获取SWF文件中的类,这里假设SWF文件名为index.swf,要获取的类的名称为Boy。为了方便实例化SWF文件中的类,可以定义一个方法。

 

 

/** 从SWF文件中获取类实例化对象  
----------------------------------------------------------------------
*/
public static 
function getObjectFromSWF(clsName:String, swfName:String,bulkLoader:BulkLoader):Object
{
    
var swf:LoadingItem = bulkLoader.get(swfName);
    
if (!swf) {
        
throw new Error("找不到SWF文件:" + swfName + ".swf");
    }

    var cls:Class = ImageItem(swf).getDefinitionByName(clsName) as Class;
    
if (!cls) {
        
throw new Error("找不到类:" + clsName + ", 来自SWF文件:"  + swfName + ".swf"); 
    }                   
    
return new cls;
}

 


 

 

GhostCat是一个功能非常丰富的开源工具库,(同时也包含有一套完整的UI组件,但它只是类库的一个衍生品。)
它基本可以涵盖你可能遇到大部分问题。
使用UI将会增加50K左右的体积,使用非UI显示对象会增加20K以上的体积,而非显示类可以非常小。

GhostCat采用BSD协议可以自由地应用于商业及非商业应用中。如果您使用了GhostCat,甚至用于实际项目中,希望能通过邮件给予回馈。

 

抱歉!评论已关闭.