Flash has the predecessor Tree (although, Flex's really really rocks compared to Flash's), and Tabs came on a later DRK, not included with Flash.  The code I posted works in Flash as well; just remove the tags.
 
----- Original Message -----
Sent: Wednesday, October 12, 2005 8:00 AM
Subject: RE: [flexcoders] Re: WebServices via ActionScript

And to answer your last question, Flash doesn't have the fun UI widgets like Trees and Tabs and all those goodies (@ least, I believe that is true...).  Does Flash support WebServices?


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wolf
Sent: Tuesday, October 11, 2005 5:55 PM
To: [email protected]
Subject: [flexcoders] Re: WebServices via ActionScript

I may be out of the loop because I couldnt see which thread you broke
from but....

You can turn on the keep-generated to keep the generated AS from a
<mx:WebService> call to prove its possible as well.  Since at runtime
the J2EE Servlet Filter is generating AS from the <mx:*> tags pretty
much anything you can do in a tag you can do in AS right?

The real question is why?  You used to see this in JSP development a
lot (Since JSP is a nearly direct analog to Flex) in that JSP
developers would just make huge scriplet sections and do everything in
Java. Eventually it reached the point that why not just write a darn
servlet.  Since at runtime the JSP is just codegenerated to java and a
servlet runs.

Flex is the same right.  The MXML is code generated in AS.  I worry
about Flex ending up like JSPs with huge script sections and wondering
why you didnt just use Flash itself.



Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY x85


--- In [email protected], "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> Starting a new thread since we hijacked the other one.
>
> I tested this and it works in Flex 1.5 and Flash 8.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
>  initialize="getFunky()">
>  <mx:Script>
>  <![CDATA[

>  import mx.services.WebService;
>  import mx.services.PendingCall;

>  var myWebServiceObject:WebService;
>  var MyPendingCallObject:PendingCall;


>  public var debug_str:String = "";

>  function getFunky()
>  {
>   d("WebService: " + WebService);
>   var theURL = "http://radio.tapper.net/artist.cfc?wsdl";
>   myWebServiceObject = new WebService(theURL);
>   MyPendingCallObject = myWebServiceObject.getCurrentSong();
>   d("Made call...");
>   MyPendingCallObject.>>   {
>    mx.core.Application.application.d("result: " + result);
>    for(var p in result)
>    {
>     mx.core.Application.application.d(p + ": " + result[p]);
>    }
>   }
>   MyPendingCallObject.>>   {
>    mx.core.Application.application.d("fault: " + fault);
>    for(var p in fault)
>    {
>     mx.core.Application.application.d(p + ": " + fault[p]);
>    }
>   }
>  }

>  function d(o)
>  {
>   debug_str += o + "\n";
>  }


>  ]]>
>  </mx:Script>

>  <mx:TextArea text="{debug_str}" width="400" height="300" />
> </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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to