html form post to flex app
I've got a flex app that is basically completed it uses Zend AMF to connect/supply data.
My app does have a login scre开发者_JAVA技巧en which seems to work fine. Now I'd like to add another login form on my site that would allows users to enter in username/password. When submitted form should pass the data to the flex app and bypass the application's login.
The only way I know how to do this is by passing the users input in the url which is obviously not ideal.
How can I post the form data to use as variables in flex?
There are two more methods I use.
1) Pass parameters to your swf via html embed and read it in swf on load (using FlashVars):
http://kb2.adobe.com/cps/164/tn_16417.html
2) Write login data to browser cookies and read it in swf (using calls to JavaScript in your page via ExternalInterface):
Accessing browser cookies from Flex
I used library from checked answer to the question above, it's working.
Send your user's input to the server trough your form, if the login is successful, open your flex app.
Since it will be on the same session, your flex app will be able to get user’s information from the server and if it's there, bypass the flex app login.
精彩评论