google spreadsheet flash

Google spreadsheet and flash part 2 – A Read/Write example

Sunday, February 8th, 2009 | Actionscript 3 | 5 Comments

I’ve iterated up the previous example showing how to save data from a Google Spreadsheet, to add in the ability to load the data from the spreadsheet as well. Googles service in impressively fast, and works well with concurrent users. This is however no substitute for a proper database, and shouldn’t be used as such.

Personally i’ve got loads of great ideas on how to use this, things like adding feedback/bug reporting functionality into projects. Clients love the transparency and easy of use of the Google Spreadsheets.

Get Adobe Flash player

All you need to do is have a php server, download the source code, create a google spreadsheet with form functionality, be sure to publish it as well with the auto republish flag set as well, change to source code with the key from your spreadsheet and do a simple request to find the id of the worksheet.

Here’s the spreadsheet being edited. – http://spreadsheets.google.com/ccc?key=pyxyLmVwUP3OtKbRWR-x3LA&hl=en

Tags:

Using Google Spreadsheet forms with Flash

Saturday, August 2nd, 2008 | Actionscript 2, Actionscript 3 | 7 Comments

Overview

Google Spreadsheet forms are an ideal way to collect information from users, like messages, comments or feedback. You don’t need to do any work on your part to store it, no databases, files or anything like that. It relies only on the fact that you have a google account, and can put together a very simple spreadsheet form.

As a very simple example, if you were making a flash site for a client and wanted to put in a contact form that users could add messages to a stored list, then this would be an ideal way to provide a solution that you wouldn’t have to maintain, and that your client would have instant access to in an easy format. They can even output it to excel.

Format

All you need to do is pass in your LoadVars or URLVariables in post format variables like this:

sender["entry.0.single"]  = “my string to add to spreadsheet”;

Where the number between entry and single is an incrementing number denoting the control in the form to mirror. So in this example the entry.0.single represents the name text field control in the google spreadsheet form.

Crossdomain and php proxy

Unfortunately the google spreadsheets crosssdomain.xml does not allow flash content to access the spreadsheets url but by using a fairly simple php proxy we can easily get round this.

So the LoadVars/URLLoader calls the local GoogleSpreadsheetProxy.php passing all the vars and the url for submitting the spreadsheet and simply proxys the request via the url passed.

Spreadsheet document the example feeds into:

http://spreadsheets.google.com/ccc?key=pyxyLmVwUP3PhX7wp6GV_SQ&hl=en

Example:

Source Code Flavours:

Download As2 Flash 8 Version .zip

Download As3 Flash 9 Version .zip

Tags: , , ,

Search