maguskrool
Technical User
Hello. I've created a simple custom class that extends Sprite and called it Sprite2. It has no specific methods nor is it in any way different from Sprite, it just extends it. When I create instances of Sprite2 and try to access properties like rotationX/Y/Z or z, I get an error saying "1119: Access of undefined probably property...". If I insert a simple trace (z); in the constructor, I get "1120: Access of undefined property z..."
I don't understand why this happens, is this some CS4 bug? I have installed the latest updates.
Here is the code I used:
I appreciate all the help.
I don't understand why this happens, is this some CS4 bug? I have installed the latest updates.
Here is the code I used:
Code:
//Sprite2.as
package com.stuff {
import flash.display.Sprite;
public class Sprite2 extends Sprite {
public function Sprite2():void {
}
}//End of class.
}//End of package.
//.fla
import com.stuff;
var mySprite:Sprite2 = new Sprite2();
trace (mySprite.x); //returns 0
trace (mySprite.z); //error: 1119: Access of probably undefined property z...
I appreciate all the help.