How can I get a child object to read a variable held by the parent?

Just as a test, I have set up two cubes. One that when clicked, turns red and sets a private variable "isActive" to false, and if clicked again, turns green and sets "isActive" to true.

Code for parent object:

private var isActive = false;

function OnMouseUp ()
{
if (isActive == false)
    {
        isActive = true;
    }
else
    {
        isActive = false;
    }
}

function Update ()
{
if (isActive == false)
    {
        renderer.material.color = Color.red;
    }
else
    {
        renderer.material.color = Color.green;
    }
}

The other cube is supposed to turn yellow when hovered over by the mouse only if the "isActive" variable of the parent is true.

Here's the code for the child object:

function OnMouseOver ()
{
//"parentObject" is another game object that actually holds the "isActive" variable.
    if (parentObject.isActive == true)
        renderer.material.color = Color.yellow;
}

function OnMouseExit ()
{
    renderer.material.color = Color.white;
}

I know the 4th line of the child's code is wrong, i just put it there to show you what I'm going for. Is there a command or line of code that can read the variable from its parent without having to specifically define the name of the parent object?

This is the variable you want:

http://unity3d.com/support/documentation/ScriptReference/Transform-parent.html

You should just be able to change your 'parentObject' to 'parent' and use GetComponent() on that to get your script and then your variable.

So something like:

   var parentScript : ScriptName = parent.GetComponent(ScriptName);
    if (parentScript.isActive)
         renderer.material.color = Color.yellow;

if (transform.parent.GetComponent.<ParentScript>().isActive)

Substitute the actual name of the script that's on the parent. Also note that isActive can't be private if you want other scripts to access it. It has to be public, but if you don't want it to show up in the inspector, use @HideInInspector.