Mulit Level game

Hello,
I am trying to code a multi level game. Basically I am using a JFrame as the box where the game is inside. I then create a container to which I add all of the objects in my game for level 1.
For example I have a bunch of JLabels inside the container which represent walls, the main character, monster's, or the exit for each level.
When the person completes a level, I want to get rid of everything in the container and create all new ones, since the level layout would obviously change for the next level.
Either
1) I need to keep the container and empty it out and fill it with new JLabels and new locations of them.
OR
2) somehow destroy the JFrame and create a new one with the updated level layout.
I tried to do option 2 but have been running into memory issues, and needing to restart the computer. I am implementing method two by calling the dispose method on the Jframe and creating a whole new one.
I also want to say that this is multi-threaded, a thread is created for each monster, but I know the thread is killed after each level is completed(i have tested this)
any ideas?
take a look at my code below if it helps...
( i have taken the unneccessary portions out(just movement logic etc.))
thanks.
import java.awt.*;
import javax.swing.*;
import java.text.*;
import java.awt.event.*;
import javax.swing.event.*;
import javax.swing.Timer;
import java.lang.Math;
import java.util.Random;
import javax.swing.JOptionPane;
import java.lang.String;
public class DungeonMaster extends JFrame
public DungeonMaster(int L) {
start_hero_X = 260; //starting location of hero
start_hero_Y = 160;
start_redMonster_X = 300; //starting location of red monster
start_redMonster_Y = 200;
stairs_X = 500; //stairs location
stairs_Y = 460;
Level_Complete = false;
if (L == 1)
Load_Level_1();
else if (L==2)
Load_Level_2();
else
Load_Level_3();
CreateUserInterface();
private boolean Level_Complete;
private int start_hero_X,start_hero_Y;
private int start_redMonster_X, start_redMonster_Y;
private int stairs_X,stairs_Y;
private Hero H;
// private redM RM;
private redM redMonster;
private JLabel stairs;
private int size = 90;
private int grid_unit_size = 20;
private int speed = 20;
boolean visible = true;
//initialize the virtual board...it will eventually be loaded with the
//various levels as the load level functions are called.
char [][] VirtualBoard =
// LEVEL 1
char [][] Level_1_Board =
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','W','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','W','W','W','W','W','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','S','S','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','S','S','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'}
//LEVEL
char [][] Level_2_Board =
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','W','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','W','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','W','e','M','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','W','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'}
// LEVEL 1
char [][] Level_3_Board =
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','W','W','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','W','W','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','W','W','W','W','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','S','S','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','S','S','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'},
{'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e'}
//e=Empty
//W=Wall
//S=Stairs
//D=Door
//K=Key
//B=Button
// CONTAINER CONTAINER CONTAINER CONTAINER CONTAINER
Container contentPane = getContentPane();
//------Methods to load various levels to the virtual board------
void Load_Level_1(){
contentPane.setBackground(Color.LIGHT_GRAY);
contentPane.setLayout(null);
for (int i = 0; i < 30 ; i++){
for(int j = 0; j < 30 ; j++){
VirtualBoard[j] = Level_1_Board[j][i];
//stairs
stairs = new JLabel();
stairs.setIcon(img_stairs);
stairs.setBounds(stairs_X, stairs_Y,grid_unit_size*2,grid_unit_size*2);
contentPane.add(stairs);
// --------------Hero------------------
H = new Hero(start_hero_X,start_hero_Y);
contentPane.add(H);
// --------------redMonster------------------
redMonster = new redM(start_redMonster_X,start_redMonster_Y);
contentPane.add(redMonster);
public void Load_Level_2(){
contentPane.setBackground(Color.LIGHT_GRAY);
contentPane.setLayout(null);
for (int i = 0; i < 30 ; i++){
for(int j = 0; j < 30 ; j++){
VirtualBoard[j][i] = Level_2_Board[j][i];
//stairs
stairs = new JLabel();
stairs.setIcon(img_stairs);
stairs.setBounds(200, 200,grid_unit_size*2,grid_unit_size*2);
contentPane.add(stairs);
// --------------Hero------------------
H = new Hero(20,500);
contentPane.add(H);
// --------------redMonster------------------
redMonster = new redM(300,40);
contentPane.add(redMonster);
public void Load_Level_3(){
contentPane.setBackground(Color.LIGHT_GRAY);
contentPane.setLayout(null);
for (int i = 0; i < 30 ; i++){
for(int j = 0; j < 30 ; j++){
VirtualBoard[j][i] = Level_3_Board[j][i];
public void CreateUserInterface()
setFocusable(true); //allows keyboard input
addKeyListener(
new KeyListener()
public void keyPressed(KeyEvent event){
Move(event);
public void keyReleased(KeyEvent event){
public void keyTyped(KeyEvent event){
// ------------------ CREATE WALLS,DOORS--------------------
//this function loops through all squares on the virtual board and sets
//icons for walls and doors in the content pane wherever it finds a 'W'
//or a 'D' respectively
//load level into virtual board
//loop through virtual board looking for W's and D's
for (int i = 0; i < 30 ; i++){
for(int j = 0; j < 30 ; j++){
if(VirtualBoard[j][i]=='W')
JLabel J = new JLabel(); //set wall icon in content pane
J.setIcon(img_wall);
J.setBounds(i * grid_unit_size,j * grid_unit_size,grid_unit_size,grid_unit_size);
contentPane.add(J);
if(VirtualBoard[j][i]=='D') //set door icon in content pane
JLabel J = new JLabel();
J.setIcon(img_door);
J.setBounds(i * grid_unit_size,j * grid_unit_size,grid_unit_size,grid_unit_size);
contentPane.add(J);
setSize(660,640);
setTitle(" DUNGEON MASTER");
setVisible(true);
}//------------- END CREATE USER INTERFACE.-------------------
// RESTART PROGRAM ... re-initialize everything
public void restart(){
//reset hero's location
H.X_coor = start_hero_X;
H.Y_coor = start_hero_Y;
H.setBounds(H.X_coor, H.Y_coor,grid_unit_size,grid_unit_size);
//reset hero's image
java.net.URL url = DungeonMaster.class.getResource("hero_D.png");
ImageIcon img = new ImageIcon(url);
H.setIcon(img);
//reset red monster's location
redMonster.X_coor = start_redMonster_X;
redMonster.Y_coor = start_redMonster_Y;
redMonster.setBounds(redMonster.X_coor,redMonster.Y_coor,grid_unit_size,grid_unit_size);
//------------------load images to be used--------------------------
     //code for images
// ---------------Create the user interface-----------------
//--------------MOVE FUNCTION for Hero-------------------------
public void Move(KeyEvent event)
int key = event.getKeyCode(); // keyboard code for the key that was pressed
if (key == KeyEvent.VK_LEFT) {
if (H.canMove("Left")){
H.moveLeft();
else if (key == KeyEvent.VK_RIGHT){
if (H.canMove("Right")){
H.moveRight();
else if (key == KeyEvent.VK_UP){
if (H.canMove("Up")){
H.moveUp();
else if (key == KeyEvent.VK_DOWN){
if (H.canMove("Down")){
H.moveDown();
//------------------------EVENTS---------------------------
H.setBounds(H.X_coor, H.Y_coor,grid_unit_size,grid_unit_size); //move hero
reachedStairs(); //check to see if stairs were reached
//---------------------REACHED STAIRS???-----------------------------
public void reachedStairs(){
if((stairs_X == H.X_coor && stairs_Y == H.Y_coor)||//since 4 grid units for stairs, check each one.
(stairs_X == H.X_coor && stairs_Y + grid_unit_size == H.Y_coor)||
(stairs_X + grid_unit_size == H.X_coor && stairs_Y == H.Y_coor)||
(stairs_X + grid_unit_size == H.X_coor && stairs_Y + grid_unit_size == H.Y_coor)){
//image for win level
stairs.setIcon(img_stairs_win);
//message for win level
JFrame F = new JFrame();
F.setBounds(300,300,200,200);
JOptionPane P = new JOptionPane();
JOptionPane.showMessageDialog(F,
"You beat the level, good job!",
"LEVEL COMPLETE",
JOptionPane.PLAIN_MESSAGE);
//restart();
//reset stairs image
Level_Complete = true;
stairs.setIcon(img_stairs);
//--------------------------LIFEFORM CLASS-----------------------------
public class LifeForm extends JLabel{
public LifeForm(){           
public int X_coor; //Coordinate position of the lifeform
public int Y_coor;
//----------CAN MOVE????---------------------------------------
public boolean canMove(String Direction){
//takes coordinates of object that wishes to move and the direction it wants to move in
//and returns true if object can move, false if object cannot move
int X = X_coor / 20;
int Y = Y_coor / 20;
if (Direction == "Left")
          ///etc....for right up down....
//--------------- END CAN MOVE????----------------------------
//------------------------END LIFEFORM CLASS------------------------------
// -------------------------HERO CLASS------------------------------
public class Hero extends LifeForm{
// CONSTRUCTOR
public Hero(int start_X, int start_Y){
X_coor = start_X; //Hero Starting Location
Y_coor = start_Y;
Key = false; //Hero doesn't get key initially
haskey = "No";
Vanish = 3; //Begin with this number of vanishes
Frozen = false;
// SET HERO'S INITIAL LOCATION
setIcon(img_hero_down);
setBounds(X_coor, Y_coor,grid_unit_size,grid_unit_size);
}// END CONSTRUCTOR
private int Vanish; //number of vanishes left
private boolean Key;
private String haskey; //If hero has key: "Yes", If doesn't: "No"
public boolean Frozen; //determines if hero can move or not.
public boolean EatFreeze;//frozen if getting eaten
     move functions here.
//------------------- MONSTER CLASS ---------------------------
public class Monster extends LifeForm{
public Monster(){
     //move functions here
//------------- END MONSTER CLASS -----------------------------
//------------- Red Monster Class -----------------------------
//The red monster will check to see if the hero is in the same row
//or column as it is. If the two are in the same row or column the red
//monster will FREEZE the hero so that he cannot move and the monster will
//move towards him. If there is a wall in between the two the hero will
//be safe, but if nothing is between them, the monster will devour the hero.
public class redM extends Monster implements Runnable{
Thread runner;
redM(int start_X, int start_Y){
//set monster's location
X_coor = start_X;
Y_coor = start_Y;
//set Monsters initial location on content pane
setIcon(img_RM);
setBounds(X_coor,Y_coor,grid_unit_size,grid_unit_size);
if(runner == null){
runner = new Thread(this);
runner.start();
public void run(){
while(Level_Complete==false){
monsterAttack(H.X_coor, H.Y_coor);
//-----------------MONSTER ATTACKS???-------------------------
public void monsterAttack(int H_X, int H_Y){
char dir;
int steps = 0;
int monsterPau

1 and 2:
public class DungeonMaster extends JFrame
    /** Creates a new instance of EventPress */
    public DungeonMaster(int L) {
        Level_Complete = false;
        if (L == 1)
            Load_Level_1();
        else if (L==2)
            Load_Level_2();
        else
            Load_Level_3();
        CreateUserInterface();
    private boolean Level_Complete;
    Container contentPane = getContentPane();
    //------Methods to load various levels to the virtual board------
    void Load_Level_1(){
        contentPane.setBackground(Color.LIGHT_GRAY);
        contentPane.setLayout(null);       
        for (int i = 0; i < 30 ; i++){
            for(int j = 0; j < 30 ; j++){
                VirtualBoard[j] = Level_1_Board[j][i];
//stairs
stairs = new JLabel(start stairs location);
contentPane.add(stairs);
// --------------Hero------------------
H = new Hero(start_hero_X,start_hero_Y);
contentPane.add(H);
// --------------redMonster------------------
redMonster = new redM(start_redMonster_X,start_redMonster_Y);
contentPane.add(redMonster);
public void Load_Level_2(){
contentPane.setBackground(Color.LIGHT_GRAY);
contentPane.setLayout(null);
for (int i = 0; i < 30 ; i++){
for(int j = 0; j < 30 ; j++){
VirtualBoard[j][i] = Level_2_Board[j][i];
//stairs
stairs = new JLabel(level 2 stairs location);
contentPane.add(stairs);
// --------------Hero------------------
H = new Hero(20,500);
contentPane.add(H);
// --------------redMonster------------------
redMonster = new redM(300,40);
contentPane.add(redMonster);
public void Load_Level_3(){
contentPane.setBackground(Color.LIGHT_GRAY);
contentPane.setLayout(null);
for (int i = 0; i < 30 ; i++){
for(int j = 0; j < 30 ; j++){
VirtualBoard[j][i] = Level_3_Board[j][i];
public void CreateUserInterface()
setFocusable(true); //allows keyboard input
addKeyListener(
new KeyListener()
public void keyPressed(KeyEvent event){
Move(event);
public void keyReleased(KeyEvent event){
public void keyTyped(KeyEvent event){
setSize(660,640);
setTitle(" DUNGEON MASTER");
setVisible(true);
}//------------- END CREATE USER INTERFACE.-------------------
//------------------------MAIN-------------------------------
public static void main(String args[]){
//Level 1
DungeonMaster Level_1 = new DungeonMaster(1);
while(Level_1.Level_Complete==false);
Level_1.dispose();
//Level 2
DungeonMaster Level_2 = new DungeonMaster(2);
while(Level_2.Level_Complete==false);
Level_2.dispose();
//Level 3
DungeonMaster Level_3 = new DungeonMaster(3);
while(Level_3.Level_Complete==false);
Level_3.dispose();
Level_1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Level_2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Just remember the monsters each have their own threads but they should be killed at the end of each level.
5)is this necessary? i like that my monsters and hero are Jlabels. you are saying for the walls etc, things that are static?
6) this is being done already. the boards you saw before are the strings, but they get copied into the current level board with 2 nest for loops for the 2 dim. array. each time the new level is loaded.

Similar Messages

  • How to Make a Multi-Level Game in Flash 5

    I'm wanting to know, "How to Make a Multi-Level game with
    Flash 5"? EX: If I were to make a space game, where after reaching
    a score of 2000 points, the game pauses and displays the text
    "Stage 2", then continues or provides a button to make the game
    continue starting on stage 2. Any help with this question is
    grately appreciated.
    coolburn

    coolburn wrote:
    > I'm wanting to know, "How to Make a Multi-Level game
    with Flash 5"? EX: If I
    > were to make a space game, where after reaching a score
    of 2000 points, the
    > game pauses and displays the text "Stage 2", then
    continues or provides a
    > button to make the game continue starting on stage 2.
    Any help with this
    > question is grately appreciated.
    >
    > coolburn
    First off.. Flash 5 is like.. Ancient. Dude. Seriously, thats
    more than
    3 versions ago, and there have been major major changes
    since.
    However, I'll give it a try..
    First off, there has to be some kind of an event that kicks
    it off. I
    would build something into the score system that would
    trigger this.
    For example.
    function updateScore():Void {
    _root.stage.scoreboard.text = myNewScore;
    if (myNewScore > 2000) {
    jumpToNextLevel();
    So, somewhere in your game a variable keeps the score.. if
    your game
    runs the updateScore function once in a while, if it hits
    more than
    2000, it triggers a new function called jumpToNextLevel.
    In the jumpToNextLevel, you would have to do more functions
    like
    pauseTheGame(), and such..
    In general.. break it down to small pieces of what you want
    to do. Each
    function would do a series of things.. Then when your going
    though your
    game, you call each function as needed.
    Hope this helps
    -Bill

  • Problem song on change Level game

    Hello everybody, (excuseme for my english)
    I have a strange problem that is introduced to every change of level (to times to times not) of my game. In practical some times it does not come played change music level and if control the state of the Player object in these cases me returns End_of_Media even if it has not been executed the play of music. (he song are of type wav)
    I use Sun wtk 2.2 on winXp
    Some suggestion!!!!!!!!!!!!!!!!!
    Thanks!!!!
    Code of creation of songs
    public class Games extends GameCanvas implements Runnable
    public static Player []Song;
    public Games()
    InputStream is;
    for(i=0;i<Song.length-1;i++)
    is=getClass().getResourceAsStream(AudioGame);
    Song[i]=Manager.createPlayer(getClass).getResourceAsStream(AudioGame[i]),ctype);
    Song[i].realize();
    Song[i].prefetch();
    // Add listener only for song of change level.
    listenerChangeLevel=new MyPlayListener(SongChangeLevelSong]);
    Song[ChangeLevelSong].addPlayerListener(listenerChangeLevel);
    // class of MyPlayerListener
    public class MyPlayListener implements PlayerListener{
    Player p;
    String s;
    Object ob;
    public MyPlayListener(Player p) {
    this.p=p;
    public void playerUpdate(Player pl, String event, Object o)
    p=pl;
    s=event;
    ob=o;
    if(event == PlayerListener.END_OF_MEDIA)
    try
    if(pl.getState() == Player.STARTED)
    pl.stop();
    if(pl.getState() == Player.PREFETCHED)
    pl.prefetch();
    if(pl.getState() == Player.REALIZED || pl.getState() == Player.UNREALIZED)
    pl.prefetch();
    catch(MediaException me){}

    I'm not sure whether to be concerned or comforted -- I'm having the same problem, starting last week, Wednesday or Thursday I think. I plugged in my iPod mini to my computer to charge, and when I checked on it, iTunes no longer recognized the iPod (I had to re-register the iPod through iTunes) and now it doesn't recognize that there is any music on it but does recognize that the memory is full -- the same happens when I disconnect the iPod to use it separately.
    I'm wondering if perhaps there was a screwy iTunes update or something. I don't recall downloading a new iTunes update, but I can't think of any other events to cause this. It's quite maddening. I love the **** thing but it'd be awful nice if it lasted for more than 13 months (so the warranty just ran out 36 days ago - I checked)

  • Mulit-level linking to master data via navig attribs:  A saga in two parts

    The Saga, Part 1
    I have a requirement to provide access to a hierarchy belonging to a characteristic that is not contained in an infocube.  At first I thought I was going to have to add this characteristic to the cube, but then I realized the characteristic is a navigational attribute of another characteristic that is contained in the cube.
    The Question, Part 1
    Will users be able to use this navigational attribute as a selection criterion on reports, and will they be able to activate and use the display hierarchy associated with this characteristic?  (I'm anticipating the answer to this question will be yes.)
    The Saga, Part 2
    Assuming the answer to the above is yes, let's carry this one step further.  The navigational attribute described above (let's call it the "local" navigational attribute) also possesses navigational attributes, one of which users want to be able to use as a selection criterion on the same report (let's call this one the "remote" navigational attribute).  They also want to be able to use the display hierarchy on this remote attribute.
    The Question, Part 2
    I know this is a long shot, but can a navigational attribute of a navigational attribute be accessed in BEx?  Can that remote navigational attribute be used as a selection criterion?  Can its hierarchy be used in a query?  The scenario would look something like the following:
    BASIC CHAR (contained in infocube)
      |
       --> LOCAL NAVIG ATTRIB
              |
               --> REMOTE NAVIG ATTRIB (hierarchy needed in report)
    I'm anticipating the answer to Question #2 will be no, but I just wanted to be sure.  I'm guessing I'll have no choice but to add at least one of these characteristics to the cube.
    Thanks
    P.S.  We're running BW 3.1, BI Content 3.3.

    <b>The Question, Part 1
    Will users be able to use this navigational attribute as a selection criterion on reports, and will they be able to activate and use the display hierarchy associated with this characteristic? (I'm anticipating the answer to this question will be yes.)</b>
    The answer is yes. It helps not to have the IO in the cube and still use it in the front end.
    <b>The Question, Part 2
    I know this is a long shot, but can a navigational attribute of a navigational attribute be accessed in BEx? Can that remote navigational attribute be used as a selection criterion? Can its hierarchy be used in a query? The scenario would look something like the following:
    BASIC CHAR (contained in infocube)
       --> LOCAL NAVIG ATTRIB
    &#61672;     REMOTE NAVIG ATTRIB (hierarchy needed in report)</b>
    When read this thread, I was curious to see if it works or not. I did try to do this on coorder, plant and plant category. Guess what, it didn’t work. I even flagged it “NAVIGATIONAL ATTRIBUTE INFOPROVIDER” in the IO maintenance to see it reflects on the cube’s navigational attributes
    No this scenario wont work.
    So in the infocube maintenance you need to see something like this basic char__local navig__remote nav to make the scenario work. Which is obviously unavailable in the cube maintenance.
    I would love to see some one make this work. Reduces lot of effort to realign data in the cube if there is a problem in the master data.

  • Saving the game levels

    hi,
    i am in as3 game development. i am creating multiple level game.if the user player the game after reaching the level on by one if the user want to exit the game and reload the game again resume the the i starts from the the same level user saved give me some ideas are tutorials 
    thanks in advance

    Hi,
    To save your level information upon exiting the game you have to use the shared objects. Just save your level information in the shared object, and check in your code for the that, if the user have any shared object attached with his profile ID then oload the level according to the shared object information.
    VIPUL

  • Flash Game Ground HELP!

    Hello all, I just started with flash and I'm pretty new to the language.
    I am currently making a game in flash and have a sprite that needs to jump up to platforms.
    He stands on the first rectangle I made but doesn't land on the others and passes right through them.
    I have changed the character code many times to no avail. I have tried other ways but he falls through the main ground platform when I change.
    Here's the code on my character, there is no code on the platforms. (I have tried coding the platforms which don't help either)
    onClipEvent (load) {
    speed = 8;
    isJumping = false;
    jumpSpeed = 0;
    startY = _y;
    scale = _xscale;
    onClipEvent (enterFrame) {
    if (isJumping) {
    _y += jumpSpeed;
    jumpSpeed += .86;
    if (_y>=startY) {
    _y = startY;
    isJumping = false;
    speed = 8;
    } else {
    if (Key.isDown(Key.UP)) {
    isJumping = true;
    jumpSpeed = -15;
    speed = 8;
    if (Key.isDown(Key.LEFT)) {
    play();
    _x -= speed;
    _xscale = -scale;
    } else {
    if (Key.isDown(Key.RIGHT)) {
    play();
    _x += speed;
    _xscale = scale;
    } else {
    stop();
    If there is more info I can provide to help, I will.
    Thank you.

    to have a game with Gravity, Jumping, and Ground Detection, first you need to make sure you enable all of these.
    GRAVITY-
    Gravity sounds weird and tricky but its also very simple.
    Theres a simple layout of code to enable Gravity.
    onClipEvent (load) {
         var Grav:Number = 0;
         var Gravity:Number = 5;
    onClipEvent (enterFrame) {
         _y += Grav;
         Grav += Gravity;
    What that does is adds a consistent pull on the MC you place it into. Adding a Gravity like effect.
    JUMPING-
    Jumping is also very simple once you've done it once or twice, and as i seen in your code you have.
    I will add Jumping to the previous code now.
    onClipEvent (load) {
         var Grav:Number = 0;
         var Gravity:Number = 5;
         var maxJump:Number = -22
    onClipEvent (enterFrame) {
         _y += Grav;
         Grav += Gravity;
         if (Key.isDown(Key.UP)) {
         Grav = maxJump;
    The maxJump variable is the height of the jump and can be modified to your liking, REMEMBER to always have the number as a minus - since flashes y axis is backwards.
    GROUND DETECTION-
    This is something i did not see in your code, which i believe it your issue.
    Ground Detection is very simple but hard to figure out with out good know how of Flash.
    First, make your Ground convert it to a MC, name it whatever you like.
    Second, set the Instance Name of your Ground MC, to "Ground" (no brackets).
    Third make sure all of you level/games ground is within this MC or within another MC with "Ground" as the Instance Name.
    I will add the Ground Detection to the previous code now.
    onClipEvent (load) {
         var Grav:Number = 0;
         var Gravity:Number = 5;
         var maxJump:Number = -22
         var touchingGround:Boolean = false;
         var Ground:MovieClip = _root.ground;
    onClipEvent (enterFrame) {
         _y += Grav;
         Grav += Gravity;
         while (Ground.hitTest(_x, _y, true)) {
              _y -= Gravity;
              Grav = 0;
         if (Ground.hitTest(_x, _y+5, true)) {
              touchingGround = true;
         } else {
              touchingGround = false;
         if (Key.isDown(Key.UP) && touchingGround){
              Grav = maxJump;
    Take your time to learn this and study it and re-build it on your own, or just use it and add to it.
    Message was edited by: UltimateFlashxz

  • Using Java for scripting in games - which technology to use?

    Hi, I'm currently in the process of implementing a java scripting implementation for a 3D game engine. Any suggestions on which java technology to use? It will handle high level game specific logic and a gui. So there will be a native implementation of awt created as well. I'm starting off with win32 and will port to mac and linux later.
    I'm thinking J2ME-CDC, but then theres CDLC, the personal edition, and so on. CDC and CDLC are nice since the jvm code is included but the CDC one needs to be ported to win32 (anyone already do this?)

    J2ME is designed for small consumer devices such as mobile phones, pda, pagers, set-top boxes and so on.
    You'r designing something for windows, mac and linux so I'd suggest standard edition rather than micro edition.
    I'm confused as to what you want to do though.
    Also, "porting" a java program shouldn't really be an issue (unless you've used lots of JNI or Runtime stuff).
    Basically though I don't really understand what you want to do, I did have some idea, but then you started talking about Micro Edition.

  • HT3702 How do I get a refund.  I downloaded a game for my daughter that stated it was FREE.  I was billed $99.99 and $16.97

    My account was billed today.  I do not want this game or app on my phone.  I would like to have my money back.

    The charge was probably for in-app purchases. Many developers make the base app available for free but charge for additional features such as new levels, game details such as "coins", tools, weapons, etc. So it's very likely that your daughter made this purchases without you knowing about it. I'd recommend turning off in-app purchases in the Restrictions settings on the iPhone/iPad/iPod she's using to prevent this from occuring in the future. You may wish to also turn off installing new apps so she can't purchase a new app without your approval.
    As to a refund, you probably cannot get one, since the terms of sale for the iTunes Store state that all sales are final. You can contact the iTunes Store, explain the reason for your request, and ask, though:
    http://www.apple.com/support/itunes/contact.html
    It's possible they'll make an exception for you.
    Good luck.

  • Games are getting closed unexpectedly

    Hi,
    I have got a Nokia Lumia 510 and all the updates are installed on phone. I am getting issue with many games which I have downloaded from marketplace. During gameplay after few levels, games just get close unexpectedly and I am back to home screen of XBOX App. I tried many times and I am sure I am not touching the Windows icon on bottom of screen.
    Once issue starts coming I am not able to play the games. This is happening with Angry Birds, FrogSling2 and Unite. I am a fan of Angry Birds and I am not able to play any stages now, after clicking on stage only the screen routes back to home screen. Since the games are from different vendors, I do believe the issue is not with games.
    I would like to know if this is a known issue and what can I do to fix it.
    Thanks,

    nohup the shell script that you use to start the processes.
    man nohup
    will show you what you can do.

  • K9AGM4 and 3d games?

    I got a K9AGM4 with an AMD Athlon 64 DualCore 4200+ and I was using the graphic card from
    the mainboard (ATI Radion X1250) when I noticed all the 3d isometric games I have had bugs on the main playing window. In NWN 1 you walk for 10 seconds then the screen goes brown or black you can teleport and then new room shows up for 5 second then goes black. In NWN 2 a white fog starts to appear in the main window, in Desperados 2 the view spins then disapears into a black area. I all the games you can still click and see the game icons or characters and the music still plays but you cant play the games. I thought it was the internal card that could not take the graphics but 3dmark03 still works with 1449 points. Nevertheless I did a big driver test and nothing changed. So I bought a geforce 8800 gt and the same effect is there high level games work but all 3d isometric don't. even if you disable the cards. I am starting to think that its a dual core or a motherboard (I have BIOS 1.3) thing. Any bios things I have to do to get it to work. The memory should be ok I have tried all types.
    Thanks
    By the way got XP-SP3,directx 9.0c,2 GB Ram am not playing around with overclocking stuff

    nvidia drivers are now 6.14.11.7516 (ie. 175.16) I tried 169.21, the ATI Drivers were 8.473.0.0 from the msi site. Tried 3dmark06 with 8800 GT ok 8000 point with 3dmark03 ok cant remember score, even Furmark03. Games: Stalker with 8800 GT:Game works in the 3d world but intro film freezes and you can skip it with esc.  Dark Messiahs Might and Magik works but freezes every 5 Seconds for a couple of seconds. Crysis Demo Freeze from the start probably when strying to start a filmsequence and has to be stopped.Star Wolves freeze periodically for no reason as well. I honestly think its the MoBo because even without the 8800GT using the onboard ATI, all the games that it can run ie. the isometric 3d style NWN1 NWN2 and Desperados 2 have the same repeatable bugs as with the 8800 GT.

  • Multiple Apple TV and content control

    I'd like to purchase three Apple TV devices and I'm worried that my children may be able to view whatever content i am watch by using their Apple TV.  I have young children and go out of my way to control the age appropriate content around the house.  My question - if i were watching an R rated movie in one room, would they be able to tape into what I'm watching?  Same question in regards to mirroring - would they be able to see what I'm watching on youtube or see me playing adult level games (violent content)?
    I appreciate the help.  I apologize if the question is elementary - I just need the answers before i purchase these devices and find out the hard way.

    Welcome to the Apple Community Tundy2.
    The Apple TV has parental controls that will stop users viewing rated content. It will stop such content being played but it won't stop them seeing it in the content list.
    They can't see what is being watched on one TV on another regardless of whether it's from your library or being mirrored.

  • Authorisation in BW 7.0 with Planning.

    Hi All,
    Have been setting up a new Authoridation object for our planning setup.
    The planning team would like to set up multiple permissions on 4 agregation levels coming off the one multi provider. The new authorisation concept allows you to specify the info-provider as the multi, but does not allow you to specify the aggregation level which we want to limit it to. Most users read off this aggregation level, but there are a few who write to it, and I need to be able to differentiate between them in the Authorisation object, but assigning 02 to one lot, and 03 to another. But these people may not have write access to another aggregation level running off the same multi.
    Is there an authorisation object that I have missed which I can add to specify the aggregation level in the authorisation object?
    Second question is that if you use S_RS_AUTH to assign an Authorisation object to a role, is it only relevant for that role or will it's permissions carry accross to other roles a user might have?
    Thanks for your help..
    regards
    Matt

    Thanks Ravinda for your answer.
    Is this using the new concept of security or the old one?
    Don't you need some type of planning level object or agregation level object within the authorisation object rather than the role? If you authorise in the new security model it will authorise to the muli level, and if you wanted only certain users to view agregates above it they would all have access as the new model gives them access to the multi.
    We are currently prefacing all queries with the agregate level they are giong through and we use this to secure in S_RS_COMP.....was hoping there was an object in the new security model which would allow us to select which Agregation level they were allowed to view so it could be tied up in the same auth object.
    Can you control the planning level from within the new object?

  • FS9/FSX under XP/Vista with bootcamp on an iMac

    Good day all,
    I've been a PC builder/user for many years and am considering an iMac. The one thing holding me back is it's ability to run FS9/FSX under XP/Vista via bootcamp.
    Anyone running FS9/FSX on an iMac?
    How are the graphics? (everything turned up to the max?)
    Do you reommend XP or Vista for FSX?
    Which iMac do you recommend? I'm thinking the 2.8 w/ 4GB ram, but don't want to go overboard...
    I'd like to make the switch, but have to have FS9/FSX. Thanks for any input.
    BCNU,
    AzCoastie

    Sorry to say I think you would be sorely disappointed. For that kind of a game (I was a big user of FSX on my old PC) you need some serious CPU and GPU. An iMac is a great machine but it is NOT a gaming machine. It will play medium level games very nicely, but serious, hard-core games like FSX require a Mac Pro with all the RAM you can afford, and the best video card they offer. Even then, you will lose performance by playing the game on a Mac.
    I ran FSX on a PC that had a Quad core extreme, 4GB of fast dual channel ram, and an 8800 Ultra, and I couldn't run the game at max. settings.
    Rich

  • Z6A Headset With Bootcamp On An iMac?

    I am running Windows 7 on my mac with bootcamp for gaming. I am currently looking to buy a TurtleBeach Earforce Z6A. (http://www.turtlebeach.com/product-detail/pc-headsets/ear-force-z6a/44) I can tell that my iMac does not have the required ports for the headset to work as it needs four jacks for different surround sound capabilities so I have found a Sweex 7.1 External Sound Card (http://www.amazon.co.uk/Sweex-7-1-External-Sound-Card/dp/B00265L1S2) and I beleive it has all the ports necessary for the headset to run but I do not want to spend a lot of money on this headset and be incapable of using it so if anyone could tell me if it would be possible to use the Sweex 7.1 External Sound Card to allow me to use the Z6A with my mac I would be exteremly greatful.
    I have a cheap headset but am unable to get the microphone attatched to the headset to work with my computer using the line-in jack on the computer and the Sweex Sound Card. It may just be me not installing it correctly or I don't have the required drivers or external microphones simply do not work with my bootcamped iMac.
    Any help would be appreiated. Thank you!

    Sorry to say I think you would be sorely disappointed. For that kind of a game (I was a big user of FSX on my old PC) you need some serious CPU and GPU. An iMac is a great machine but it is NOT a gaming machine. It will play medium level games very nicely, but serious, hard-core games like FSX require a Mac Pro with all the RAM you can afford, and the best video card they offer. Even then, you will lose performance by playing the game on a Mac.
    I ran FSX on a PC that had a Quad core extreme, 4GB of fast dual channel ram, and an 8800 Ultra, and I couldn't run the game at max. settings.
    Rich

  • Tetris always starts with the same blocks

    Has anyone else noticed that the first game in Tetris after launching it always starts with the same blocks? For me, it always gives me the red "Z" block, the yellow square, the green "Z", orange "L", purple "T", blue straight block, blue "L", and so on. Every time. Without fail. And although my second game starts with something different, all second games always start with the same sequence too (purple "T", orange "L", yellow square, green "Z", red "Z", and so on).
    Seems to me like whoever wrote the random number generator used by Tetris did a very poor job. Hopefully EA creates a version 1.1 to fix this, and Apple makes the update available for free to people who already bought Tetris. I find it hard to believe that something so obvious made it past QC.
    PowerMac G5 Dual 1.8   Mac OS X (10.4.5)   5G iPod 60GB

    Definitely agree about the need for a 1.1 update. The random generator and also the fact that, on my iPod at least, if I am listening to music and playing at the same time, whenever there is a change in tracks, the game locks up for a few seconds and I can't see the piece and it ends up dropping some place unexpected. This desparately needs to be fixed as many a 12th level game has been ruined because of this.

Maybe you are looking for

  • Use 3 internal table in GUI_Download

    Hello expert, i have 3 internal table: gt_header, gt_body and gt_footer. how can i used all 3 in gui_download fm. here is my sample code:   CALL FUNCTION 'GUI_DOWNLOAD'     EXPORTING       filename              = gv_file_name       filetype          

  • What is a table containing sales order and the contract it refers to

    Hi, I have a following problem (ECC6.0): A sales order is created in VA03 and referenced to a contract. I need to locate the table or tables (or FM) which contains the information of the sales order number and the contract number. Problem with VA03 i

  • Why would a photo open in IE browser and not Firefox?

    I have photo on a webpage ([http://hometown67.com/photos/OLLclassof67ab.jpg]) that opens fine in my IE browser but not my Firefox browser. I get a message that the file has an error but it doesn't.

  • X201 Wireless Card not detectable (Centrino Ultimate-N 6300 AGN) (Windows 7 64 bit)

    Hey! I have a slight problem here. We have 5 machines that got shipped with Windows 7 32 bit versions for two weeks ago, I tested all of them to make sure nothing was defect or such things but everything was fine (The wireless network card was clearl

  • How to use flashplayer 10.1 on Debian Lenny 64-Bit?

    nspluginwrapper tells me the following. What can i do? nspluginwrapper -v -a -i Auto-install plugins from /usr/lib/mozilla/plugins Looking for plugins in /usr/lib/mozilla/plugins *** NSPlugin Viewer  *** ERROR: /usr/lib/mozilla/plugins/libtotem-narro