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
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() {
_root.caseFlow.shelfAnime1.gotoAndPlay(“drop”);
_root.caseFlow.shelfAnime2.gotoAndPlay(“drop”);
_root.caseFlow.shelfAnime3.gotoAndPlay(“drop”);
_root.caseFlow.shelfAnime4.gotoAndPlay(“drop”);
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() {
_root.caseFlow.shelfAnime1.gotoAndPlay(“lift”);
_root.caseFlow.shelfAnime2.gotoAndPlay(“lift”);
_root.caseFlow.shelfAnime3.gotoAndPlay(“lift”);
_root.caseFlow.shelfAnime4.gotoAndPlay(“lift”);
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!!