AS trouble - trying to activate and deactivate buttons

Here’s what I’m trying to do:

on the root level, I have two buttons to control the animation in a movie clip. At the start, the left-hand button is active, and the right hand button is inactive. This is no problem, I’ve got that worked out :stuck_out_tongue:

Click the left button, it starts the animation (an MC within an MC). This animation is timeline-based. What I want to happen, is when the mc animation reaches a specific point, the left button is deactivated and the right one is activated.

Here’s my script (which doesn’t work)

//NOTE: the midfame variable is declared in the shelfAnime movie clip!
//set the upBtn state
_root.upBtn = false;
//get the button to drop the shelves
_root.dropBtn.onRelease = function() {
if (_root.caseFlow.shelfAnime1._currentframe = _root.caseFlow.shelfAnime1.midframe) {
_root.dropBtn = false;
_root.upBtn = true;
//get the button to lift the shelves
_root.upBtn.onRelease = function() {
if (_root.caseFlow.shelfAnime1._currentframe < _root.caseFlow.shelfAnime1.midframe) {
_root.dropBtn = true;
_root.upBtn = false;

I’m attaching the sample fla, compressed in a zip archive.

Any ideas as to what I’m doing wrong? thanks!!