In MXML, try getting the values from Application.application.parameters 


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Nathan
Sent: Tuesday, April 18, 2006 8:02 PM
To: [email protected]
Subject: [flexcoders] How do I access URL vars in onCreationComplete?

Hi

Disclaimer: I'm a Flash/Flex n00b.

I'm trying to build my first Flex 2 app.  I am going to the Flex app
from a HTML page where the user enters some info.  If I pass the info
via the URL, how can I access those URL vars within Flex?  I've read
Flash articles that seem to indicate you can simply reference by name.
 I'd like to use them when onCreationComplete() is executed to set some
initial variables which will be needed when getting other initial data
from the ColdFusion server.  

Is it as simple as this:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
   :
   creationComplete="onCreationComplete(urlVar1, urlVar2, urlVar3);">

        <mx:Script>
        <![CDATA[

        private function onCreationComplete(v1, v2, v3) : Void
        {
                ModelLocator.initialise(v1, v2, v3);
        }
        ]]>
        </mx:Script>

</mx:Application>

???

I would normally just try it and see if it works, but the app is still
very primitive.

Thanks

Nathan Drury





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



 





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