You are currently browsing the category archive for the 'Programming' category.

Flash Loading 的感慨

http://www.wowbox.com.tw/blog/article.asp?id=3209

做Flash用三格..

1. preloader

2.resources  //將library 中recourses  輸出到第二格

3.init

FLASH程式優化

http://www.wowbox.com.tw/blog/article.asp?id=3043

在架flash站前停一停, 想一想, 看看下面兩篇

Flash網站架構

http://blog.albertlan.com/archives/74

Flash為甚麼被人嫌棄

http://blog.albertlan.com/archives/272

Currently developing an application using flex air. One tricky point is what I need flex to interact with flash animation which loads by a SWFLoader .

Found that the hierarchy, from SWFloader to the timeline of flash is as follow :

the functions I need to call are on the timeline level. Therefore we call the functions through the path:

((swfLoader.content as MovieClip).getChildAt(0) as Loader).content

say we call a function “foo” inside timeline of the flash animation

(((swfLoader.content as MovieClip).getChildAt(0) as Loader).content).foo();

Don’t forget adding an event listener Event.ADDED before calling. Otherwise, you may get call to null reference error.

Made a handy class for my goal

import flash.display.DisplayObject;
import flash.display.Loader;
import flash.display.MovieClip;
import mx.controls.SWFLoader;
public class SWFLoaderTimeline {
public static function getTimeline(swfLoader:SWFLoader):MovieClip {
if (swfLoader && swfLoader.content ) {
var contentMc:MovieClip = (swfLoader.content as MovieClip);
if (contentMc && contentMc.getChildAt(0) is Loader) {
return ((contentMc.getChildAt(0) as Loader).content as MovieClip);
}
else {
trace(“SWFLoaderTimeline error: loader is null”);
return null;
}
}
else {
trace(“SWFLoaderTimeline error: swfLoader or swfLoader content is null”);
return null;
}
}
}

終於搵到點搵返3D object係2D projection的位罝

myDisplayObject3D.calculateScreenCoords(camera)

以前試過做3D GUI, 無奈經bitmap render的MovieAsset material品質太差, 用作Game texture還可以, 但是用於有文字的GUI上則使文字難以閱讀

得到Projection的coordinates的話就可以輕易將controls 放係上面掩人耳目

來源:

http://www.dreaminginflash.com/category/papervision3d/

Adobe announced releasing free license for the unemployed.

Though Adobe has been providing free student licenses,

this one still seems temptative :)

more info:

Adobe offers free Flex 3 license to unemployed developers

To apply

https://freeriatools.adobe.com/learnflex/?PID=1225267

Improved version

Older version

Read also: Driving game – ARToolKit

load3d

To load a 3Ds Object into Processing, there are 2 elements needed.

1. OBJLoader for Processing, which is a Processing library .

2. a convertor such as quick3D.

Firstly, I converted a 3DS object to obj with quick3D professional.

Then import the obj just created into Processing through library OBJloader.

The result was as upper image.

Links

OBJLoader for Processing

quick3D Professional 4.0

sc1

Having fun with programming this driving game which is making use of ARTookit and Color Recognition :)

http://www1.bbiq.jp/kougaku/ARToolKit.html

Categories

Blog Stats

  • 6,215 hits