PDA

View Full Version : Movies Communication


Neworld
08-08-2006, 10:15 AM
Hi everyone.

I'm building a map movie that opens another movie using the loadMovieNum function loadMovieNum("scatola.swf", 1);

The problem is that I'm not able to make the two movies comunicate by themself.

Can someone help with this?


Thanks to all
Raffaele Colleo

mooska
08-08-2006, 10:54 AM
Use LoadMovie instead, it will be simpler. Then you can just adress you movies this, _parent etc.

Neworld
08-08-2006, 11:06 AM
Use LoadMovie instead, it will be simpler. Then you can just adress you movies this, _parent etc.

You are saying this:

in the button of the first movie:
on(release){
varName1 = "var description";
loadMovie("movie_two.swf");
}

and in the second movie:
varName2 = _parent.varName1;

is this correct?

mooska
08-08-2006, 11:15 AM
More or less//code on frame
this.clip.loadMovie("myfile.swf");
this.onEnterFrame = function(){
if(clip._width>0){
trace(this.myvar);
}
}
//in the loaded swf
this._parent.myvar = "hello";

Neworld
08-08-2006, 12:40 PM
that is for sending a var from movie_two to movie one. Right?

mooska
08-08-2006, 01:22 PM
its one of the ways, it depends what youre trying to do.