all groups > macromedia flash flash remoting > may 2004 >
You're in the

macromedia flash flash remoting

group:

How to pass ASObject back to .Net Assembly?


How to pass ASObject back to .Net Assembly? mrism
5/27/2004 10:09:46 AM
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
Re: How to pass ASObject back to .Net Assembly? panorezo
6/2/2004 10:43:20 AM
Hi !!

see this page. It explain the opposite process : ASObject from .Net to Flash.

Hope this help.


Re: How to pass ASObject back to .Net Assembly? panorezo
6/2/2004 10:43:33 AM
Hi !!

see this page. It explain the opposite process : ASObject from .Net to Flash.


http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/usingFRN
ET6.htm#1178906

Hope this help.


Thierry
Re: How to pass ASObject back to .Net Assembly? mrism
6/4/2004 7:01:24 PM
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.
Re: How to pass ASObject back to .Net Assembly? Rooster60602
8/16/2004 7:18:00 PM
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?
Re: How to pass ASObject back to .Net Assembly? mrism
8/17/2004 1:24:54 PM
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
}
}


Re: How to pass ASObject back to .Net Assembly? Rooster60602
8/17/2004 2:39:22 PM
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!
Re: How to pass ASObject back to .Net Assembly? Rooster60602
8/31/2004 3:20:49 PM
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..."
AddThis Social Bookmark Button