|
|
|
|
#1 |
|
Plugin Developer
Join Date: Jun 2002
Location: Germany
Posts: 2,327
|
If you try to publish a SWF that uses the SQLite AS Class, you may recieve errors similar to these
Code:
*****
**Error** C:\ProjectPath\SQLite.as: Line 41: There is no method with
the name 'ssCore'.
var findexe_obj = ssCore.FileSys.fileExists({path:"internal://sqlhelper.exe"},
{sync:true});
**Error** C:\ProjectPath\SQLite.as:: Line 50: There is no method with
the name 'ssCore'.
var sqlite_answer = ssCore.Shell.execute({path:pathToExe, arguments:"-version",
saveStdOut:"true", winState:"hidden", topmost:"false"}, {sync:true});
The Problem is as follows: The SQLite.as class gets compiled 'on it´s own' and does not have any connections to your Main fla file at compile-time. That means however that Flash can not resolve any function or parameter names that are not defined within the AS Class, and therefore will abort the compile process with an Error similar to the one above. (In fact, with maaaany errors )So the point here is that Flash simply does not know what 'ssCore' or 'ssDebug' means, and aborts the publish. To fix that we need to tell Flash what these Objects are and where they point to. To get rid of these errors, you need to do one of these steps case 1 - You are not a programer, and/or won´t work with other AS2 Classes In this case, the easiest solution would be to alter the first lines of the AS Class a bit, like this Code:
class SQLite {
//Reference to the ssCore Object
private static var ssCore:Object = _global.ssCore;
//
The big disadvantage is that you will loose the code hinting ability of the ssCore Object while you are modifiying the SQLite class. If you do not plan to change the SQLite Class anyway, there is no problem. case 2 - You want to register the ssCore object for your whole Project, and/or want to keep the Codehinting in AS2 Classes For this purpose SWF Studio ships with so-called intrinsic classes. You could think of them as a kind of "Table of Contents". Flash can read these intrinsic classes and will now figure out what 'ssCore' means. More details on how to use these intrinsic classes can be found in the Help File on the Intrinsic Classes Hope that helps! |
|
|
|