build for iphone - "function is not a member of object"

Hi - I have an application which works properly when built in the unity player, but when I do a development build for iphone, I get a number of errors, all stemming from a reference I am making to a script which is attached to another game object. The error, specifically, says:

‘turnOnLighter’ is not a member of ‘Object’.

This is my code:

in the LighterControl script:

var flameObjRef : GameObject; (tied to a game object called Candle, which contains the flame script)
var flameScriptRef = flameObjRef.GetComponent("FlameControl"); //references the FlameControl script
flameScriptRef.turnOnLighter();

in the FlameControl script:

function turnOnLighter(){
	//Do stuff
}

Any idea what’s going on?

Replace the second line with:

var flameScriptRef : FlameControl = flameObjRef.GetComponent("FlameControl"); //references the FlameControl script

UnityScript does not know about the particular return type of GetComponent(). Not sure why it works in the Editor, though.