Hi,
If you are using flash remoting ( I hope ) then you can use the XML for the
same. This will work better then the array.
Hope this helps
Good Luck
Hemendra Singh Shaktawat
Mindfire Solutions
www.mindfiresolutions.com
Rooster60602 - 17 Nov 2004 13:39 GMT
Thanks--Yes, I'm using Flash Remoting. Problem is, it doesn't appear to
recognize strongly typed arrayLists. As for XML, I could convert my arrayLists
into XML and send these to Flash over XMLSockets, but this would defeat the
purpose of using Flash Remoting in the first place, wouldn't it? I've run into
no problems with plain old arrays--but Flash Remoting is choking on strongly
typed collections...Can anyone help?
Hi Rooster60602
I am using FlashMX 2004 Pro to create a rich front-end for an asp.net
application.
I send Arrays of objects between the two without a problem via webservices.
I have written identical C# objects and ActionScript objects.
On a webmethod, getting data into flash, I return a array of these objects,
MyObject[], not an ArrayList (maybe this helps)
Getting data from flash I pass in an object array from flash as a parameter
in a webmethod MyObject[]
Casting the items in the array, in both directions, works perfectly.
My object array in Actionscript is a class which 'kind of' derives from a
DataProvider.
When I say 'kind of' , it doesnt extend the DataProvider but calls
DataProvider.Initialize(Array); in the constructor, and implements most of a
dataproviders methods.
I use this to bind the data to a grid, and before I pass this into a
webservice call, I have a toArray() method which basically
iterates through the list, pushes the item onto an Array and returns the
Array (This must be serializing it in some way)
I havent used "Remoting" as I feel I am getting by without it.
HTH
Mark Redman
> I'm trying to get a strongly typed arraylist into flash from .NET, but Net
> Connection Debugger is only showing a delimited list of 'undefined' values. To
> fully separate presentation from business logic and data access layers, the
> ability to send structured data back and forth seems essential (something of
> particular importance when trying to wrap complex data into fewer objects for
> fewer calls through the gateway)...Any ideas?
Rooster60602 - 18 Nov 2004 13:01 GMT
Hi Mark-- It sounds like you've developed a more flexible way to pass data
between Flash and .NET than through remoting, and retaining the ability to bind
data makes your approach especially handy. I've used sockets to communicate
between Flash and .NET, but have never worked through web services. I'm also
curious about the way you've set up your structured data to mirror things on
both sides (i.e. get/set in objects for both sides?, array of hashtables that
map to ASObject in Flash or custom objects?, etc...)Is there any way you could
share some sample FLAs/VS project files? If so, feel free to contact me at
rooster60602@yahoo.com. Thanks! John