Global variables?

Ok I have a two MC’s in the root of the timeline which are:

helloMC & phase1

In the root of my timeline I have an actions layer which contains this code:

finish=false;
_root.phase1._alpha=0;

Now in the helloMC timeline I have an actions layer within it that contains this code:

_root.hellomc.onEnterFrame = function(){
speed=3;
fade=2;
if (speed!=100) {
with (_root.hellomc) {
_y+=speed;
_alpha-=fade;
finish=true;
}
}
}

Now the phase1 movieclip has its own actions layer within it that contains this code:

this.onEnterFrame = function(){
if(finish==true){
fade=3;
_root.phrase1._alpha+=fade;
}
}

So what is happening is that finish is not being set to “true” and the phase1 movieclip is not fading in after the hellomc is finished.
Any suggestions on how I can get this to work?

helloMC:

_root.hellomc.onEnterFrame = function(){
speed=3;
fade=2;
if (speed!=10 {
with (_root.hellomc) {
_y+=speed;
_alpha-=fade;
_root.finish=true;
}
}
}

Because the variable that you want to change is on the main timeline (_root).

=)

DOH!
thanks man

here is the file since that didn’t seem to work.

http://www.mthis.com/hold/projectmanagement.zip

Thanks

But nothing major, you´ll get when you see.

=)

Thanks Guig0…I see what I missed now.

Now I want to continue to pass the finish variable throughout all my movieclips so that when one finishes the next one will start.

Can I do this the same way? I tried adding another movieclip called phrase2 and from phrase1 I pass the value of true to the phrase2.finish variable. But it doesn’t seem to work.

Here is what I’ve added.

http://www.mthis.com/hold/projectmanagement.fla