Tag: flex

  • flex magic bug3:几个垃圾回收的问题或bug

    恶战了几天flex的垃圾回收,小有结果,包括: 1 在module中用<mx:Style>方式引入css文件(编译期),则,扯淡。经测试目前找到两种解决方法,一种是把<mx:Style>放到main app domain中去,因为module默认会继承main domain的css;第二种是把css编成swf后,在module中动态加载。估计module在编译期引入css时,会引用到main domain中的东西,造成无法GC。 2 mate框架中的Injector方法,类似映射或绑定,非常好用,但是很不幸,测试了n次后发现Injector会带来无法GC的问题,最近是没空再去翻mate源码了,用as自己的bindingUtil代替后问题解决。但mate maker说Injector不会产生GC问题。。。magic。 3 冷到家的一个bug。。。memory leak when using TextInput and TextArea when click the keyboard 只要用TextInput之类的组件,就无法垃圾回收,连这个都让我测试出来了- -b真不容易,可惜的是在上述链接中发现flash player team正在解决ing。。。于是到这一步垃圾回收战可以打住了,因为实在无法避免不用TextInput — -b,总得注册登录吧。。。爱谁谁,估计最后内存占用会超过100M…… 以下是几个介绍垃圾回收的链接(决定以后按时阅读flex bug list。。。以上几个bug自己测出来太bt了): Flex Profiling I am back with my boring technical posts again! This time I have tried to collect and organize some helpful material…roshantitus.blogspot.com Flex/AS 3 memory leak…

  • 正常使用 flex profiler

    使用profiler时一直报socket timeout 查了资料后,需要在mm.cfg中加一行 PreloadSwf=<work space>\.metadata\.plugins\com.adobe.flash.profiler/ProfilerAgent.swf?debug=true mm.cfg的位置:flex help的《Configuring the debugger version of Flash Player》 之前测了很久都不通,主要跟我把系统环境变量里的homepath放到了e盘,以及flex builder默认的workspace也改动过多次,所以整个乱掉了。。。 其他比较容易解决的出错原因:flash player要用debug版本;要让profiler的连接通过防火墙;等等。

  • flex notes 之:对getter函数的数据绑定

    by

    in

    天天忙于实际项目的结果之一,就是来来回回反反复复测代码,就是不愿意停下来查原理。 这会儿实在不想test了,查了查把数据绑定到getter function上为何不更新。flex帮助文档结果如下: Using read-only properties as the source for data binding You can use a read-only property defined by a getter method, which means no setter method, as the source for a data-binding expression. Flex performs the data binding once when the application starts. 原来只在程序初始化时执行一次绑定,所以在必要时还得用事件推一推。

  • flex magic bug2:Adobe Air application has a limit on maximum window size ( about 2900 pixels )

    在上海癫子异术节期间本打算用AIR解决方案,后来在要扩大窗口到四显示屏时,就是无法把窗口拖动到接近四屏宽处,后查到air的一个bug:窗口最大size不能超过2900左右,非常冷。 Adobe记录:

  • flex magic bug 1 : Internal build error on empty switch branch

    今天试用cast3d时,sample的例子就是调试不通,提示“An internal build error has occurred”。用排除法一直把范围缩小到TrackBall.as这个文件,之后就进行不下去了。 google+百度后,最后出来一个结果:(顺便在此时百度遭受围攻时挺一把百度,双搜索引擎并用才是王道) 里面提到flex在使用空switch时会出bug,TrackBall.as里出错的就是这一句:switch( event.keyCode ){} Adobe官方也记录了该bug: http://bugs.adobe.com/jira/browse/SDK-1570

  • “地平线 Horizon” – 上海癫子异术节[2008]

    “地平线 Horizon”  visualized the flickr image data all over the world around keyword/tag – Horizon. It was exhibited on Shanghai Electronic Art Festival 2008. Teamwork with Wen Jingbo, Wang haocheng, Yang Fan, Yang Tao.Contra:Technical Director, Development.Flash/Flex, python, Flickr API. ============================================= 下文是《大众DV》约稿,略作修改 Dazzling on the horizon — — 无炫不媒体 Key1:新媒体艺术 维基百科对新媒体艺术(New Media Art)的第一句解释如是:“Newmedia art is an art genre that…

  • flickrAPI notes 1

    flickr的as Api:flickr-.87,最好直接使用source而非lib,里边的lib与source貌似不一致。同时使用source时,要再添加coreLib,用到了coreLib里边一些事件类型等。

  • flex与django|python通信,通过pyamf

    by

    in

    pyamf官网上推荐了一篇中文howto(1,2),介绍django与flex通信,通过pyamf(一个python的开源api,专门针对amf协议)。其中有个小问题,就是destination的设置。 共有三处会用到该属性(这篇中文howto只提到了两处),我的代码片段如下: 1 flex:<mx:RemoteObject id=”djangoService” destination=”destinationFucker” showBusyCursor=”true”/> 2 services-config.xml: <destination id=”destinationFucker”> <channels> <channel ref=”fuckChannel”/> </channels> </destination> 3 amfgateway.py: usersGateway = DjangoGateway({ ‘destinationFucker.testFuck’:testFuck, ‘destinationFucker.testArrayFuck’:testArrayFuck }) 深红色的python部分,在原文中是没有destination的(当然原文中也没有fu*k)。 我不知道原文的example是如何测试的,至少我滴环境下(django自带server,无数据库)如果在python(或django)的方法前不加destination(即直接’testArrayFuck’:testArrayFuck ),flex是无法找到远程方法testArrayFuck的。(后注:后来发现原example无效是因为pyamf版本有更新) flex的RemoteObject,天生出来是与java后台相亲相爱的 ,在java中,destination对应的可以是该class名,即: class destinationFucker { public function testArrayFuck(){} } 而在python中,至少这个example中米有class,所以必须在映射方法testArrayFuck时加上destination才能找到“destinationFucker.testArrayFuck”。 那么客户端flex及services-config中不写destination行不行涅? 答案貌似是“不行”,如果在RemoteObject及services-config中去掉destination,运行时会找不到destination而报错。 那么客户端flex及services-config中destination id=””行不行涅? 答案也貌似是“不行”,在services-config中destination的id不接受””。至少在flex默认配置下这样是不行滴。 另外,上边举的那个java的例子,其实我猜的,因为从没用java试过 ^_<

  • “Put a Flex UI on your application”

    测试了Bruce大师在”Put a Flex UI on your application”中的例程,其中flex端在我的环境下需要个别改动才可运行,记录如下: 1 as3-rpclib库。直接使用as3-rpclib.swc会报错,说XMLRPCObject覆盖错误。去掉.swc库文件,直接使用as3-rpclib的源代码后跟踪调试,原来在XMLRPCObject.as中两个重载函数“setCredentials与setRemoteCredentials”与基类中的原函数参数个数不一样,少了第三个“charset:String=null”。改动如下: /*原:override public function setCredentials (username:String,password:String):void*/ override public function setCredentials(username:String,password:String,charset:String=null):void 2 XMLRPCObject。原文中没有指定XMLRPCObject对象的destination,在我的环境(Flex SDK 3)下编译后”destination”值为“null”,于是gateway的url就变成了“http://localhost:8000null”。改动如下: 原:<ak33m:XMLRPCObject id=”server” endpoint=”http://localhost:8000″/> 改: <xmlrpc:XMLRPCObject id=”server” endpoint=”http://localhost:9000″destination=””/> 记录完毕。 另,集中注意力于前台flex, 用python做测试web server还真是方便高效。嗯,当然其他的语言php、java等其实还没有试过。。。

  • Flex applications are event-driven

    Rather than being page-driven, Flex applications are event-driven.