@Override
		public void mouseClicked(MouseEvent arg0) {
			//System.out.println(arg0.getSource().toString());
			if (status == VideoStatus.PLAYING){
				pause();
			}
			int videoIndex = ((MyPanel)arg0.getSource()).videoIndex;	
			if(videoIndex != currentVideo){
				currentVideo = videoIndex;
				audio = new File(audiofilenames[currentVideo]);
			}
			
			int temp = ((MyPanel)arg0.getSource()).imgFrame;

			videoFrame = temp;
			imgPanel.img = vdo[currentVideo][videoFrame];
			imgPanel.repaint();
			
			
			
			try {
				waveStream = new FileInputStream(audio);
			} catch (FileNotFoundException e) {
				System.out.println(e);
			}
			
		    audioInputStream = null;
			try {
				InputStream bufferedIn = new BufferedInputStream(waveStream);
				audioInputStream = AudioSystem.getAudioInputStream(waveStream);
			    //audioInputStream.skip(temp * buffersize);
			} catch (UnsupportedAudioFileException e1) {
				System.out.println(e1);
			    //throw new PlayWaveException(e1);
			} catch (IOException e1) {
				System.out.println(e1);
				e1.printStackTrace();
			    //throw new PlayWaveException(e1);
			}
		
			// Obtain the information about the AudioInputStream
			audioFormat = audioInputStream.getFormat();
			info = new Info(SourceDataLine.class, audioFormat);

		      
			// opens the audio channel
			dataLine = null;
			try {
				//System.out.println("img frame temp: " + temp);
				long offset = temp * 30 * (long) audioFormat.getFrameRate() * (long)audioFormat.getFrameSize() / (long)numFrames;
				System.out.println("skipping " + (long)offset + " bytes");				
				audioInputStream.skip(temp * 30 * (long) audioFormat.getFrameRate() * (long)audioFormat.getFrameSize() / (long)numFrames);
			    dataLine = (SourceDataLine) AudioSystem.getLine(info);
			    dataLine.open(audioFormat, buffersize);
			} catch (LineUnavailableException e1) {
				System.out.println(e1);
			    //throw new PlayWaveException(e1);
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}