Hey guys

I'm creating my own escape game using AS2, but unfortunately i'm having a hard time. I need to combine 2 itens from my inventory but thre's something wrong with my code and I dont really know what.


During the game the player will find a control remote and batteries. What i would like to do is when the player clicks on the batteries (on the inventory) and then on the control remote, the batteris should disappear from the inventory and then the remote should be able to control the tv.

Here are the codes i'm trying to use. All of the 3 itens are movieclips.

Batteries code:

on(release){
_root.select="pilhas"
}


This is for the remote control:

on(release){
if(select=="pilhas"){
_root.pilhainv.gotoAndStop(1)
_root.controle="funcionando"
}
}


beyond that i'd like it to execute (the remote):

on(release){
if(controle=="funcionando"){
_root.select="controleok"
}
}



and finally the tv:


on(release){
if(select=="controleok"){
gotoAndStop(2)
}
}


What happens is that when i click on the batteries and then on the romete nothing happens

Can someone help me with that?

Sorry for the bad english