I can't get the applet to run please help me

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
     public class raceButton extends JApplet
     private int APPLLET_WIDTH=500,APPLLET_HEIGHT=35;
     private JButton Orc,Elf,Dwarf,Human;
     static String Race;
     public void init()
     setSize(APPLLET_WIDTH,APPLLET_HEIGHT);
     Orc= new JButton("Orc");
     Elf= new JButton("Elf");
     Dwarf= new JButton("Dwarf");
     Human= new JButton("Human");
     Orc.addActionListener(new ButtonListenerO());
     Elf.addActionListener(new ButtonListenerE());
     Dwarf.addActionListener(new ButtonListenerD());
     Human.addActionListener(new ButtonListenerH());
     Container cp = getContentPane();
     cp.setBackground(Color.red);
     cp.setLayout(new FlowLayout());
     cp.add(Orc);
     cp.add(Elf);
     cp.add(Dwarf);
     cp.add(Human);
     private class ButtonListenerO implements ActionListener
     public void actionPerformed(ActionEvent eventO)
          Race="orc";
          private class ButtonListenerE implements ActionListener
          public void actionPerformed(ActionEvent eventE)
          Race="elf";
          private class ButtonListenerD implements ActionListener
          public void actionPerformed(ActionEvent eventD)
          Race="dwarf";
          private class ButtonListenerH implements ActionListener
          public void actionPerformed(ActionEvent eventH)
          Race="human";
     static String getRace()
          return Race;
this is what i do to activate it
     raceButton player= new raceButton();
     player.init();
     myRace=raceButton.getRace();(my race has already been initiated)
it skips drawing the buttons and the action events

this my full code
import java.util.*;
import javax.swing.*;
import java.awt.*;
public class FirstDraft {
public static void main(String[] args) {
String orc="orc";
String elf="elf";
String dwarf="dwarf";
String human="human";
int again;
Character player1= new Character();
player1.begin();
again=JOptionPane.showConfirmDialog(null,player1.getName()+ " are you sure you picked wisely?");
while(again== JOptionPane.NO_OPTION)
     player1.setRace();
     again=JOptionPane.showConfirmDialog(null,player1.getName()+ " are you sure you picked wisely?");
import chn.util.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Character
     private String myName;
     private String myRace;
     private String orc="orc";
     private String elf="elf";
     private String dwarf="dwarf";
     private String human="human";
     ConsoleIO keyboard=new ConsoleIO();
     void begin()// the first thing that happens.
     JOptionPane.showMessageDialog(null,"This is a public service announcement\n"
     +" My game makes fun of certain pictures and uses pictures with blood and death in them"
     +" if anything offends you I appologise, also all images are taken from google");
     setName();//goes into seting the name
     void setName()
     myName=JOptionPane.showInputDialog("What is your first name mortal?");//set's the name
     if (myName==null)
     setName();
     else
     intro();//goes into Intro     
     void intro()
     JOptionPane.showMessageDialog(null,"well \"" +getName()+ "\" if that is your real name"
+"\nYou are going to face your friend to the death\n"+
     "the winner will live and I get the losers soul HAHAHAHAHA");
     setRace();// goes into setting the Race
     void setRace()
          JOptionPane.showMessageDialog(null,"Races available are :\n"+
          "the mighty orc\n"+
          "the mystical elf\n"+
          "the endurable dwarf\n"+
          "or the puny human you are.");
raceButton player= new raceButton();
     player.init();
     myRace=raceButton.getRace();
     String getRace()//returns the Race
          return myRace;
     String getName()//returns the Name
          return myName;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
     public class raceButton extends JApplet
     private int APPLLET_WIDTH=500,APPLLET_HEIGHT=35;
     private JButton Orc,Elf,Dwarf,Human;
     static String Race;
     public void init()
     Orc= new JButton("Orc");
     Elf= new JButton("Elf");
     Dwarf= new JButton("Dwarf");
     Human= new JButton("Human");
     Orc.addActionListener(new ButtonListenerO());
     Elf.addActionListener(new ButtonListenerE());
     Dwarf.addActionListener(new ButtonListenerD());
     Human.addActionListener(new ButtonListenerH());
     Container cp = getContentPane();
     cp.setBackground(Color.red);
     cp.setLayout(new FlowLayout());
     cp.add(Orc);
     cp.add(Elf);
     cp.add(Dwarf);
     cp.add(Human);
     setSize(APPLLET_WIDTH,APPLLET_HEIGHT);
     while(Race==null)
     repaint();
     private class ButtonListenerO implements ActionListener
     public void actionPerformed(ActionEvent eventO)
          Race="orc";
     while(Race==null)
     repaint();
          private class ButtonListenerE implements ActionListener
          public void actionPerformed(ActionEvent eventE)
          Race="elf";
               while(Race==null)
     repaint();
          private class ButtonListenerD implements ActionListener
          public void actionPerformed(ActionEvent eventD)
          Race="dwarf";
               while(Race==null)
     repaint();
          private class ButtonListenerH implements ActionListener
          public void actionPerformed(ActionEvent eventH)
          Race="human";
               while(Race==null)
     repaint();
     static String getRace()
          return Race;
it never get's past player.init();

Similar Messages

  • I down loaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you

    I downloaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you.

    Hi- apparently I also had a similar moment of madness and thought that 'freeride games' would be fun. Well, so much for that! It added a ton of things to my tool bar, I would like to uninstall it, any suggestions for this one?
    thanks :)

