Answered
Import Mathematical Libraries
Hi,
I'm new to programming with ActionScript and I'm trying to develop a Physics Tutorial on Flash.
As Java is quite new for me, I found some free libraries in the Web which have all the mathematical functions that I need, and I'm trying to learn how to use them from Flash Professional 8.
To avoid any self-made mistakes I copied an example and tried to run it, but it gives me sintax errors from the beggining...
I'm placing all the libraries in a subdirectory hanging from the directory where I save the .fla file: I guess that this is what the help file calls the working_directory: \org\spaceroots\mantissa\ode
But it seems that the IMPORT statement is not correct: it tells me that the function is not loaded as follows:
**Error** Scene=Scene 2, layer=Acciones, frame=1:Line 9: Attribute used outside class.
public class ODEExample implements FirstOrderDifferentialEquations
**Error** Scene=Scene 2, layer=Acciones, frame=1:Line 10: The class or interface 'org.spaceroots.mantissa.ode.FirstOrderDifferentialEquations' could not be loaded.
{
Is this where I should copy the downloaded libraries? Or does the problem come from some other thing that I don't see ?
Any help would be appreciated.
Thanks in advance,
jbbmovil
Attached the complete code:
I'm new to programming with ActionScript and I'm trying to develop a Physics Tutorial on Flash.
As Java is quite new for me, I found some free libraries in the Web which have all the mathematical functions that I need, and I'm trying to learn how to use them from Flash Professional 8.
To avoid any self-made mistakes I copied an example and tried to run it, but it gives me sintax errors from the beggining...
I'm placing all the libraries in a subdirectory hanging from the directory where I save the .fla file: I guess that this is what the help file calls the working_directory: \org\spaceroots\mantissa\ode
But it seems that the IMPORT statement is not correct: it tells me that the function is not loaded as follows:
**Error** Scene=Scene 2, layer=Acciones, frame=1:Line 9: Attribute used outside class.
public class ODEExample implements FirstOrderDifferentialEquations
**Error** Scene=Scene 2, layer=Acciones, frame=1:Line 10: The class or interface 'org.spaceroots.mantissa.ode.FirstOrderDifferentialEquations' could not be loaded.
{
Is this where I should copy the downloaded libraries? Or does the problem come from some other thing that I don't see ?
Any help would be appreciated.
Thanks in advance,
jbbmovil
Attached the complete code: