PDA

View Full Version : AS2 error message:Attribute used outside class.


cancerinform
11-04-2003, 01:06 PM
Attribute used outside class.

What exactly does that mean? I have two subfunctions to which this error points.

Thanks for any help.

farafiro
11-05-2003, 04:55 AM
cancerinform
welcome to the forums

the claas form is more like thatclass className extends MovieClip{
function myFunction(){
//here it goes
}
}so anything wrong would cause what u r asking here

cancerinform
11-05-2003, 05:09 AM
Thanks I found out that by mistake my 2 subfunctions were actually inside the constructor function but of course they have to be outside. That gave the error message.

correct:
class className extends MovieClip{
function myFunction(){
myFunction();
}
private function myFunction{
//function here
}
}
incorrect:
class className extends MovieClip{
function myFunction(){
myFunction();
private function myFunction{
//function here
}
}
}