The problems you are having are related to very basic actionscript and object oriented programming knowledge. Don't get me wrong, I'm in no way blaming you, I just want to give you the advice to read some documentation about AS and OO programming because otherwise you will be loosing much time with basic things! You can start with "Programming ActionScript 3.0" from the Flex documentation: http://livedocs.adobe.com/flex/3/html/help.html?content=Part6_ProgAS_1.html
Now to the problem. You are getting this error because the "Name" field is not defined where you are calling it, but in the FormComponent. If you instantiate the FormComponent with an id of "form" for example, you can access it with: form.Name. Note that it has to be declared public in the component to be able access it from outside the component. Hope it helps! On Thu, Oct 16, 2008 at 9:10 AM, brucewhealton <[EMAIL PROTECTED]>wrote: > Hi, thanks for the help. I did what you mention below. Someone else > posted somethingsimilar about putting the Object property into the > function. > > It still doesn't like that yet. It gives me an error on the line in > the function where I am assigning values to the Object properties... > Specifically it doesn't like: > obj.Name = Name.text; > it says: Access to undefined property Name > > Now, one problem might be that I am not passing any parameters to the > function. > I'll see about the way you specified the function and see if that > fixes things. > > To see more specifically what I did, please click on this to download > the zip archive file of my Flex Project: > > http://fwweb.biz/ContactForm.zip > > thanks, > Bruce > > --- In [email protected] <flexcoders%40yahoogroups.com>, "Haykel > BEN JEMIA" <[EMAIL PROTECTED]> > wrote: > > > > First forget what I said about the result handler because I thought you > > should receive the data from the service while in reality you want > to send > > it! > > > > Now back to the code in the CDATA block. It must be clear that the CDATA > > block is not a function!! It is like writing code for a class but > without > > the class block delimiters, I mean without "public class ClassName > {" and > > the closing "}". > > > > So this code is illegal in a CDATA block (more specifically the second > > line): > > > > var obj:Object = new Object(); > > obj.Name = Name.text; > > > > The second line must live in a function. In your case put the code > in the > > click event handler of the send button: > > > > private function sendButtonClickHandler(event:MouseEvent):void > > { > > var obj:Object = new Object(); > > obj.Name = Name.text; > > myContactService.send(obj); > > } > > > > > > > > On Thu, Oct 16, 2008 at 7:49 AM, brucewhealton > > > -- Haykel Ben Jemia Allmas Web & RIA Development http://www.allmas-tn.com

