Tracking buttonclicks on a Java Applet

mlapl1
mlapl1 Community Member Posts: 349
Hello

I have successfully installed a Java applet. I am trying to track button clicks in my application. I can do this easily enough with ordinary buttons by modifying variables when a button is clicked. BUT is there any way that I can get clicks recorded on the Java applet without modifying the applet itself? I was thinking a placing a transparent button on top of the applet but suspect that the click will not go through the button to the applet. Am I right? Any inventive Lectora solutions for this kind of issue?

Many thanks

Andrew

Comments

  • wendymiller
    wendymiller Community Member Posts: 244
    Hi Andrew,

    Are you using an External HTML Object to embed your Java applet? If so, you could try attaching an action that has a Mouse Click trigger to the External HTML Object itself. I can't say if this will work for sure or not in your situation, but it's worth a try.

     

     
  • mlapl1
    mlapl1 Community Member Posts: 349
    Thank you Wendy. Yes I am using an external HTML object. I will try to figure out what you mean exactly but it sounds like a good idea. Actually, I tried to use the object's properties by creating a mouse click trigger. The mouse click did not work (not sure why) but the on mouse enter tr9gger worked - not precise enough though.

    Thanks again

    Andrew
  • wendymiller
    wendymiller Community Member Posts: 244
    I just meant attaching an action to the External HTML Object, just like you would for a button. (See attached screen capture.) I tried it with a dummy applet. I could not trigger the mouse click event in Run Mode, but it did trigger when I previewed it in a browser. Not sure what would happen though if your applet is also supposed to intercept mouse clicks.
  • mlapl1
    mlapl1 Community Member Posts: 349
    My applet is an audio recorder that works quite well and offers a ready-made solution for me except for tracking clicks. I did in fact do what you did in the attached graphic and discovered that the applet worked correctly but that the trigger did not fire (using an apache server). Other triggers like Mouse Enter/Exit seem to work though but not accurate enough, especially as there are a couple of buttons I want to track on the applet.

    I thought of putting a transparent object on top of one of the applet's buttons but suspect that the mouse click will not go through first layer but be stopped at the level of the first layer. To ask the question another way, is there a way that the a mouse click can be active through more than one layer?

    Thanks a lot

    Andrew
  • wendymiller
    wendymiller Community Member Posts: 244
    Oh I see. I would suspect the same, but don't know for sure. It sounds like you need a way to send messages to or get messages from the applet. That's out of my scope of knowledge, unfortunately. Hopefully someone else here can suggest something for you. Sorry that I cannot help more.
  • mlapl1
    mlapl1 Community Member Posts: 349
    Surprisingly, in earlier versions of script-based authoring systems, they did have the ability to pass messages e.g. send a buttonclick to another button. That is the sort of thing I need but do not have.

    Thank you Wendy, you have been great. I will have to work on some cunning alternative :)

    Andrew
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    I have zero knowledge of Java Applets. But if you were using a JavaScript audio recorder or at least a Flash sound recorder, it'd be really easy to pass data back and forth between Lectora and the recorder.
  • mlapl1
    mlapl1 Community Member Posts: 349
    Agreed Sergey, I will take another look at  your previous recommendation for a recorder - maybe I am just not familiar of how to integrate JS into Lectora (despite the almost 600-page long docs).

    Thanks a lot
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!