I would like to include a Flash component in a seaside page. The component needs to write data back to the seaside app. I can think of two ways to communicate with the server:
1. define a static URL, that the component can call, and somehow process the returned data 2. have a form embedded on the page (that contains the flash component) and get the component to write its data into the form, and then submit it I was going towards the first option, but Ramon put a comment on my blog that made me realise that I probably don't understand the seaside approach yet. So, could anyone give me a simple example of what they feel is the best approach? cheers Andy _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
I have no experience with Flash in general.
What I would try is to use scriptaculous request fonction but I don't know at all if that's possible. Something like in AS: ExternalInterface.call("request", "Params"); My 2 cents Cédrick ps: you might ask the seaside list for this one though _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Andy Burnett
> I would like to include a Flash component in a seaside page. > The component needs to write data back to the seaside app. I > can think of two ways to communicate with the server: > 1. define a static URL, that the component can call, and > somehow process the returned data > 2. have a form embedded on the page (that contains the flash > component) and get the component to write its data into the > form, and then submit it > > I was going towards the first option, but Ramon put a comment > on my blog that made me realise that I probably don't > understand the seaside approach yet. So, could anyone give me > a simple example of what they feel is the best approach? > > cheers > Andy Both options are viable. In your blog post you didn't exactly say what you were wanting to parse the request for, I was trying to tell you that under normal circumstances you don't need to do that, post your form and let Seaside bind the values up to your model for you. Flash talking to the server and saving data is not a normal circumstance. I'd use Scriptaculous to hook some event you're interested in so when that event occurred a callback was done to pass data back to the server using some JavaScript to read the data from the client side element if it's a simple value... html div onMouseOut: (html request callback: [ :value | value inspect ] value: (SUStream new nextPutAll: 'fetchFlashData()')) If it's more complex with a bunch of fields, I'd post a form back on some event as you state in #2... html div onMouseOut: (html updater id: #someStatusIndicator ; triggerForm: #someId ; on: #renderStatusOn: of: self) Or just use a request instead of updater if you don't care about showing any feedback. The form itself of course would be bound to instance variables of some class and rendered with either dynamic JavaScript generated using the generated id's of the fields so the Flash JS knows what field names to write into, or I'd just hardcode simple manual id's to the fields and use some static JavaScript bound to known names. Ramon Leon http://onsmalltalk.com _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Andy Burnett
Ramon and Cédrick
Thanks to you both for your suggestions. I shall go and try some experiments.
Cheers
AB _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |