PDA

View Full Version : Flex and Actionscript 2?


gastip
04-15-2008, 02:12 AM
Hello all,

Can data returned by flex be used/accessed by actionscript2? Or can a Flex object be embedded in Actionsscript2?

I know this sounds crazy. :confused: I'm trying to help out a partner who uses actionscript, but not flex.

We're trying to access data returned by a webservice. We can get the data from Flex, and c#, but not from actionscript, so I'm really at a loss.

Any help would be greatly appreciated!!

kahuja
04-15-2008, 05:20 AM
Hello all,

Can data returned by flex be used/accessed by actionscript2? Or can a Flex object be embedded in Actionsscript2?




I really do not understand what are you trying to do here?

gastip
04-15-2008, 06:11 PM
Sorry. I worded that poorly. Let me try and simplify the problem.

Here is what I am using
to try and load the wsdl for the webservice. I keep getting an error
from the output console that no webservices were located. But I can hit the same webservice with the same wsdl in AS3 and Flex.


import mx.services.*;

// Create a new instance of web service
var service:WebService = new WebService("http://www.gastineautechnical.com/WebServices3.asmx?WSDL
");

// Call the method and assign it to the pending call object to handle
results.
resultObj = service.Login("xxxx","xxxx");

service.onLoad = trace("loading");

// the onResult function is called if the service is successful
resultObj.onResult = function(result) {
trace("result returned");
}

resultObj.onFault = function(fault) {
trace("fault");
}

Does anyone have any idea what I'm doing wrong?

j4kes
11-18-2008, 09:53 AM
What is the error you are getting?