Skip to main content
Known Participant
February 23, 2010
Question

newbie, please help--swf files work fine separately, don't work when on same page

  • February 23, 2010
  • 1 reply
  • 807 views

Hello all,

I am new to flash, and piecing together different templates to try and  learn things.

I have run across a strange problem. When I load products2.swf by  itself, I can call the two "copy" files and everything works. When I  open 0342.swf (the index page), I can switch between the home and  products2 pages, but I can't view the "copy" pages.

I'm guessing there may be some sort of conflict with variable names,  but I have been messing with it for most of today.
I have uploaded all of the FLA files to here:
http://littlebuddymedia.com/flashhelp.zip
If you make an swf file out of each of the attached items, and open  the 0342 file, you will see what is supposed to be happening.
Any help anyone can offer is greatly appreciated.

Below is the code from each relevant button in case that is easier for  some of you.

Thank you in advance!


*****
From the 0342 page (the index page)
My "Home" button
---------
on (release) {

if (_root.currMovie == undefined) {

_root.currMovie = "home";
_root.container.loadMovie("home.swf");
} else if (_root.currMovie != "home") {
if (_root.container._currentframe >= container.midframe) {

_root.currMovie = "home";
_root.container.play();

}

}

}
----------

My "Products" button
----------
on (release) {

if (_root.currMovie == undefined) {

_root.currMovie = "products";
_root.container.loadMovie("products.swf");
} else if (_root.currMovie != "products") {
if (_root.container._currentframe >= container.midframe) {

_root.currMovie = "products";
_root.container.play();

}

}

}

******************
FROM THE PRODUCTS2 page

My "copywebdev" button
--------------------
on (release) {

if (_root.currMovie == undefined) {

_root.currMovie = "copywebdev";
_root.copycontainer.loadMovie("copywebdev.swf");
} else if (_root.currMovie != "copywebdev") {
if (_root.copycontainer._currentframe >= container.midframe) {

_root.currMovie = "copywebdev";
_root.copycontainer.play();

}

}

}



My "officetech" button
----------------------------
on (release) {

if (_root.currMovie == undefined) {

_root.currMovie = "copyworktech";
_root.copycontainer.loadMovie("copyworktech.swf");
} else if (_root.currMovie != "copyworktech") {
if (_root.copycontainer._currentframe >= copycontainer.midframe) {

_root.currMovie = "copyworktech";
_root.copycontainer.play();

}

}

}

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
February 23, 2010

to the frame 1 main timeline of all your loaded swfs add:

this._lockroot=true;

Known Participant
February 23, 2010

All that did was prevent the products and home files from being called properly.

Can you take a look at the linked files?

Make swf files out of each of the fla files.

Open the "products2" swf. You will see that the buttons switch between two text boxes without problems.

Open the "0342" swf. You will see that you can navigate between the Home and Products buttons just fine, but the text boxes on the products page do not load.

Thank you for the original response.

kglad
Community Expert
Community Expert
February 23, 2010

i don't download and correct files unless hired.

adding this._lockroot=true couldn't cause any problems unless you intended _root in your loaded swfs to reference the main timeline in the loading swf.  did you?