so uhhhh i'm trying to make a Riddle School esque flash game and my code won't work for some reason, i have no idea what went wrong because flash says there's no compiler errors. any help?

on(release){
if (_root.cursor.currentFrame == 1){
_root.dialogue.gotoAndStop(9)
}
if (_root.cursor.currentFrame == 2){
_root.dialogue.gotoAndStop(12)
_root.cursor.gotoAndStop(1)
_root.inventory.inv1.gotoAndStop(1)
}
}