I am trying to turn buttons off and back on from a loaded SWF.
When loading an external SWF into an empty MC, the bottons on the root are still active underneath the loaded SWF.
I am using the following code on the button which loads the external SWF
on (release) {
loadMovie(“1005.swf”,_root.location);
}
and then from the first frame of the the loaded SWF I have
_root.compact.enabled = false
_root.compact.enabled = true
this is not working; the buttons are still active…Can anyone please help.
system
February 25, 2004, 4:24pm
2
Is compact the instance name of your button?
system
February 25, 2004, 5:13pm
4
Why not use
[AS]on (release) {
loadMovie(“1005.swf”, _root.location);
compact.enabled = false;
}
[/AS]
?
scotty(-:
system
February 25, 2004, 5:19pm
5
Scotty I tried that bit when I unload the external SWF the button is still disabled
I enabled it =false
and then enabled = true
Im I placing the enabled = true in the wrong location
too unload the swf I have…
on (release) {
unloadMovie(this);
}
on a button within the external SWF
system
February 25, 2004, 5:33pm
6
I was afraid of that:)
On the button to unload:
[AS]on (release) {
unloadMovie(this);
_root.compact.enabled = true;
}[/AS]
scotty(-:
system
February 25, 2004, 5:45pm
7
Scotty, I tried that also, and I just tried it again…
when the SWF unloads the button is not active.
By your comment I am assuming that it is not wise to unload via a button is there a better way and will it help solve my problem.
system
February 25, 2004, 6:12pm
8
No, that comment was a joke, when I post the code for disabling the button I thought “and if he needs that button again”.
The code I gave you worked here.
Skip all the code concerning disabling/enabling.
to load/disable
[AS]on (release) {
loadMovie(“1005.swf”, _root.location);
compact.enabled = false;
}
[/AS]
to unload/enable
[AS]on (release) {
unloadMovie(this);
_root.compact.enabled = true;
}
[/AS]
If that still don’t work, post your fla and I’ll have a look
scotty(-: