Player and Events.COMPLETED

14 views
Skip to first unread message

Steve Marcus

unread,
Sep 15, 2013, 3:16:36 PM9/15/13
to alternate-java-bridg...@googlegroups.com
Hi all,

How could I fire an event when the Player has completed playing?

Player1 = new Player(this);
  Player1.Source("snd_intro.mp3");
(this works fine and plays the music)

I tried the Events.COMPLETED
EventDispatcher.registerEventForDelegation(this, "Player1", Events.COMPLETED);

if (component.equals(Player1) && eventName.equals(Events.COMPLETED)) {
    player1Completed();
    return true;
    }

but it doesn't appear to work i.e. player1Completed() is never triggered. Is there a way to do it using the java bridge events?


Imp Inc

unread,
Sep 15, 2013, 5:11:43 PM9/15/13
to alternate-java-bridg...@googlegroups.com
That's because the event wasn't there. It's something they added to AI after the bridge was made, and I hadn't added this event. It's added now, so you can grab the new jar.

Ryan

Steve Marcus

unread,
Sep 16, 2013, 3:03:01 PM9/16/13
to alternate-java-bridg...@googlegroups.com
Yep that worked! thanks
Reply all
Reply to author
Forward
0 new messages