sorry for stupid question ...I'm a newbie ...
pauldstewart: "idiotto?" ... do you want to offend me? ..why?
btw I have solved with these scripts:
//ClosePainting (GUI.texture script)
var windowOpen : boolean;
var windowRect : Rect = Rect (20, 20, 450, 450);
var customSkin : GUISkin;
var aTexture : Texture;
var button : int;
// hide the window
function Start() {
Hide();
}
// if I click the 3D object on the scene, the variable is true and...
function Show(painting : Painting) {
windowOpen = true;
}
// ... set the custom skin, alpha, window rect and start WindowFunction
function OnGUI () {
GUI.skin = customSkin;
GUI.color.a = 0.8;
if (windowOpen) {
windowRect = GUI.Window (5, windowRect, WindowFunction, "My Window");
}
}
// create a X button for close the window and drag the window with texture
function WindowFunction (windowID : int) {
if (GUI.Button (Rect (0, 0,30, 30), "X")) {
Hide();
}
GUI.DrawTexture(Rect(0,0,400,400), aTexture, ScaleMode.ScaleToFit, false, 0f);
GUI.DragWindow (Rect (0,0,430,430));
}
// hide function for close the window (boolean=false)
function Hide() {
windowOpen = false;
}
and 3D object script:
function Update () {
}
private var closePainting : ClosePainting;
function Start () {
closePainting = FindObjectOfType(ClosePainting);
}
function OnMouseDown () {
closePainting.Show(this);
}
now I'm working on rotate and zoom the window and cursor change (from arrow to hand)..