  • I can run a slide show using apple tv and itunes but can't get the slides to run in a specific order

    I can run a slideshow (of pictures) using Apple TV and ITunes but can't get the pictures to run in the order I set them up with in my hard drive directory

    Welcome to the Apple Community.
    Websites and third party Apps need enabling before they will allow AirPlay of Video content. Some Website/App developers have not enabled their products, some simply haven't got around to it yet, others have stated that they won't be enabling AirPlay (likely as a result of licensing issues).
    I have created a User Tip to list Apps that have been tested with Video Airplay, if you have any Apps that you have tested please leave details in the comments at the bottom of the User Tip or email me if you don't have commenting privileges.

  • I cloud worked fine for a while on the latest version of windows then threw up an error since then I can longer get the programme to run . I've reinstalled itunes but this doesnt help any ideas

    I cloud worked fine for a while on the latest version of windows then threw up an error since then I can longer get the programme to run . I've reinstalled itunes but this doesnt help any ideas

    It maybe worthwhile trying to uninstall and then reinstall the icloud control panel, if the issue is with your outlook.

  • I sign up for TAPJOY.While signing in,they install something in my PROFILE CONFIGURATION...When I check my Settings-General,I can't see the PROFILE OPTION! Please help me :) Im running ios 6.0.1

    I sign up for TAPJOY.While signing in,they install something in my PROFILE CONFIGURATION...When I check my Settings-General,I can't see the PROFILE OPTION! Please help me Im running ios 6.0.1

    Well, after another call with Apple support and the engineers, no success.  After spending over 20 hours trying to debug this, I give up.  Apple was basically fishing for a solution with trial-and-error settings on the iphone.  Then they wanted me to plug in software to log my iphone connections to the router, etc, etc., etc., at which point I decided I no longer wanted to participate in their testing process and will simply return the router.
    25 hours of my life I'll never get back.
    Big bummer, and frustrating for all the obvious reasons.

  • Hi, i have a A1186 Mac Pro 2008 Tower. Im running windows 7 64Bit on it. Im not sure about what version of bootcamp should i use to get the drivers. Someone please help me.

    Hi, i have a A1186 Mac Pro 2008 Tower. Im running windows 7 64Bit on it. Im not sure about what version of bootcamp should i use to get the drivers. Someone please help me.

    Boot Camp support:
    http://www.apple.com/support/bootcamp/
    Boot Camp FAQ:
    http://support.apple.com/kb/HT5639?viewlocale=en_US

