Can you attach the mxml? I placed test() on the button so mayby that's why your having an issue?
On 11/7/09, James Thompson <[email protected]> wrote: > > Yes, I ran that code. Then I added > > test() > > so to function would fire. When I save the Flex project, I get the red x by > the test() telling me that test hasn't been defined. > I can't for the life of me figure out why something defined the line before > will come back as being undefined when I try to access it. > > On Sat, Nov 7, 2009 at 3:22 PM, Paul Kukiel <[email protected]> wrote: > >> >> Are you sure you ran that exact code? I just ran it and it worked fine. >> >> Paul. >> >> >> On Nov 7, 2009, at 4:18 PM, James Thompson wrote: >> >> > >> > Tried that as well, but when I run the function, I get the same 1120 >> > error >> > code. >> > >> > On Sat, Nov 7, 2009 at 3:06 PM, Paul Kukiel <[email protected]> wrote: >> > >> >> >> >> Try it liek this: >> >> >> >> <mx:Script> >> >> <![CDATA[ >> >> public var testArray:Array = new Array(1); >> >> public function test():void{ >> >> testArray[0] = "testt"; >> >> trace(testArray); >> >> } >> >> >> >> ]]> >> >> </Mx:Script> >> >> >> >> <mx:Button x="99" y="59" label="Button" width="600" >> >> click="test()"/> >> >> >> >> Paul. >> >> >> >> >> >> On Nov 7, 2009, at 3:40 PM, James Thompson wrote: >> >> >> >>> >> >>> Even using this following code, I get the same error... >> >>> >> >>> <?xml version="1.0" encoding="utf-8"?> >> >>> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >> >>> layout="absolute"> >> >>> <mx:Style source="style/style.css"/> >> >>> <mx:Script> >> >>> <![CDATA[ >> >>> public var text:Array = new Array(); >> >>> public var word:String = 'my word'; >> >>> trace(word); >> >>> ]]> >> >>> </mx:Script> >> >>> <mx:Button x="99" y="59" label="Button" width="600"/> >> >>> </mx:Application> >> >>> >> >>> Does anyone have ANY input on why I am getting: >> >>> 1120 Access of undefined property word ?????? >> >>> >> >>> Thanks >> >>> >> >>> On Sat, Nov 7, 2009 at 12:49 PM, James Thompson <[email protected]> >> >>> wrote: >> >>> >> >>>> Yes Simon. Problem still is there. Funny thing is Script works fine >> >>>> in >> >>>> flash >> >>>> >> >>>> >> >>>> On Nov 7, 2009, at 12:28 PM, Simon Nicol <[email protected]> >> >>>> wrote: >> >>>> >> >>>> >> >>>>> Hey James, >> >>>>> >> >>>>> Do you not mean >> >>>>> >> >>>>> trace(testArray); not trace(textArray); ?? >> >>>>> >> >>>>> Simon >> >>>>> >> >>>>> 2009/11/7 James Thompson <[email protected]> >> >>>>> >> >>>>> >> >>>>>> I am about to lose it over here! Can some please help! I am >> >>>>>> simply trying >> >>>>>> to >> >>>>>> populate an array and trace it out. I keep on getting >> >>>>>> 1120 access of undefined property testArray. My code is as >> >>>>>> follows. I >> >>>>>> have >> >>>>>> created hundreds of arrays before never had this problem. PLEASE >> >>>>>> HELP >> >>>>>> ME!!!! >> >>>>>> >> >>>>>> Thanks >> >>>>>> >> >>>>>> <?xml version="1.0" encoding="utf-8"?> >> >>>>>> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >> >>>>>> layout="absolute"> >> >>>>>> <mx:Style source="style/style.css"/> >> >>>>>> <mx:Script> >> >>>>>> <![CDATA[ >> >>>>>> public var testArray:Array = new Array(); >> >>>>>> testArray[0] = "testt"; >> >>>>>> trace(textArray); >> >>>>>> ]]> >> >>>>>> </mx:Script> >> >>>>>> <mx:Button x="99" y="59" label="Button" width="600"/> >> >>>>>> >> >>>>>> >> >>>>>> </mx:Application> >> >>>>>> >> >>>>>> >> >>>>>> James >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>> >> >>> >> >>> >> >> >> >> >> > >> > >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4887 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
