Skip to main content
Participant
November 4, 2007
Answered

Import Mathematical Libraries

  • November 4, 2007
  • 1 reply
  • 225 views
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:
This topic has been closed for replies.
Correct answer jbbmovil

Clearly a novice mistake: I was trying to import the libraries as ".java" files, simply renaming them as ".as" and it does load them... producing many more errors, I guess that due to differences between JAVA and ActionScript.

I leave the message just in case it is of help to any novice as me.

Thanks any way,

JBB

1 reply

jbbmovilAuthorCorrect answer
Participant
November 4, 2007

Clearly a novice mistake: I was trying to import the libraries as ".java" files, simply renaming them as ".as" and it does load them... producing many more errors, I guess that due to differences between JAVA and ActionScript.

I leave the message just in case it is of help to any novice as me.

Thanks any way,

JBB