  • I need a copy of the PDF guide for version 12 I have just installed - the link that appears in searches takes me to version 13. Where can I get the version 12 copy please?

    I need a copy of the PDF guide for version 12 I have just installed - the link that appears in searches takes me to version 13. Where can I get the version 12 copy please? (I bought the Photoshop Elements and Premiere Elements pack, but have only just installed and started to use).

    Hi,
    You can find the Help Archives at Adobe Premiere Elements Help | Archive
    Regards,
    Premiere Elements Team

  • I can't get the product i bought need help NOW doesn't let me connect when i have good internet

    i can't get the product i bought need help NOW doesn't let me connect when i have good internet

    [personal information should not be posted - https://forums.adobe.com/docs/DOC-3731]
    [This is an open forum, not Adobe support, please do not post personal information]
    https://www.adobe.com/account.html to check your subscriptions
    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Some general information for a Cloud subscription
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

  • On my iPhone 4, I cannot get the "not enough storage on iCloud" message to close. Therefore, I can't get past this box/screen AND I can't turn the device off. Please help.

    On my iPhone 4, I cannot get the "not enough storage on iCloud" message to close. Therefore, I can't get past this box/screen AND I can't turn the device off. Please help.

    Try resetting it by holding the power and home buttons at the same time until you see the Apple logo, then releasing.  You won't lose any data by doing this.

  • I can not longer send email from my .me email. in outlook 2010 on my PC. I can still recieve emails fine. I have not changed my settings at all. I have however tried all the settings i can find on the support pages. PLEASE HELP

    I can still receive icloud ( ME email address) emails fine. I have not changed my settings at all. I have however tried all the settings I can find on the support pages. PLEASE HELP. Nothing has changed. This suddenly just started happening around a month ago. To frustrate me apple does not seem to have a support email or any method to contact them with this issue to do with their email product. I have spent ages going through the apple support sites and I keep getting asked for an apple product to mark it against. I have no apple product as I am using a PC but I am accessing and using their email product. Is there even a phone number I can call? Surely there is a support area for their Email server issues. Can anyone help? It is driving me mad and causing me major issues. My outlook is Outlook 2010 on a windows 8 PC. As I have said it worked fine then one day decided to stop sending emails.
    Thanks for your help.

    Hi - this problem is discussed here:
    https://discussions.apple.com/thread/5375046?start=0&tstart=0

  • When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    Me too. I try to verify and i get the same message.
    I've created 3 alternate e-mail addresses and tried creating new accounts.
    Same Result!
    This is bullsh!t. How the **** can all 4 of my attempts result in the same freakin error???

  • All the my messages from my phone inbox disappeared.Why did it happen and how should i get the messages back?please help

    All the my messages from my phone inbox disappeared.Why did it happen and how should i get the messages back?please help

    Is the MacBook the computer you have synced with in the past? If not you can use the computer that you have synced with to restore your apps. Are you sure you are using the same Apple ID that you used to purchase the Apps?

  • I cannot restore my Iphone 4, I keep getting the error code 1611, please help and the Iphone keeps displaying the "Plug-In Itunes Symbol!??

    I cannot restore my Iphone 4, I keep getting the error code 1611, please help and the Iphone keeps displaying the "Plug-In Itunes Symbol!??

    http://tinyurl.com/nyj36v

  • Can't get the applet control from a form page

    Hi,
    I need to get the applet control in a browser which has loaded an oracle form component.
    When i use jinitiator, i get the control as sun.plugin.ocx.ActiveXAppletViewer., but when i use jre for running the oracle forms, i am not able to get the applet class. I observed with the control hierarchy with Monkey, the java accessibility tool, but I coudn't find any applet class.
    Kindly help.
    Thanks & Regards
    Sunil

    Hi,
    Sorry for the incompleteness in the post.
    1. What is the complete Forms version you are using? Do not reply with something like 6i, 9i, 10g, etc. These are product names and not versions.
    10g Release2
    2. What is the client platform (operating system) and version?
    Windows XP Professional Version 2002, Service Pack 3
    3. Which browser and version are you using?
    IE version 6.0.2900.5512.xpsp_sp3_gdr.090804-1435
    4. Which JInit and Sun JRE version are you using?
    JInit-JInitiator 1.3.1.22, Sun JRE- 1.6.0_17
    5. Are you seeing this problem with Developer Suite or Application Server or both?
    I am working on Developer suite.
    6. Provide the complete contents of the Java Console after the failure occurs.
    My issue is that I am not able to identify the applet class.I am not getting any crash as such.
    7. Does the person running the form have Windows Administrator or Power User permissions?
    Windows Administrator
    Let me elaborate the query again.
    I need to get the applet object of the page that loads the form. To get the applet class, I have written a listener class and print the name of the classes that get created. This way, I identified that the class sun.plugin.ocx.ActiveXAppletViewer, is the applet created in the IE when the form is loaded using JInit.
    Also, I can see the same applet class in the monkey tool once the page is loaded.
    HOWEVER, when I use SUN JRE to load the form, the action listener class doesn't identify any applet class. The monkey tool also fails to show any. The class I get in this scenario is sun.plugin2.main.client.PluginEmbeddedFrame.
    I assume that there should be some applet class present to load the form irrespective of whether it uses JInit or Sun JRE.
    Kindly correct me if I am wrong.
    The console log is as follows
    Java Plug-in 1.6.0_17
    Using JRE version 1.6.0_17-b04 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\sunil
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    com.sun.deploy.util.ConsoleWindow
    javax.swing.JRootPane
    javax.swing.JPanel
    javax.swing.JLayeredPane
    javax.swing.JPanel
    javax.swing.JScrollPane
    javax.swing.JViewport
    javax.swing.JTextArea
    javax.swing.JScrollPane$ScrollBar
    com.sun.java.swing.plaf.windows.WindowsScrollBarUI$WindowsArrowButton
    com.sun.java.swing.plaf.windows.WindowsScrollBarUI$WindowsArrowButton
    javax.swing.JScrollPane$ScrollBar
    com.sun.java.swing.plaf.windows.WindowsScrollBarUI$WindowsArrowButton
    com.sun.java.swing.plaf.windows.WindowsScrollBarUI$WindowsArrowButton
    javax.swing.JPanel
    javax.swing.JButton
    javax.swing.JLabel
    javax.swing.JButton
    javax.swing.JLabel
    javax.swing.JButton
    sun.plugin2.main.client.PluginEmbeddedFrame
    Reading certificates from 137405 http://164.67.34.102:8889/forms/java/frmall.jar | C:\Documents and Settings\sunil\Application Data\Sun\Java\Deployment\cache\6.0\36\1a4500a4-49be8669.idx
    oracle.forms.engine.Main
    Loaded image: http://164.67.34.102:8889/forms/formsdemo/images/iorganizer.gif
    Reading certificates from 11 http://164.67.34.102:8889/forms/formsdemo/jars/iorganizer.jar | C:\Documents and Settings\sunil\Application Data\Sun\Java\Deployment\cache\6.0\23\b018557-49b3d76d.idx
    oracle.forms.engine.Splashscreen
    Loaded image: http://164.67.34.102:8889/forms/formsdemo/images/bannerlogo.gif
    Loaded image: http://164.67.34.102:8889/forms/formsdemo/images/white.gif
    oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy
    oracle.forms.ui.mdi.MDIContainer
    oracle.ewt.lwAWT.LWComponent
    oracle.ewt.lwAWT.LWComponent
    oracle.ewt.imageCanvas.ImageCanvas
    oracle.ewt.EwtComponent
    oracle.ewt.scrolling.scrollBox.ScrollBox
    oracle.ewt.scrolling.scrollBox.ScrollBox$1
    oracle.forms.ui.FormDesktopContainer
    oracle.ewt.scrolling.scrollBox.EwtLWScrollbar
    oracle.ewt.scrolling.scrollBox.EwtLWScrollbar
    oracle.ewt.lwAWT.LWComponent
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    oracle.ewt.lwAWT.lwMenu.LWMenuBar
    oracle.ewt.lwAWT.LWComponent
    oracle.ewt.lwAWT.lwMenu.LWMenu
    Loaded image: jar:http://164.67.34.102:8889/forms/java/frmall.jar!/oracle/forms/icons/frame.gif
    oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy
    oracle.ewt.button.ContinuousButton
    oracle.ewt.button.ContinuousButton
    oracle.ewt.button.ContinuousButton
    oracle.ewt.button.ContinuousButton
    oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy
    Reading certificates from 137405 http://164.67.34.102:8889/forms/java/frmall.jar | C:\Documents and Settings\sunil\Application Data\Sun\Java\Deployment\cache\6.0\36\1a4500a4-49be8669.idx
    I hope my query is clear now.
    Thanks & Regards
    Sunil

  • Trying to create HTML5 Video Playlist in Edge Animate - I can't get it to work. Please help!?!?

    Hi All,
    I am creating an interactive site through Edge Animate and am in the process of trying to create a HTML 5 Video Playlist to function within Edge Animate.
    Current Process - Example:
    I have 3 videos that need to be played on a certain page.
    I created a symbol and dragged the videos to the stage and hidden them within that symbol's timeline.
    I then use thumbnail images in a side playlist to either .remove(); .hide(); a video and .show(); the next.
    However when I do a hide / show option, the video continue to plays in the background if I don't also create an if/else statement to pause it.
    My concern with pausing it is that it will continue to load and dramatically slow down the load time of the site.
    References:
    I found this which looks very helpful but don't know how to add this to edge composition.
    http://demosthenes.info/blog/909/Create-An-Automatic-HTML5-Video-Playlist
    Please help or put me in the right direction to create a playlist would be hugely... AMAZINGLY.. helpful.
    Thanks,
    Jason

    Hi Joe,
    Thank you so much for your help on this one. It is hugely appreciated!!
    I have been working frantically to implement your solution to get this working. I used the 'change src' method.
    I have added all my code below in case anyone wants the solution in the future.
    Could you please help below as I am now totally stuck with the <track> and 'event listener issues' !!
    Issue #1:
    I am having major problems with loading the 'closed captions' track element.
    Everything I click for the video to change source / to the next video, the closed caption track adds to the video and doesn't 'unload' the previous one. You then end up with multiple different subtitle tracks on the video screen
    - The closed captions / subtitles are not showing up in Google Chrome either?
    Issue #2:
    I can't get the event listener in edge animate to work for 'playing' and 'ended'. Can you please help and point me in the correct direction??
    Screenshot (showing what happens after the 3rd video is loaded)
    This is the Code I am currently using in the "Creation Complete" of this Symbol.
    SET UP OF VIDEO PLAYER AND FIRST VIDEO
    var vid = sym.$("video_Chapter5");
    vid.html('<video id="ch5video" width="100%" height="auto" margin= "0 auto"  \
    position ="relative"  poster="video/video1_poster.jpg"  controls="controls" </video> \
    <source id ="videomp4src" src="video/Video_mp4_1.mp4" type="video/mp4" </source> \
    <source id ="videoogvsrc" src="video/Video_ogv_1.ogg" type="video/ogv" </source> \
    <source id ="videowebmsrc" src="video/Video_webm_1.ogg" type="video/webm" </source> \
    <track id ="trackvtt" kind="subtitles" src="video/Video_1_Script.vtt" srclang="en" label="English" hidden </track>');
    VARIABLE IDS
    $(document).ready(function() {
      var videoID = 'ch5video';
      var sourceID1 = 'videomp4src';
      var sourceID2 = 'videoogvsrc';
      var sourceID3 = 'videowebmsrc';
      var trackID = 'trackvtt';
      var vid1mp4 = 'video/Video_mp4_1.mp4';
      var vid2mp4 = 'video/Video_mp4_2.mp4';
      var vid3mp4 = 'video/Video_mp4_3.mp4';
      var vid4mp4 = 'video/Video_mp4_4.mp4';
      var vid1ogv = 'video/Video_ogv_1.ogv';
      var vid2ogv = 'video/Video_ogv_2.ogv';
      var vid3ogv = 'video/Video_ogv_3.ogv';
      var vid4ogv = 'video/Video_ogv_4.ogv';
      var vid1webm = 'video/Video_webm_1.webm';
      var vid2webm = 'video/Video_webm_2.webm';
      var vid3webm = 'video/Video_webm_3.webm';
      var vid4webm = 'video/Video_webm_4.webm';
      var script1vtt = 'video/Video_1_Script.vtt';
      var script2vtt = 'video/Video_2_Script.vtt'; 
      var script3srt = 'video/Video_3_Script.vtt'; 
      var script4vtt = 'video/Video_4_Script.vtt';   
      var newposter1 = 'video/video1_poster.jpg';
      var newposter2 = 'video/video2_poster.jpg';
      var newposter3 = 'video/video3_poster.jpg';
      var newposter4 = 'video/video4_poster.jpg';
    VIDEO PLAYLIST THUMBNAIL BUTTONS - TO CHANGE VIDEO IN PLAYER
      sym.$('btn1').click(function(event) {
      sym.$('#'+videoID).get(0).pause();
      sym.$('#'+sourceID1).attr('src', vid1mp4);
      sym.$('#'+sourceID2).attr('src', vid1ogv);
      sym.$('#'+sourceID3).attr('src', vid1webm);
      sym.$('#'+trackID).attr('src', script1vtt);
      sym.$('#'+videoID).get(0).load();
      sym.$('#'+videoID).attr('poster', newposter1);
      sym.$('#'+videoID).get(0).play();  
      sym.$('btn2').click(function(event) {
      sym.$('#'+videoID).get(0).pause();
      sym.$('#'+sourceID1).attr('src', vid2mp4);
      sym.$('#'+sourceID2).attr('src', vid2ogv);
      sym.$('#'+sourceID3).attr('src', vid2webm);
      sym.$('#'+trackID).attr('src', script2vtt);
      sym.$('#'+videoID).get(0).load();
      sym.$('#'+trackID).load();
      sym.$('#'+videoID).attr('poster', newposter2);
      sym.$('#'+videoID).get(0).play();  
      sym.$('btn3').click(function(event) {
      sym.$('#'+videoID).get(0).pause();
      sym.$('#'+sourceID1).attr('src', vid3mp4); 
      sym.$('#'+sourceID2).attr('src', vid3ogv); 
      sym.$('#'+sourceID3).attr('src', vid3webm);
      sym.$('#'+trackID).attr('src', script3srt);
      sym.$('#'+videoID).get(0).load();
      sym.$('#'+videoID).attr('poster', newposter3);
      sym.$('#'+videoID).get(0).play();
      sym.$('btn4').click(function(event) {
      sym.$('#'+videoID).get(0).pause();
      sym.$('#'+sourceID1).attr('src', vid4mp4);
      sym.$('#'+sourceID2).attr('src', vid4ogv);
      sym.$('#'+sourceID3).attr('src', vid4webm);
      sym.$('#'+trackID).attr('src', script4vtt);  
      sym.$('#'+videoID).get(0).load();
      sym.$('#'+videoID).attr('poster', newposter4);
      sym.$('#'+videoID).get(0).play(); 
    EVENT LISTENER FOR PLAYING - TO CREAT BACKGROUND /LIGHT BOX SCREEN
    sym.$('#'+videoID).get(0).addEventListener('playing', function () {
    sym.getSymbol("backscreen_Ch5").$("backscreen").show();
    sym.getSymbol("backscreen_Ch5").play("play");
    EVENT LISTENER FOR ENDED - TO PLAY NEXT VIDEO IN SERIES
    sym.$('#'+videoID).get(0).addEventListener('ended', function () {
    //code to play next video

Maybe you are looking for