Im working on a site that was originally build by someone else, who is unable to complete and so have been finishing it off and doing revisions, etc.
I am having a problem to do with buttons. The way the site currently works is there is a main.swf that loads first and other .swfs are loaded into it. This has been done (I assume) because there are a great number of large animations that are triggered by buttons and it would be too big to do within movieclips or scenes. When a button is pressed the script links to a full frame size .swf that plays over the top of the main.swf. The problem is that the buttons underneath are still clickable through this animation.
The following actionscript has been put into the linked animations:
But these do not seem to work and the menu buttons are still clickable underneath.
Can I make this code work or is there another way?
One thing I noticed that I hadnt seen before is instead of buttons this guy had just named movieclips and linked them via actionscript in the first keyframe of main.swf. Some I have made buttons for the purpose of rollover animations and kept the same name for the actionscript, but this seems to have changed nothing.
_level0.mainMenu.mBtnMc1.enabled = false;
_parent.mainMenu.mBtnMc1.enabled = false;
And buttons are basically movieclips with up, down, over and click states. So just placing movieclips and using them as buttons is a viable strategy :)
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
I had tried these and seem to get no joy - the buttons are still active underneath the playing .swf. I've tried a fair few variations on this layer addressing too, but to no avail.
Are there any other ways to de-activate the buttons in a roundabout way, e.g. putting a listener to disable buttons when something plays and re-enabling when it stops?
That makes sense re: buttons being movieclips anyway - I'd never seen that approach before, but its interesting and I like it :) I assume a much earlier encarnation of flash didn't have 'button' objects and this was the standard way of doing buttons?