ITeye博客

AS3

共 8 篇文章

反射的方法:访问库里的元件的方法

package net.smilecn{ import flash.display.Sprite; import flash.display.MovieClip; import flash.utils.getDefinitionByName; public class MainForm extends Sprite{ public function MainForm(){ var ClassReference:Class = getDefinitionByName("Mc1") as Class; var instance:MovieClip = new ClassReference(); …

2011-09-21 17:44 · AS3 · Flash · as3 · getdefinitionbyname

比ForcibleLoader 更好的avm2调用avm1的类

/** * * 6dn Avm1Loader *---------------------------------------------------------------- * @notice 6dn Avm1Loader类 * @author 6dn * @as version3.0 * @date 2009-5-26 * * AUTHOR ****************************************************************************** * * authorName : 黎新苑 - www.6dn.cn * QQ :16037…

2010-09-27 08:58 · AS3 · J# · Flash · .net · QQ

BulkLoader

BulkLoader是一个不错且使用简单的开源加载类,其能实现对不同类型文件的加载进行管理。 在尝试加载多个文件时候只要使用 add + 文件地址,在加载结束后使用 “get文件类型”+文件地址或加载时候注册的id去获得要得到的文件。 下载地址: http://code.google.com/p/bulk-loader/ 官方:http://www.stimuli.com.br/trane/2007/nov/25/loading-reloaded/ package { import br.com.stimuli.loading.BulkLoader; import br.com.stimul…

2010-08-12 09:37 · AS3 · Google · Flash · json · .net · XML

一个载入SWF和图片到数组的loader

com.paizi,这个没用可以删掉。给自己留个地方,怕以后忘了。 package { import com.paizi; import flash.display.Loader; import flash.display.MovieClip; import flash.events.Event; import flash.events.IOErrorEvent; import flash.events.MouseEvent; import fl.transitions.*; import fl.transitions.easing.*; import flash.events.Progre…

2010-08-12 09:15 · AS3 · Flash · .net

载入外部图片作为背景平铺,MC剧中的方法

FLASH AS3 载入外部图片作为背景平铺,MC剧中的方法。 import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.display.Loader; import flash.net.URLRequest; import flash.display.Sprite; import flash.display.BitmapData; import flash.display.Bitmap; stage.align = StageAl…

2010-07-28 16:47 · AS3 · ActionScript · Flash · .net

Unloading SWFs: Loader.unload() versus Loader.unloadAndStop() Methods

内存确实释放了一部分。但是还有一部分会累加。 地址: http://www.flashandmath.com/intermediate/swfload/unloading.html 这样的一种情况: 使用Loader去load一个swf: var fileURL:String = “assets/test.swf” var swfLoader:Loader = new Loader(); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE swfLoaded); swfLoader.load(new URLRequest(f…

2010-07-27 11:02 · AS3 · ActionScript · BBS · Flash · Adobe · 虚拟机

As3.0 删除容器所有子对象

经过查询了资料发现了删除容器的所有子对象也有这样的学问啊。原来是关于深度的问题,每删除一个子对象 ,深度就会自动移动并填充这个空位。 每个DisplayObjectContainer对象都有一个numChildren属性,numChildren记录了这个对象里子对象的个数,当 容器对象里添加了一个子对象,位置为0,numChildren为1,添加第二个子对象时,位置为1,numChildren为2, 以此类推。 要删除容器对象里的子对象,可以用removeChild(parm1)和removeChildAt(parm2),其中parm1表示的是一个 显示对象的引用,parm2则是显示对象的位…

2010-07-27 10:05 · AS3 · 算法 · 游戏 · J#

可以将基于AVM1Movie的SWF编码成 as3的MovieClip的类

使用方法在注释中 [code="actionscript"] /* * ForcibleLoader * * Licensed under the MIT License * * Copyright (c) 2007-2009 BeInteractive! (www.be-interactive.org) and * Spark project (www.libspark.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and as…

2010-07-07 17:12 · AS3 · HTML · ActionScript · Flash · .net · Security