Matt7902
February 9th, 2010, 08:40 AM
Here's my code so far:
package {
import flash.display.*;
import flash.events.*;
public class MVball extends MovieClip {
public var mass=0;
public var yvel=0;
public var xvel=0;
public function MVball() {
this.alpha=.2+Math.random()*.5;
this.addEventListener(Event.ENTER_FRAME, EventHandler);
}
puclic function atts(ma:int,xv:int,yv:int) {
mass=ma;
xvel=xv;
yvel=yv;
}
public function EventHandler(e:Event) {
this.x=this.x+xvel;
this.y=this.y+yvel;
}
}
}
the error, 1004: Namespace was not found or is not a compile-time constant, is found line 13, puclic function atts(ma:int,xv:int,yv:int) {
I'm confused because nowhere in my code have I defined any sort of namespace.
Thanks for your help.
package {
import flash.display.*;
import flash.events.*;
public class MVball extends MovieClip {
public var mass=0;
public var yvel=0;
public var xvel=0;
public function MVball() {
this.alpha=.2+Math.random()*.5;
this.addEventListener(Event.ENTER_FRAME, EventHandler);
}
puclic function atts(ma:int,xv:int,yv:int) {
mass=ma;
xvel=xv;
yvel=yv;
}
public function EventHandler(e:Event) {
this.x=this.x+xvel;
this.y=this.y+yvel;
}
}
}
the error, 1004: Namespace was not found or is not a compile-time constant, is found line 13, puclic function atts(ma:int,xv:int,yv:int) {
I'm confused because nowhere in my code have I defined any sort of namespace.
Thanks for your help.