Mouse Up to Level

I’ve set up a scene as a “Select Player” GUI. There are 3 animated players basically in an idle position to select from. When the game object is selected I want to be taken to the 1st level with that player displayed.

I created a Javascript and dragged it onto one of the players. I added the following code to that script.

/ Loads the level named “Maze A” as a response
// to the user clicking on the object
function OnMouseUp () {
Application.LoadLevel (“Maze A”);
}

Nothing happens when I click on the player. What is the correct code to achieve this design? Obviously I’m missing something very basic here.

Digital Duane

Ok…the code works on an object created in Unity. But doesn’t seem to work on an animation. I tried making the character a game object then attaching script to that. I’ve put him in a collider box and attached script to that to no avail. Is it possible to make an animated character clickable? As a last resort I’ll probably import an static .Obj or .fbx of the character and try to make that dynamic. Any ideas or suggestions?

Thanks!

Digital Duane

edit: forget that I just re-read your post… hmmmmmm