context: an mxml app, with classes written by me ( Zdemos) and Flare
classes. "myCanvas" is the id of a canvas in the flex part of the file
and it works.
.... I don't understand---

this compiles:

        public var myDemoClass:Zdemos ;
        public var myDataFilePath:String = "http://.....realdata2.xml"; ;
        private function init(): void {
       
            myDemoClass = new Zdemos(myCanvas,myDataFilePath); 
            myCanvas.addChild(myDemoClass.getUIComponent());
        }

this doesn't:

         public var myDemoClass:Zdemos ;
        public var myDataFilePath:String = "http://.....realdata2.xml"; ;

            myDemoClass = new Zdemos(myCanvas,myDataFilePath); 
            myCanvas.addChild(myDemoClass.getUIComponent());

Errors: "access to undefined property" myCanvas/myDemoClass/myDataFilepath

thanks for help
John
 

Reply via email to