variable inside prefab

hello,

how to insert a variable (myVariable) in prefab?

    for (var i : int = 0;i < numDots; i++) {
    var dot : Transform;
    dot = Instantiate (prefab, Vector3(xx, yy, 0), Quaternion.identity);
    dot.myVariable = i;
}

This unfortunately does not work ;(

Thank you for your help, Tim

Use GetComponent to refer to the script attached to the instantiated prefab. The prefab has no property called "myVariable"; that would only be in a script.