If statement

hey im trying to figure out if statements in as2… basically im wanting to change the text of trainerTitleName to “YES IT WORKS” if mySlider includes LargeTrainer1 which is an image name linked in. I get an error wen i try this…

on (release) {

if (_root.productsContainer.mySlider == "LargeTrainer1")
_root.productsContainer.TrainerTitleName.text = "YES IT WORKS";


} else {

_root.productsContainer.TrainerTitleName.text = "BOOHOO NOOO BUT IT WORKS SO YAY";

}
}