It should be;
// you need the import AND use namespace
// if you don't have the import, the compiler has no idea what flash_proxy is in the namespace call
import flash.utils.flash_proxy;
use namespace flash_proxy;
flash_proxy override function callProperty(methodName:*, ...args):* {
return "ProxyB: " + methodName;
}
}
}
Peace, Mike
Hello Danny,
To use namespace you should use this syntax "use namespace" instead of "import"
So just try that:
use namespace flash_proxy ; //instead of import flash.utils.flash_proxy;
Cheers,
De Ridder Yaniv
Flex Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKm: +44 (0) 7758 643 37 81
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Danny Patterson
Sent: Wednesday, August 23, 2006 5:19 AM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Extending a subclass of Proxy
I'm trying to extend a subclass of the Proxy class and I'm getting an error. Here is an example of my problem:
// ProxyA.as
package {
import flash.utils.Proxy;
import flash.utils.flash_proxy;
public class ProxyA extends Proxy {
flash_proxy override function callProperty(methodName:*, ...args):* {
return "ProxyA: " + methodName;
}
}
}
// ProxyB.as
package {
import flash.utils.flash_proxy;
public class ProxyB extends ProxyA {
flash_proxy override function callProperty(methodName:*, ...args):* {
return "ProxyB: " + methodName;
}
}
}
// ProxyBugExample.as
package {
import flash.display.Sprite;
import flash.utils.Proxy;
public class ProxyBugExample extends Sprite {
public function ProxyBugExample() {
var proxy:Proxy = new ProxyB();
trace(proxy.test());
}
}
}
I the ProxyB class I get the following error:
Namespace was not found or is not a compile-time constant.
I assume this is referring to the flash_proxy namespace, but it is imported just like in the ProxyA class. I'm not sure what the problem here is, any help would be appreciated.
Thanks,
Danny
--
What goes up, does come down. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- RE: [flexcoders] Extending a subclass of Proxy Yaniv De Ridder
- Re: [flexcoders] Extending a subclass of Proxy Michael Schmalle
Reply via email to


