Hello, I think your create function is not in class instance scope (because inline) : should be static or from an instance of "Dohickey" to work, I think.
thomas parquier --- http://www.web-attitude.fr/realisations/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net <sip%3awebattit...@ekiga.net> téléphone portable : +33601 822 056 2010/1/18 Guy Morton <g...@alchemy.com.au> > > > Hello people, > > I hope someone here can point me in the right direction here. > > I have a class in my codebase that defines objects that contain functions > eg (pseudocode): > > package com.my.package { > > import flash.events.EventDispatcher; > > public class Dohickey extends EventDispatcher { > > public var thingy:Whatsit; > > public function init():void { > > doThings.create(); > > } > > public var doThings:Object = { > > create: function():void { > > if ( ! thingy ) { > thingy = new Whatsit(); > } > > } > }; > > } > } > > Now, if I build to Flash Player 9, I can call init() on the above code and > doThings.create() will run and create a new Whatsit into the thingy > variable. > > If I build it to Flash Player 10, I get an error saying > > ReferenceError: Error #1069: Property com.my.package:Dohickey::thingy not > found on Object and there is no default value. > at <anonymous>()[/Users/guy/Documents/Flex Builder 3/../Dohickey.as:19] > at com.my.package::Dohickey/create()[/Users/guy/Documents/Flex Builder > 3/../Dohickey.as:11] > > Can someone explain why? > > Please? :-) > > Guy > > >