Show an Image after a button is pressed

Hi its been 8 and a half hours and i dont know what im doing wrong here. I have a picture called loading and i want to show it after play is pressed… then load the level. Im not getting any errors either. My picture is in the correct resources folder too.
Here is the code.
#pragma strict

var img : Texture2D;
img = Resources.Load("loadingpicture");

			
function OnGUI () {
	if (GUI.Button (Rect (10,10,500,500), "I am a button")) {
		img = Resources.Load("loadingpicture");
	}
}

the “loadingpicture” never shows when i click the button. Can anyone please help?

You are just loading the image in memory, you need to print the image in the screen through either GUI or a gameobject.

Here is an example:
http://docs.unity3d.com/Documentation/ScriptReference/GUI.DrawTexture.html

So something like this would work if you want it through GUI

function OnGUI () {
    if (GUI.Button (Rect (10,10,500,500), "I am a button")) {
       GUI.DrawTexture(Rect(10,10,60,60), img);
    }
}