Reputation: 67
I am trying to migrate Flash Air application to web. For that I have created a new project with Application type "Web".
After that I copied the code to the new application. Now while compiling I am getting error on following lines:
import flash.data.SQLConnection;
import flash.data.SQLMode;
import flash.data.SQLResult;
import flash.data.SQLStatement;
import flash.filesystem.File;
public class CDatabase extends SQLConnection
{
. . .
And the issue is that actionscript is not recognizing data.* and filesystem packages.
I do not find anywhere mentioned that we can not use these classes in Web applications. Is there any restriction on usage of these classes in Web application, if yes then what is the substitute?
Upvotes: 0
Views: 57
Reputation: 52153
I do not find anywhere mentioned that we can not use these classes in Web applications. Is there any restriction on usage of these classes in Web application
Yes, the documentation for SQLConnection
says so:
Runtime Versions: AIR 1.0
You'll also see the AIR icon shown for all APIs that are only available in AIR:
if yes then what is the substitute?
There is no direct equivalent to SQLConnection
and File
in a Web application, but you have some options to substitute:
SharedObject
to store client-side data.FileReference
to allow the user to save and load local files.URLLoader
to communicate with a server-side database, for example PHP and MySQL.ExternalInterface
to interact with IndexedDB
(which has limited browser support).Upvotes: 0