...

Flex login with CFC?

loki421
04-22-2010, 10:58 PM
Hi all,

I want to have a log in feature on an HTML site that features a Flex component for users to login. This uses ColdFusion.

I could do this just using a normal HTML form, but would rather have a pretty Flex box where users can log in.

Ok, so what i was wondering is
a) can this be done?
and
b) how would i go about doing this?

I've set up an Application.cfm that handles the user login from a normal HTML form, and tested it and it works ok.

What i'd like to know is how can i do this in a CFC from Flex? I have the query in the CFC, and the arguments passed from Flex are just #username# and #password#.

These are used to query the database and return an entry that matches. What should i pass back to Flex to tell it that the user is valid, and to get a new url (members area), and pass the session to the HTML so they can access their account? Does this make sense? It's kinda going through the Flex app and out to HTML.

Hope someone can point me in the right direction :)

Many thanks in advance all!

Inigoesdr
04-23-2010, 01:13 PM
You're looking for the RemoteObject component. Here is a document that has specific examples for CFCs: http://www.richinternet.de/blog/download/FlexCFC/FlexCFC-part1.pdf

loki421
04-23-2010, 01:22 PM
You're looking for the RemoteObject component. Here is a document that has specific examples for CFCs: http://www.richinternet.de/blog/download/FlexCFC/FlexCFC-part1.pdf

Thanks for that, but managed to crack this last night. Bit of a long way around but basicaly i build a URLRequest in Flex from the returned query, then pass that url to a loginProcess.cfm page where i create the session.

But thanks for the info, always good to brush up on things like that.

Cheers :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum