Link to home
Start Free TrialLog in
Avatar of pixarksa
pixarksaFlag for United States of America

asked on

a problem in loadMovie

I have a main movie that has two scenes. scene1 has a movie clip which loads another movie clip inside it using loadMovie method, when I load the external movie using the following code in the last frame of the movie clip:

this.createEmptyMovieClip("container",1);
setProperty(this.container, _y, _root._y);
setProperty(this.container, _x, _root._x-200);
this.container.loadMovie("gallery1.swf");
stop();

I have two problems:
1- the external movie loads and the main movie plays the second scene and I don't want it to play.
2- The external movie has some dynamic text fields; the text does not show and the code on the buttons does not work.
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

as per my understanding, ur external SWF might be refering to _root which could the main reason.

I suggest to use _lockroot = true, this will lock the root property of external SWF to the root of it own base.. following updated code should fix the issues...




this.createEmptyMovieClip("container",1);
this.container._y = _root._y;
this.container._x = _root._x-200;
this.container._lockroot = true;
this.container.loadMovie("gallery1.swf");
stop();

Open in new window

Avatar of pixarksa

ASKER

I tried your code, but I the same problem is still there ...
FYI, this code runs on the second frame of the movie clip in the main movie.
Also, the dynamic texts do not appear in the loaded clip
ok,
with the provided information, it is nearly impossible to suggest any solution..

hence,
I request to attach your sample source files for review and quick solution..
You can download the files from here
http://www.healthgatemed.com/fla/fla_files.zip

There are two files; the main movie which has a movie clip inside it in the movie library named contents_mask_mc3. This movie clip plays the second and the third frames when you press the first button from the right  in this mc. When frame 3 palys it calls gallery1.swf movie and the dynamic text in gallry1.swf does not show!

To browse it and see  contents_mask_mc3 press the third button from the main menu.
Hello,

anybody can help me in the above problem please!
ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you aneeshchopra,

The dynamic text problem is solved, but the problem of the main movie plays the next scene is still there.

To see the problem, press the third button in the main menu, then press the first button from the right in the page contents; you will see that the main movie plays to the second scene while the gallry1.swf is loaded
Hi,

I tried some changes in the loadMovie code, but it is still not working! any idea about the solution ...