macromedia flash flash remoting:
Hi Guys, Can any one help me out how can I pass back an ASObject back to .Net assembly method and then read the values from it in the assembly method to process it further ?? Thanks
Hi !! see this page. It explain the opposite process : ASObject from .Net to Flash. Hope this help.
thanks mate, yes.. i had already checked all those stuff out which really didn't help my cause. but i worked it out eventually with some trial & error. it's funny that there's absolutely nowhere i found the process of passing asobject back to .net and "actually processing" them. there's bits and pieces mentioned in Flash Remoting - The Definitive Guide by Tom Muck but it's crap because it's ends where it starts. But with God's grace i've worked out the solutions. thanks for your help.
Hi mrism-- How did you get this to work? I've been able to get objects from .NET into Flash, but not the opposite. I'm able to send objects to .NET without generating any errors, until I try to access one of the ASOBject key values (because inherits from HashTable)...at which I get a "Object reference not set to an instance of an object" error. Can you share how you got this to work?
I worked out this way.. I created a multidimensional array and passed back to ..net method. The parameter in .net method that accepts this array is of type ArrayList. The after just process the ArrayList as usual but you have to cast it with (ASObject) type. For eg : - public void getObjFromFlash(ArrayList myArr) { for (i = 0; i < myArr.Count; i++) { ASObject arrRec_ASO = (ASObject)myArr; arrRec_ASO["attribute1"].ToString(); arrRec_ASO["attribute2"].ToString(); //... similarly keep extracting the values of all the attributes of the array } }
Ah...thanks for the tip. I've been able to pass arrays to .NET, but with all the talk about passing objects "back and forth" between Flash and .NET, I thought there'd be a way to pass the object and it's properties directly. No wonder there isn't any info around on passing actual objects into .NET (including the documentation!)--doesn't appear to be possible. Thanks!
In case you're interested...I figured out how to pass a generic object to .NET without having to convert to array, etc. I'm going to post this under the title "Passing generic object to .NET: Here's how..."
Don't see what you're looking for? Try a search.
|