> Two questions.
> 
> #1 - Can a Flex 2 app know the URL of the browser window it 
> is currently loaded into?

Yes.

var baseurl:String = Application.application.url;

> #2 - Can Flex 2 access URL parameters of the current browser window?

Yes.

Given a URL like this:

http://yoursite.com?myName=reiner&myHometown=Berlin 

You could do something like this if you know the param names:

                private function initVars():void {
                        myName =
Application.application.parameters.myName;
                        myHometown =
Application.application.parameters.myHometown;
                }

Or this if you don't:
                
                private function iterateOverArguments():void {
                        for (var i:String in
Application.application.parameters) {
                                trace(i + ":" +
Application.application.parameters[i]);
                        }
                }

This is described in the Flex 2 Developer's Guide here: 

http://livedocs.macromedia.com/flex/2/docs/00001003.html

hth,

matt horn
flex docs





--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to