Posts

Showing posts from April, 2010

Why i like to use Casalib

I just started playing Actionscript 3.o. And I got some problem with Evnts. My code looks like something like this. My movieClip Class is like this. package{ import flash.display.MovieClip; import flash.events.Event; public class MC extends MovieClip { var val=1; var _o; public function MC() { _o=this; _o.addEventListener(Event.ENTER_FRAME,onLoop); } private function onLoop(e:Event) { trace(val); val++; } } } It's the code in the main.fla b1_btn.addEventListener(MouseEvent.MOUSE_DOWN,clicked); var m:MC=new MC(); addChild(m); function clicked(e:MouseEvent) { removeChild(m); m=null; } The problem i get is with enterframe. After removing the Movieclip from the stage, enterframe don't stop it's working. So i posted this in forums. It's the problem of garbage collection. Till now am playing with Actionscript 2.0 i never think about the garbage collection. The solution is to remove listeners manually or just use REMOVED_FROM_STAGE or REMO

External models in Papervision3D

I think am taking a bit more interest in Actionscript 3.0 . Coz now am trying Papervision3D . The thing attracted me most is the loading of external model to flash . So i searched google and got this book. http://blog.papervision3d.org/2009/09/03/papervision3d-essentials/ I got what am looking for , in the free chapter . First i can't understand a word from that .Coz i have little exposure in 3D. So i worked with my genius designer and after a a long struggle am able to load the external models to flash. I decided to document the steps. For this you need these 1. Flash professional 2. Autodesk 3D studio 3. Papervision3D http://blog.papervision3d.org/ 4. Collada plugin You can use 2 plugin's one is from here http://sourceforge.net/projects/colladamaya/files/ and another from open collada http://opencollada.org/download.html better use opencollada as it is has less dependancies. The former one requires updating the VC and DirectX . Download it from here http://www.micr