@ContextRoot() only gets interpreted by the MXML parser (so in the attributes or child tags of MXML); it does not get interpreted by the AS parser.  So you’ll need to do your own parsing to figure out the root.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Rick Schmitty
Sent: Monday, October 31, 2005 12:16 PM
To: [email protected]
Subject: [flexcoders] AS2.0 remoting with @ContextRoot()

 

Does the variable @ContextRoot() not work when making your own .as
class? or am I doing something wrong?  I've seen examples of setting
up the endpoint in the mx:RemoteObject tag with @ContextRoot() but I'd
like to get it working with the AS method too:
http://livedocs.macromedia.com/flashremoting/mx2004/actionscript_api_reference/mx/remoting/Service.html

this works:

var gateway="http://test.com/flashservices/gateway";
var service="com.test.foo";
var ro:Object;
ro = new Service(gateway,null,service,null,null);


this does not work:

var service="com.test.foo";
var ro:Object;
ro = new Service("@ContextRoot()/flashservices/gateway",null,service,null,null);

it will give me: "Looking up contextroot()..." in firefox's status bar

I've also tried no @ and/or making the string prior with {}'s, but no luck



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to