I’ve been trying to solve this for my self for a couple of hours now, but it’s really getting frustrating when I can’t find a working solution. I’ll try to explain below:
I have main.swf, which contains MovieClips as buttons. In each button I have the following code:
[COLOR=RoyalBlue]this.onRelease = function() {
if (_root.currMovie == undefined) {
_root.currMovie = “contact”;
this._parent.container.loadMovie(“contact.swf”);
} else if (_root.currMovie != “contact”) {
if (this._parent.container._currentframe>= container.midframe) {
_root.currMovie = “contact”;
this._parent.container.play();[/COLOR]
Every button loads an external .swf with an intro. For instance, if you’re at the contact page and press about me. Before about me.swf is loaded, the previous .swf is doing an outro.
Every thing works yet.
But If I press the button work it loads work.swf, in this MovieClip there are several buttons who each load external .swf. Like project1.swf, project2.swf etc. These now load into a container inside work.swf and the buttons are of course MovieClips with the following code:
[COLOR=RoyalBlue]this.onRelease = function() {
_root.container2.loadMovie(“project1.swf”);[/COLOR]
It all works as long as I am previewing work.swf, but If I go to main.swf it wont work. So I put [COLOR=RoyalBlue]this._lockroot = true;[/COLOR] into the first frame in work.swf. And now it works.
But, but and but again this time every button in main.swf is loading work.swf. So I tried removing all the [COLOR=RoyalBlue]_root.[/COLOR] on the buttons in main.swf and now suddenly everything works great, except that the buttons just only work once.
Where is the problem that causes this and how do I solve it?
Thanks in advance.