Flex: How can I use the @ContextRoot in a Button or LinkButton
- by Dave Meurer
I'm trying to create a button that will simply link back to the context root. I noticed flex has a @ContextRoot attribute that appears to work only in certain cases. For example, if I try to use it in the following mxml:
<mx:Button label="Back to Root" click="navigateToURL(new URLRequest(@ContextRoot()), '_parent')"/>
I get the following error: Error: Attributes are not callable.
I can't seem to find this technique explained anywhere, is there another way?
Thanks for the help!
Dave