Why can one class access root variables but another can't?
root.somepropertyofmain works in every class in my project (so far) except one. If I trace root from within both say [object main] but one of my classes wont let me access the main variables - it gives a compile error: Access of possibly undefined property name through a reference with static type flash.display:DisplayObject.
The property I'm trying to access is not undefined.It is declared and a value assigned to it in the class definition of Main.as, I cannot attempt to access any root variables from within this class, even ones that work in other classes.
The class that doesn't work is a class that is totally written in actionscript, when the app is run a movieclip (swatch_group) creates a bunch of these movieclips (paint_sample) within itself . When a paint sample is clicked it needs to know which item to apply itself to, which is a string stored in Main.as
It will let me do this:
|All times are GMT +1. The time now is 01:11 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.