Hello,
i want to use java class methods in flash as1 file. so how to import java classes in flash as1(server side).
/ganapathi
IMPORT JAVA
Please refer to: http://www.smartfoxserver.com/docs/docPages/sfsPro/javaInActionscript.htm and http://www.smartfoxserver.com/docs/docPages/tutorials_pro/07_javaInActionscript/index.htm
Smartfox's forum is my daily newspaper.
Hi. As it explains in the first link posted by BigFIsh, you have to first create a var which references the package of the class you want to use, by using a code like:
var testPackage = Packages.test.testPackage;
Or you can directly create a new instance of that class by doing:
var testClass = new Packages.test.testPackage.testClass();
As also mentioned in that link, "In order to access your custom classes you should add them to the classpath in the start.bat (Win) or start.sh (Linux) scripts.", so you don't have to add them to the javaExtensions folder.
The 2nd link that was posted has a clear example of how to use a custom class, in that case, a xml reader.
var testPackage = Packages.test.testPackage;
Or you can directly create a new instance of that class by doing:
var testClass = new Packages.test.testPackage.testClass();
As also mentioned in that link, "In order to access your custom classes you should add them to the classpath in the start.bat (Win) or start.sh (Linux) scripts.", so you don't have to add them to the javaExtensions folder.
The 2nd link that was posted has a clear example of how to use a custom class, in that case, a xml reader.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 50 guests