I'm trying to make a game with Batik (Yes, a game. Why hasn't anyone tried
this before? There don't seem to be any other vector graphics engines for
Java that can load from files) and I've encountered one critical problem.
How do you send an event from the JavaScript embedded in a SVG file to the
Java program displaying it? That is, if you don't want to hardcode all of
your SVG animations into your Java program, but still need the animations to
trigger certain events in the Java program, how do you do this?

To make this more clear, I'll give an example. Suppose one of the game's SVG
files in an animation of a character swinging a sword. When this animation
is used. and an enemy is hit with the sword, the game must reduce the
enemy's HP. The HP is handled by the Java code, but the HP reduction must
occur when the sword hits the enemy, which is determined by the animation.
How can the Javascript animation tell the parent Java program when to
perform this action?
-- 
View this message in context: 
http://www.nabble.com/How-to-send-event-from-embedded-Javascript-to-Java-tf4754551.html#a13596066
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to