# Papervision - enterFrame Event

**URL:** <https://forum.kirupa.com/t/papervision-enterframe-event/270237>\
**Category:** flash\
**Created:** [September 7, 2008, 11:34am UTC](https://forum.kirupa.com/t/papervision-enterframe-event/270237 "2008-09-07T11:34:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanKnet](https://avatars.discourse-cdn.com/v4/letter/i/73ab20/32.png) [@ivanKnet](https://forum.kirupa.com/u/ivanKnet)\
**Post date:** [September 7, 2008, 11:34am UTC](https://forum.kirupa.com/t/papervision-enterframe-event/270237/1 "2008-09-07T11:34:31Z")

</div>

Hi,  
i want to add cubic cows to scene, make them running, when it will be far, they go back and run again. I have my own class in external package, it looks like this:

```auto

	public class Animal extends DisplayObject3D
	{
		private var body:Cube;
		private var ml:MaterialsList = new MaterialsList();  
					
        public function Animal(type:String):void {
            ml.addMaterial(new BitmapFileMaterial("lieupFiles/animal/"+type+"/side.png"), 'front');  
            //.....
			
                        body= new Cube( ml, 100, 200, 150, 2, 2, 2 );			
		 	this.addChild(body);
			this.addEventListener(Event.ENTER_FRAME, pohybuj);
			
        }		
		public function pohybuj(event:Event):void{
			trace("asdf asdfas");
			event.target.z+=3;
		}
	}

```

It works pretty good, but it doesnt add event listener (cubes keep staying at same place) Should i use any special type of Event?  
Thanks in advance!
