hi
,
I want to upload file to server using flex that how can i
send the file from flex also what is the option in fle x by which it
opens the local system.please help me regarding this matter.
Bikram
Kishore Sahu
-----Original Message-------- In [email protected], "Theodore E Patrick" <[EMAIL PROTECTED]> wrote:
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of cshafer213
Sent: Friday, July 08, 2005 5:43 PM
To: [email protected]
Subject: [flexcoders] Re: XML Socket Doesn't Work
Ted,
Thanks! It is working now.
- Chris
> Ah, there are 2 errors is there, socket is a temporary variable
within the
> connect method and null is not a valid value for the server.
>
> Think of the <mx:Script> block as a class (because it is at runtime). I
> made this mistake first time round the MXML tree.
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
> <mx:Script>
> <![CDATA[
>
> import mx.utils.Delegate;
>
> var socket:XMLSocket
>
> public function serverConnected(success:Boolean) {
> if (success) {
> stat.text="Status = Connected";
> } else {
> stat.text="Status = Error";
> }
> }
>
> public function connect(event){
> socket:XMLSocket = new XMLSocket();
> socket. this , serverConnected
> );
> socket.connect( 'localhost' , 9875);
> return
> }
> ]]>
> </mx:Script>
> <mx:Text text="XMLSocket Test App" width="205" textAlign="center" />
> <mx:Button label="Connect to XML Server" click="connect()" />
> <mx:Label id="stat" text="Status = " width="144"
textAlign="center" />
> </mx:Application>
>
> Cheers,
>
> Ted ;)
>
>
> > -----Original Message-----
> > From: [email protected]
[mailto:[EMAIL PROTECTED] On
> > Behalf Of cshafer213
> > Sent: Thursday, July 07, 2005 8:18 PM
> > To: [email protected]
> > Subject: [flexcoders] Re: XML Socket Doesn't Work
> >
> > --- In [email protected], "Theodore E Patrick" <[EMAIL PROTECTED]>
wrote:
> > Thanks for responding and putting me on the right track. I changed my
> > code to add the Delegate as best I could but I still can't get it
working:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
> > <mx:Script>
> > <![CDATA[
> > import mx.utils.Delegate;
> > public function serverConnected(success:Boolean) {
> > if (success) {
> > stat.text="Status = Connected";
> > } else {
> > stat.text="Status = Error";
> > }
> > }
> >
> > public function connect(event){
> > var socket:XMLSocket = new XMLSocket();
> > socket. this, serverConnected );
> > socket.connect(null, 9875);
> > return
> > }
> > ]]>
> > </mx:Script>
> > <mx:Text text="XML Test App" width="205" textAlign="center" />
> > <mx:Button label="Connect to XML Server" click="connect()" />
> > <mx:Label id = "stat" text="Status = " width="144"
textAlign="center" />
> > </mx:Application>
> >
> >
> > > Chris,
> > >
> > > You need to use Delagate with XMLSocket callbacks.
> > >
> > > This should work:
> > >
> > > import mx.utils.Delegate;
> > >
> > > sock. this, sockOnClose );
> > >
> > > sock. this, sockOnConnect );
> > >
> > > sock. this, sockOnData );
> > >
> > > Cheers,
> > >
> > > Ted ;)
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: [email protected]
> > [mailto:[EMAIL PROTECTED] On
> > > > Behalf Of cshafer213
> > > > Sent: Thursday, July 07, 2005 2:12 PM
> > > > To: [email protected]
> > > > Subject: [flexcoders] XML Socket Doesn't Work
> > > >
> > > > Can Anyone Tell Me what is wrong with the following code to
connect to
> > > > an XML socket server? The stat Lable should display either
"status =
> > > > Connected" or "status = Error" when the button is clicked, and
nothing
> > > > is happening.
> > > >
> > > > Thanks,
> > > >
> > > > Chris Shafer, George Weiss Associates
> > > >
> > > > <?xml version="1.0" encoding="utf-8"?>
> > > > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
> > > > <mx:Script>
> > > > <![CDATA[
> > > >
> > > > public function serverConnected(success:Boolean) {
> > > > if (success) {
> > > > stat.text="Status = Connected";
> > > > } else {
> > > > stat.text="Status = Error";
> > > > }
> > > > }
> > > >
> > > > public function connect(event){
> > > > var socket:XMLSocket = new XMLSocket();
> > > > socket.>> > > > socket.connect(null, 9875);
> > > > return
> > > > }
> > > > ]]>
> > > > </mx:Script>
> > > > <mx:Text text="XML Test App" width="205" textAlign="center" />
> > > > <mx:Button label="Connect to XML Server" click="connect()" />
> > > > <mx:Label id = "stat" text="Status = " width="144"
> > textAlign="center" />
> > > > </mx:Application>
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Flexcoders Mailing List
> > > > FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?>---- HM ADS ?>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?> ---- HM ADS ?>
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

