Ok, I can’t figure this out. I’m pretty new to flash…
Here’s the situation-
I’ve got a webpage- all the buttons (mc’s) are located on the main timeline, then on the top left at (0,0) i have an empty movie clip with the instance name “content”. This is where I am loading the external .swf files for the other pages on the site.
So, as an example, this is what i am using for the button.
Now when I click on that button, it loads “page1.swf” into the content movie clip. But if I click the same button again- “page1.swf” dissapears and comes back. I understand that logic… But I can’t understand how to make that button not do anything when “page1.swf” is already loaded into the content mc. I’ve searched everywhere, and I used help in flash, but I cant find anything…
BTW I’m using Flash 8- if that changes an answer at all…
I pretty much lifted this from a tutorial on this site by Claudio so can’t take credit but hope this helps, here’s the link to the tutorial as well. :kir:
While you could add:[AS]mybutton1.onRelease=function(){
resetall();
this.enabled=false;
}
//replace numberOfButtons below with correct number
function resetall(){
for(var i=1; i<=numberOfButtons; i++){
eval(“mybutton”+i).enabled=true;
}
}
//now all button instances must be mybutton1, mybutton2, etc.[/AS]
This code works great. How would I adapt it so that when another button (MC) is clicked, the previous one is reactivated?
For example, I am using movie clips for my buttons which have frame labels for each state; “off”, “over”, “out” and “active”. Using the provided code, the playhead of my MCs stay on the “active” label to indicate that the current page corresponds with the selection they have made. I need the unclicked MCs to all be set to the “off” label when another one is clicked.
Thanks Carbon. I’ve added the code and it’s not quite achieving the desired effect.
HERE is a link to the skeletal build of the site. What I’m hoping to achieve is to have the active link stay in the “up” position. The provided code acts on all of the links - including the one selected.