Nov 02

sin, cos, tan….. Mathematical calculation can really be the pain in the xxx !!! :S.

Something tells me I need to really brush up my trigonometry knowledge. Need to get some math readings…..

written by admin \\ tags: , ,

May 12

In AS3 we use addchild to relate the objects in AVM to the rendering display. When we create a mc or shape in actionscript, the virtual object only exist in AVM. Only after we “addchild” them to the root stage, or the existing “displayable” object, they can be rendered on stage.

1. Create mc/shape/sprite.
2. addChild/addChildAt to attach them to render engine.
3. (optional) reparenting to adjust the layer/overlaying sequence

written by admin \\ tags: ,

May 02

http://www.adobe.com/openscreenproject/

Adobe finally did some major reaction towards M$ Silver/Mmoonlight. It was like swearing “I want flash/AIR to be EVERYWHERE!”

Open-source is like every geek’s backyard garden. With the removing of restriction on swf and flv/f4v, flash running on linux will be much smoother. And this will certainly encourage the Flash/Flex/AIR developers to work more energetically on their work/career.

Great news it is. But we still need to see how the community react to this.

written by admin \\ tags: , , ,

Mar 30

Installed wp 2.5 earlier, and then wanted to do some tweak with my desktop(currently ubuntu 8.04 alpha 4). Installed Mac fonts, themes and icons :-)

Well, now it’s looks much like Mac OS. As for the pack, you may search for “Mac4linux” in google.

Another update – wine-doors 0.1.2 released (actually released in Jan). Last time when I tried the 0.1.1 version, the downloading process was not clearly stated. Therefore after I chose “Flash 8″ to install, it took me more than half an hour before finally decided to kill the process without knowing whether it’s really “in progress”. This time, the most significant improvement is that there is a installation percentage indicator for each application. That helps a lot! I have successfully made Flash Professional 8 working on my rig just now. wula!

written by admin \\ tags: , , ,

Dec 03

Flash程序员的八层境界

    第一层,无代码境界.此为初级,学会了点儿Graphic,motion,mask,guide动画后就开始制作MV的人属此境界.不会用任何代码,把动作面板看作禁地.
    第二层,简单代码境界.此时已会用stop();之类的简单影片控制语句,会在普通模式下拖几条命令.并为此兴奋不已.
    第三层,简单事件境界.此时发现使用按钮和影片剪辑的事件处理器感觉好爽,于是大用特用,大堆的on,onClipEvent便诞生了.
    第四层,复杂帧境界.此时发现把代码写在按钮上十分不爽,十分不便于以后修改与维护,渐渐发现把所有代码尽量往帧上放是一件很爽的事.并且能用对象或函数来简化重复出现的语句,比如大量复制的影片剪辑事件的添加.尤其喜欢用路径,绝对路径.
     第五层,少有代码境界.此时发现代码写在帧上也十分不爽,转而把代码都放到外部文件,再用#include包含进帧.这还是次要的,主要的是对Class 文件有点儿爱不释手,恨不得把所有动作全变成方法写进Class里面.实际帧中的代码已经很少,而且路径运用较少,因为类中属性直接指向路径.忽地想起很 久没用_root,怪是想念.
    第六层,无代码境界.此时发现代码已经碍手碍脚,开始向往无代码的傻瓜操作,于是把相关功能封装成类,相关效果封装成组件,只需改改属性值就可以使用.把痛苦留给最初,组件写好后就前途一片光明了.
    第七层,后代码境界.此时对OOP思想已有深入了解,时间轴早已荒废许久,兴趣不再是做做Flash效果,开始扩展到相关领域.也学会用JSFL偷懒,Flash做前台,XXX做后台,通过若干API连接,已经把Flash应用远远超越其本身.
    第八层,神的境界.Flash之父莫敢说达此境界.学无止境,抑或尚未达此境界时,Flash已然淘汰.

******************************************************

    Copied from 江瑶Blog. I like this blog very much btw. Very informative, frequently updated.

    Anyway, I am at level 1 @ the year of 2002-2003. Just a little kid in this area. At year 2004~2006 I kinda upgraded to level 2, and did several flash clips for friends and hall events. In March 2007 I found my current job in Learning Edvantage, and did 1.5k lines of AS code on my first project (total naive coding). That is when I reached the 3rd level. Spending 3 month in this company, I jumped to level 5. And studied how to write components, though soon found out that it’s not really practical on my work-ground.

    Slacking for another 2 month and studying php-mySQL and mainly ASP.NET+MSSQL.

    Now most of the time doing crappy work, at the same time exploring level 7.

    学无止境。

   

written by admin \\ tags: , ,

Jul 10
_global.queryload = function(clip, intervalname) {
	clip.bytes_loaded = Math.round(clip.getBytesLoaded());
	clip.bytes_total = Math.round(clip.getBytesTotal());
	trace(clip.bytes_loaded + " / " + clip.bytes_total);
	if ( clip.bytes_loaded == clip.bytes_total ) {
		trace("done");
		trace(_root[intervalname]);
		clearInterval(_root[intervalname]);
	}
}
// To check internally, call it this way:
// preloader = setInterval(queryload, 500, this, "preloader"); 
// To check externally, call it this way:
// container.loadMovie("catnap.jpg");
// preloader = setInterval(queryload, 500, container, "preloader");

from

*************************************************************

A smart way to do the preloading in flash, quite useful.

written by admin \\ tags: , ,

Jul 03

Today found out something strange at work. In flash 8 (prof.), if we set a dynamic text box with embedded font, it’s better not to set the “letter spacing” property of the text box. It turned out the proper font could not be displayed.

I am not sure if it’s the flash 8 or AS2 problem. Please enlight me if you know the solution :-)

written by admin \\ tags: , ,