document-class

Accessing the Document class in AS3

折月煮酒 提交于 2019-12-30 03:03:09
问题 How can instantiated classes access the Document class? Even after I name the Document class using the Properties bar in Flash, attempting to access it from other classes usually fails, saying "attempting to access an undefined property... One solution is always casting the Document class to itself! eg. Main(Main).globalMethod(); But sometimes even this stellar gotcha fails, and then there's usually no way out, apart from the obvious! class Other{ var parentClass:Main; public function Other

Custom AS3 Class not Updating

这一生的挚爱 提交于 2019-12-25 08:26:22
问题 I've had a similar issue to this, but the means that I solved the last one are not working here. I have a custom class that consists of 12 separate .as modules. They're declared in the document class as follows: import trailcrest.v1.s3.averta; import trailcrest.v1.s3.chronos; import trailcrest.v1.s3.eripio; import trailcrest.v1.s3.fabrilla; import trailcrest.v1.s3.gradua; import trailcrest.v1.s3.lingua; import trailcrest.v1.s3.navigare; import trailcrest.v1.s3.pedem; import trailcrest.v1.s3

Accessing the Document class in AS3

五迷三道 提交于 2019-11-30 08:26:17
How can instantiated classes access the Document class? Even after I name the Document class using the Properties bar in Flash, attempting to access it from other classes usually fails, saying "attempting to access an undefined property... One solution is always casting the Document class to itself! eg. Main(Main).globalMethod(); But sometimes even this stellar gotcha fails, and then there's usually no way out, apart from the obvious! class Other{ var parentClass:Main; public function Other(parent:Main){ parentClass = parent; // pointer to the Main class in a local var! Main(parentClass)