I've added an array called skills with an instance variable heroName to store all of the heroes skills for the skill select screen. I create an instance of the array for each hero and have a function addSkill() that adds a skill to the skills array.
The function adds a skill name, type and frame number to the end of the array:
The skills array looks like this:
Now updating the preview can be reduced down to two events.
Select the skills array for the current hero, find the index of the skill name in the array, and then call the updatePreview() function with the skill name and frame number from the skills array:
Setting up the skill name textboxes can be reduced to a loop as well.
Select the skills array for the active hero, loop through the array selecting the skillName text for each skill, setting its text to the skill name in the array and setting its color based on the skill type in the array.
In fact this block of events is the same for every hero except for the line that sets the animation frame so I just took that part out and put the whole thing into a function called displaySkills(), to be called whenever you switch heroes.