Flash Player POST form submission to Google Drive #2048 Error - actionscript-3

So I have project in which I have a Google Drive spreadsheet with a linked form. An ActionScript 3 function is then filling in this data and submitting it. This is working fine... until I open the SWF in debug mode or outside of Flash Professional. I get a 2048 error about the security.
I've done some researching and it's all about accessing it and crossdomain.xml and all that. I didn't really understand it that much, although I understand roughly what the error is. Unfortunately I have not seen a solution to help me out yet.
The SWF and a basic HTML page will be hosted on a Google Sites page if that makes any difference.
So my question is how is the best way to go about this from here? Some form of crossdomain code? Some more AS3? Do I need to host a domain myself? (I'd rather not do this as I know practically no PHP nor much about any web server like MySQL or whatever.)

Related

How can I create a program or bookmarklet that can scrape facebook-chat messages for spam links?

There is a Facebook app which has enabled the depricated facebook-chat feature where users can chat whilst playing their game. Unfortunately there has been a dirge of spammers and scammers posting in this chatroom, which we would wish to automatically detect and send emails or some other alerts to us so that we can more immediately block/ban these users.
Is this possible somehow? What we've tried was to create a python scraping application but it wasn't immediately obvious how to log into facebook and get HTML of an app through a python call.
I've since been introduced to bookmarklets as a concept. Perhaps this could solve the issue? There could be some type of javascript code in a bookmarklet, and all one would need to do is load up the game, open the facebook-chat, and then click the bookmarklet, and leave the computer running 24-7. The javascript would parse the DOM for suspected scam links and send email reminders when found.
This is just me brainstorming possible ideas. I'm really not sure how to approach this automation problem, and I am not finding anything useful online either.

Distribute html app on pendrive

I have an html app, with html, js, css and images, which I need to distribute on a pendrive for Mac and PC. When users open the app, however, they're receiving security errors in their browser.
I'm looking for a simple solution to this, but I can't find any easy way of opening a html app from a pen drive. Any solutions would be greatly appreciated.
EDIT:
You are right The error come from ajax local call to xml files.
Anyone has a solution ?
In reference to question - How can I make local ajax calls to xml files when distributing my html project locally?
The users who are having problems is probably due to the browser they are using and the state the browser was initialised in, as some browsers by default allow local ajax calls to files and some don't.
You have two options.
To your users specify a browser to run it in (for example chrome automatically disallows local ajax calls however if started with the flag --allow-file-access-from-files it will allow this behaviour)
Host the files on a web-server either in the flash drive or externally.
I think I have the solution.
With the mongoose portbla web server, I can launch a small web server without installation on mac an pc.
I just have to find how to put my page as default.
I wish it will help someone with the same problem.

Calling a Google Drive SDK from Google App Script application

i have been going around in circles here and have totally confused myself. I need some help.
I am (trying to) writing an application for a client that in concept is simple. he want a google write document with a button. the google drive account has several folders, each shared with several people. when he drops a new file in one of the folders, he wants to be able to open this write file, this file is the template for his email. he clicks the button, the system calls the changes service in the Google Drive SDK https://developers.google.com/drive/manage-changes, gets the list of files that have been added since the last time it was checked, then pull the list of people that the file has been shared with, and use the write file as a template to send that list of people an email saying their file is ready.
SO, easy enough, right?
I started by looking at the built in functions in the Google App Script API. I found this method, https://developers.google.com/apps-script/class_docslist#find in the DocsList class. problem is the description for the query simply says "the query string". So at first i tried the Drive SDK query parameters, which are
var files = DocsList.find("modifiedDate > 2012-12-20T12:00:00-08:00.");
it didn't work. that leads me to believe it is a simple full text search on the content. Thats not good enough.
That lead me into trying to call a Drive SDK method from within an App Script application. Great, we need an OLap 2 authentication. easy enough. found the objects in the script reference and hit my wall.
Client ID and Client Secret.
you see, when i create what this really is, a service account, the olap control in apps script doesn't know how to handle the encrypted json and pass it back and forth. Then when i tried to create and use an installed applications key, i get authentication errors because the controls again, don't know what to do with the workflow. and finally, when i try to create a web app key, i can't because i don't have the site host name or redirect URI. And i can't use the application key ability because since im working with files OLap 2 is required.
i used the anonymous olap for a while, but hit the limit of anonymous calls per day in the effort of trying to figure out the code a bit, thats not going to work because the guy is going to be pushing this button constantly thru the day.
i have been pounding my head on the desk over this for 5 hours now. i need some help here, can anyone give me a direction to go?
PS, yes, i know i can use the database controls and load the entire list of files into memory and compare it to the list of files in the database. problem being, we are talking tens of thousands of files. bad idea.
I wouldn't use DocsList anymore - DriveApp is supposed to be a more reliable replacement. Some of the commands have changed, so instead of find, use searchFiles. This should work more effectively (they even use a query like yours as an example).

File Upload progress on IE9

I've read in a few places that file upload progress is not supported in IE9.
However I notice that gmail has some sort of solution for it. I've read articles from a couple of years ago that it is a flash-based solution but when I got the inspector tool out, I couldn't see any flash objects. I'm wondering whether anything has changed in that time.
Is anybody able to describe how gmail has solved the 'file upload progress' problem in IE9?
I do not know how gmail does it, but one possible solution is to start the upload asynchronously (javascript, iframe, whatever) and then poll the upload progress regularly from the server.
Assuming you have some kind of session identifying the user, the upload is sent to the server which updates some progress variable in the user's session while the file is being transferred. At the same time, the client polls the progress variable once a second via separate AJAX calls to the server.

Chrome Extension Development - need help getting started

I'd like to try my hand at some Chrome Extension Development. The most I have done with extensions is writing some small Greasemonkey scripts in the past.
I would like to use localStorage to store some data and then reveal the data on a extension button click later on. (Its seems like this would be done with a popup page)
How do I run a script everytime a page from lets say http://www.facebook.com/* is loaded?
How do I get access to the page? I think based off my localStorage requirement I would have to go down the background_page route (correct?) Can the background page and popup page communicate across the localStorage?
UPDATE:
I'm actually looking to learn the "Chrome way". I'm not really looking to run an existing Greasemonkey script
Google actually has some pretty good documentation on creating extensions. I recommend thoroughly reading the following two articles if you haven't already done so:
http://code.google.com/chrome/extensions/getstarted.html
http://code.google.com/chrome/extensions/overview.html
If you want to give your extension access when the user browses to Facebook, you'll need to declare that in the extension's manifest.
Unless you're wanting to save data beyond the life of the browser process, you probably don't need to use local storage. In-memory data can just be stored as part of the background page.
Content scripts (which run when you load a page) and background pages (which exist for the duration of the browser process) can communicate via message passing, which is described here:
http://code.google.com/chrome/extensions/messaging.html
Overall, I'd suggest spending some time browsing the Developer's Guide and becoming familiar with the concepts and examples.
Chrome has a feature to automatically convert greasemonkey scripts to extensions!