private SpriteType loadSpriteType(String pathOfMan)//String type_man, 
   {
        // WE'LL USE THESE TO INITIALIZE OUR SPRITE TYPE
        ArrayList<AnimationState> listOfAnimationStates = new ArrayList<AnimationState>();
        
        
        
        
        //Adds all of those animation states in Animation State form (not String form like spriteAnimationStates)
        for(int index=0;index<spriteAnimationStates.size();index++)
            listOfAnimationStates.add(AnimationState.valueOf(spriteAnimationStates.get(index)));
        
        // WE NEED THE TRACKER TO ENSURE FULL IMAGE LOADING
        MediaTracker tracker = new MediaTracker(this);
        
        // AND HERE'S THE ACTUAL SPRITE TYPE
        SpriteType man = new SpriteType();
        
        
        
        
        //Add all of the images
        for (int eachAnimationState = 0; eachAnimationState < listOfAnimationStates.size(); eachAnimationState++){
            // CREATE A NEW LIST
            PoseList poseList = man.addPoseList(listOfAnimationStates.get(eachAnimationState));
            //Get the two-dimensional attribute array for each animation state.
            String[][] array = spriteAnimationAttributes.get(eachAnimationState);
            //For every imageID there is going to be a duration so we'll just get the length of how many imageIDs there are.
            String[] imageIDsArray = array[1];
            int howManyImageIDs = imageIDsArray.length;
            
            //For how ever many durations/imageIDs there are add them to the postList.
            for(int eachAttribute=0;eachAttribute<howManyImageIDs;eachAttribute++)
                poseList.addPose(Integer.parseInt(array[1][eachAttribute]),Integer.parseInt(array[0][eachAttribute]));
            ArrayList<Integer> imageIDsArrayList = new ArrayList<Integer>();
            for(int i=0;i<howManyImageIDs;i++)
                imageIDsArrayList.add(Integer.parseInt(imageIDsArray[i]));
            ArrayList<Integer> uniqueIDList = new ArrayList<Integer>();
            for(int eachImageID=0;eachImageID<howManyImageIDs;eachImageID++)
                if(!uniqueIDList.contains(imageIDsArrayList.get(eachImageID)))
                    uniqueIDList.add(imageIDsArrayList.get(eachImageID));
            
            //Make sure the file names are in sync with the imageIDs
            Collections.sort(uniqueIDList);
            //Get's the number of images for each state.
            ArrayList<String> names = getFileNames(uniqueIDList);
            
            // AND NOW LOAD THE IMAGES
            for (int i=0; i<names.size(); i++)
            {
                //Get file name
                String fileName = names.get(i);
                // LOAD THE IMAGE
                Image img = loadImageInBatch(pathOfMan, fileName, tracker, uniqueIDList.get(i));
                
                // GIVE IT TO THE SPRITE TYPE
                man.addImage(uniqueIDList.get(i), img);
            }
        }
        
        // WE BATCH LOADED THE SPRITES. BELOW THE MEDIA TRACKER
        // MAKES SURE ALL OF THEM ARE FULLY IN MEMORY BEFORE
        // WE GO ON. IT WAITS FOR THEM SO THAT THE APP DOESN'T
        // START WITHOUT THEM. THIS IS BECAUSE Java's METHODS
        // FOR LOADING AN IMAGE WORK ASYNCHRONOUSLY IN THE BACKGROUND,
        // i.e. ANOTHER THREAD
        try
        {
            tracker.waitForAll();
        }
        catch(InterruptedException ie)
        {
            // THIS SHOULD NEVER HAPPEN, BUT WE SHOULD AT LEAST PRINT THE
            // STACK TRACE JUST IN CASE THE IMPOSSIBLE IS MADE POSSIBLE
            ie.printStackTrace();
        }
        
        // RETURN OUR NEWLY CONSTRUCTED SPRITE TYPE FOR USE
        return man; 
    }