In a similar fashion to my AS3 Graphing Classes, my MathML parser was created out of necessity. I was working on a project that had to display some equations, but drawing them out manually seemed a bit over the top.
I originally looked to see if anything was already available on the net but had no luck. Considering that the only other option was to create each equation manually, I decided to try and write my own MathML parser.
After a bit of research and playing around I came up with a set of classes that worked in a recursive manner to generate the equation.
The example file below demonstrates how the parser works.
Download:
For anyone who finds themselves in need of some MathML ActionScript classes, I have moved them onto GitHub.
They are by no means a complete solution, but they may prove useful to someone. Feel free to use them as you see fit, but please don’t harass me if you don’t like my code 😉
On the side note, there is a program called Amaya that can be used to generate MathML in a pretty easy to use interface. You can download it for free from here.
This is awesome…thanks for the time you put into it
Thank you so much, this is really what I need…even if I still don’t know how to adapt it to my code ( I already have a XML in which I would like to put the formulas).
this is awesome what i exactly want. thik u so much
Hi,
I have placed the following code as given, but it was throwing an error “Expecting right pare before colon.”
var $sprite:Sprite = MathML.parse(MathML:XML[“test.xml”, $format:TextFormat=null, $embedFonts:Boolean=null ]);
can anyone help?
Hi,
I would be grateful if you could share to me a complete example in how to use the MathML classes. I am a nearby.
Thanks in advance,
Francisco