On Wednesday, Nov 20, 2002, at 16:17 US/Pacific, [EMAIL PROTECTED] wrote: > Ok folks, the use of CFC's in Flash and ColdFusion is driving me > bonkers.
Flash invokes CFCs in a manner that is very similar to Web Service consumption. Each invocation is 'new'. > This cannot possibly be the expected behavior. Yup, it is by design. Note that Flash Remoting preserves your session so that session scope exists and is consistent across repeated calls. What you need to do is create a facade that Flash calls methods on and have the facade manage the 'persistence' of your CFC instance. What we typically do (and I wrote this up in an article on DesDev - about Design Patterns for Flash Remoting) is to build all our components to work independently of their environment - as you did with your simple CFC - and then build specific facade CFCs that are used by Flash Remoting. Those facades create the necessary instances of the 'worker' components and store them in session scope. The facade CFCs themselves are stateless in that they have no public or private instance data and they are the *only* CFCs which 'know about' the environment, i.e., session scope. Hope that helps clarify? Sean A Corfield -- Director, Architecture Web Technology Group -- Macromedia, Inc. tel: (415) 252-2287 -- cell: (415) 717-8473 aim: seancorfield -- http://www.macromedia.com An Architect's View -- http://www.corfield.org/blog/ Introducing Macromedia Contribute. Web publishing for everyone. Learn more at http://www.macromedia.com/contribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm

