Have you used Object.registerClass() ?

Object.registerClass("ClientInfo", full.namespace.to.ClientInfo);

First parameter is the .NET object type, second is the full AS2 classpath.

Also make sure the class gets compiled in the swf, so somewhere in the fla add:

import full.namespace.to.ClientInfo;
var clientInfo:ClientInfo;

regards,
Muzak


----- Original Message ----- 
From: "Randy Tinfow" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, April 26, 2007 10:21 PM
Subject: [Flashcoders] Flash Remoting in AS2 w/ .NET


.NET Code:

asoClientInfo.ASType = "ClientInfo";
asoClientInfo.Add("id", ds.Tables[0].Rows[0]["ID"]);
asoClientInfo.Add("name", ds.Tables[0].Rows[0]["Name"]);
asoClientInfo.Add("logo", ds.Tables[0].Rows[0]["Logo"]);
htReturn.Add("clientInfo", asoClientInfo);  //this is a hashtable
Flash.Return = htReturn;

I have an ActionScript class called ClientInfo that has the same
properties that are being returned here (id, name, logo).  I am trying
to assign the result as an instance of this class, like this:



function gotData(re:ResultEvent)

{
            var ci:ClientInfo = ClientInfo(re.result.clientInfo);
}

But it isn't working, none of the properties are accessible.  Im not
sure if what I'm trying to do is even possible, maybe someone can shed
some light on this?



MR


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to