AIR iOS and Android login - actionscript-3

I am building an app in AIR/AS3 for iOS and Android which requires user information to be submitted and stored in a remote DB. I guess I will need to build a register/sign in screen but just wondering what the best method to store the session information in the app.
I would like it that if the user closes the app the session remains when they start it again. I currently have suspend on exit in the app.xml file. Should I just remove this?
Cheers

Probably worth giving a flip through of this for some high level ideas (without the seminar it's difficult to get details out of this)
http://www.slideshare.net/marcocasario/local-persistent-data-with-actionscript-3-and-air
If you're using Flex I'd suggest starting here:
http://help.adobe.com/en_US/flex/mobileapps/WSb0a29bf92525419c-54dd253312afbec3ecb-8000.html
Otherwise either using the File/FileStream classes and an XML file or the SQLite options are both good as well depending on what you need to save/restore and how you'll be working with the data.

Learn about sqllite, xml files, and php files. Make the flash file call a xml file that talks to a php file that talks to the mysql server.
Otherwise look here: http://active.tutsplus.com/tutorials/actionscript/create-a-flash-login-system-using-php-and-mysql-part-1/

Related

Create folder and directory in actionscript

As a part of flash application, I'm trying to store recorded files automatically to a specific path on users computer hard disk without they be aware.
Is there a way to create directory in actionscript?
If you are using Flash in a web browser, for security reasons there is not. the only option to store something locally within a web browser is to use shared objects (kind of like cookies), but this is likely not what you want.
If you are not in a web browser you can use either AIR or a third party wrapper such as Multidmedia Zinc (for an additional cost).
File options for AIR can be found here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html
File options for Zinc can be found here:
http://www.multidmedia.com/support/livedocs/zinc/4.0/
EDIT
Since in your comment it sounds like your running in a web browser, you should leave it at simply streaming it to your server. If they have no internet connection there is no other good option other than live streaming using URLRequest, that is, if you are within a web browser.
Here is some additional reading on this subject:
Can Flash action script read and write local file system?
There's a tutorial at http://hub.tutsplus.com/tutorials/create-a-useful-audio-recorder-app-in-actionscript-3--active-5836?request_uri=%2Ftutorials%2Factionscript%2Fcreate-a-useful-audio-recorder-app-in-actionscript-3 which does exactly what you want. Ignore the timeline-driven approach if you wish.
It uses the micrecorder library from https://code.google.com/p/micrecorder/ which records the audio and offers a file for the user to download at the end.

Running a Perl/TK GUI inside a web page

We have a Perl application which contains a Perl/TK based GUI ( some checkboxes, entry fields, etc.)
I have been asked to modify the Perl / TK GUI part of the application so that it can be run inside a web page. Is this possible?
I found this:
http://oreilly.com/openbook/webclient/ch07.html
however it appears to create a web client and parsing the HTML response to format the output, as opposed to running inside a browser.
I would like to know if it is possible to somehow incorporate a Perl/TK GUI into web browser and if so what is the best way to do so? Maybe something like a plugin (ex. http://www.tcl.tk/software/plugin/)?
The usual way would be to rewrite your application in HTML/CSS/JavaScript. The example you show on the O'Reilly site does the opposite - it shows you how to write a Tk application that will render HTML.
A browser plugin is possible if that will provide what you need. If that is the case then the problem is trivial, but you would need the plugin installed on every PC that needs to have access to your application, and it is possible that there are certain Tk facilities that the plugin doesn't support. All you can do is try it.
There was a project for Netscape that was mentioned in Mastering Perl/Tk called PerlPlus. But it looks like the Sourceforge page hasn't been touched in a while. The intent was to run Perl (and PerlTk) code in a Netscape browser.

HTML File Upload - Practical Limit?

We are designing an internal web application to which we would like to upload a very large file (100mb). Is an HTML file upload even an option here?
If it is not, what other tools (Java applet, Silverlight, Flash) could we use to perform a file upload this large? Is uploading a file this large practical at all?
Edit: You can assume that there will be appropriate server side code accepting the file upload and handling the data. This question is specifically about the client side interface and the HTML file upload interface.
I'm no expert on file uploading, but my understanding is it's either impossible or very difficult to upload a file with HTML alone. You will probably need some server-side scripting like PHP, JSP, ASP.NET or something to process the upload and persist the file on your web server/database. Any well-designed implementation should allow for a size limit to be set and enforced, but with larger files it would be a good idea to include a progress indicator like a percentage and/or progress bar so the user knows the upload is still working and isn't hanging on slow connections.
I just downloaded this UploadBean component and deployed the WAR under the downloads section on an apache tomcat instance and the SimpleUpload.jsp example worked really well right out of the box. If you're using Java I'd highly recommend this approach.
http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
with javascript/jQuery/Mootools/Flash there are plugins that allows you to check file size before upload, and basically has server side script as fallback validation as well. Take a look at jQuery Uploadify or Mootools powered fancy upload they use flash and javascript with server side script in the backend. These two plugins use flash + JavaScript on client side
Being that it will be for an internal web application I am assuming you don't have any server-side imposed limits on the server that will be running this. If not then you should be able to upload large files.
See http://www.uploadify.com/ - nice and easy to implement
See http://encodable.com/filechucker/ - good if you are looking for more advanced management for your uploaded files.

Phonegap JQTouch Joomla and MySQL application

I am working on a project and it needs to accomplish the following:
A user logs into a joomla
Makes a change to some of their profile
This new information updates in the
database
Up to this point joomla will do everything, so the question is how do I take the information from the database and call it into a phonegap app. I am using phonegap and jqtouch for the app, and joomla with jomsocial for the update side.
I cannot have the app open into just a mobile version of the website because apple will reject it from the store. I need this solution to work for people to make updates to their profile, and these updates will automatically post to their app. All users input data on the same site, and share a database. Each profile however will have a different app that is released to the markets, so right now I am focusing on a template framework that can easily be changed to the users portion of the database.
From my understanding the php files stay on the server to process information. The big question is how do i call this information into a phonegap app?
To display XML as HTML you need to parse it through an XSLT stylesheet. This transforms your XML nodes into HTML. Of course, you could just use a PHP XML parser. I think there's one bundled with Joomla, but there are lots out there.
I was going to suggest using a Joomla plugin to push the data over to the Phonegap app. There are lots of events that are fired when an account is created and you could manipulate that.
If the XML is local, Jeepstone is correct. If it is not, how are you going to get it? To do this without running into cross domain issues, I suggest you try out this jQuery plugin on the phonegap side of things ... http://code.google.com/p/jquery-jsonp/ . So to take advantage of that nifty tool, you will adjust the public functions in this script to echo back json_encoded array. With which you can then do as you want on the phonegap side of things.
Ya Apple wants your app to not be useless without internet. But it is straightforward to create your index.html to show the user something. Use the failure and success functions in the jsonp library to show connection problems if necessary.

Creating standalone app with Microsoft Access

Once I saw a DB made in MS Access that worked as a normal program, i.e with an executable file that opened a beautiful UI and allowed access to the forms and reports. I've trying to do the same, I even googled but didn't find how do it. Anyone knows how to build such standalone App with Access?
You cant make an access database into an executable file. It just cant happen however you can fool people into thinking that they are not using access a number of ways, for example
Custom splash screen (just put a bmp
file in the folder and name it the
same as your database)
Hide the access window and toolbars
Change the access icon
For example take a look at this screen shot
There are lots of things going on here and it would be hard to tell that it is built using good old access 97 (Yes I know the standard toolbar kind of gives it away, it will be going at somepoint).
I believe the tool is called the Microsoft Access Runtime toolkit or something along those lines. The latest version is free, a departure from the previous versions which I believe you had to pay for. From the previous version I tinkered with, it comes with a tool to make a EXE file from the MDB or ACCB file, a handful of icons for the EXE to use if you are lacking one, and a program to help you generate Microsoft Help files for your application.
This is a link to the Developer Extensions - I believe the 2007 version of what I described above:
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=D96A8358-ECE4-4BEE-A844-F81856DCEB67&displaylang=en
Here is a link for the runtime, which doesn't convert your Access database into an executable file, but would allow it to run on computers without Access installed:
http://www.microsoft.com/downloads/en/details.aspx?familyid=D9AE78D9-9DC6-4B38-9FA6-2C745A175AED&displaylang=en
NOTE: Both of these are for Access 2007, the version I run. Your version might require something different - but should be easily located on Microsoft's website.
If you want to fool the user in thinking that they are not using access it will take some ingenuity. I have done this. You will need a way to make nice 2D images that you will import into access, and then set them up like buttons, and give them functionality. Make sure you over lay them on a splash screen of some kind. Not sure if you know VBA but it will be needed.
At the end make sure you go in to the setting, and turn off anything that might allow the user to alter the form in any way. And then rename the file's extension like this: fileName.accdr
This is as close to a normal program that you are going to get, and remember it will only look as good as the art you put into it.