actionscript 3 - Error #1009: Cannot access a property or method of a null object reference.on camera -


im working on augmented reality application augmented object can touched hands. has motion detection in it. build using flartoolkit , away3d.

i made augmented reality , motion detection part. problem combined them,

i class motion detection http://blog.soulwire.co.uk/code/actionscript-3/webcam-motion-detection-tracking

whenever try run program, error #1009: cannot access property or method of null object reference.on camera

from analyze, code cant differentiate camera use. if can show hot fix it, me lot

here's initialization camera in augmented reality part

this.flarmanager.removeeventlistener(event.init, this.onflarmanagerinited);          this.camera3d = new flarcamera_away3d(this.flarmanager, new rectangle(0, 0, this.stage.stagewidth, this.stage.stageheight));         this.view = new view3d({x:0.5*this.stage.stagewidth, y:0.5*this.stage.stageheight, scene:this.scene3d, camera:this.camera3d});         this.addchild(this.view);          this.light = new directionallight3d();         this.light.direction = new vector3d(500, -300, 200);         this.scene3d.addlight(light); 

and here's initialization camera in motion detection part

        var camw : int = 420;         var camh : int = 320;          // create camera         var cam : camera = camera.getcamera();         cam.setmode(camw, camh, stage.framerate);          // create video         var vid : video = new video(camw, camh);         vid.attachcamera(cam); 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -