Getting MC's to trigger one another...more complex than norm

Hello all,\r\rhope someone can help: \r\r3 MC (“arrowMC” - they are the same MC just duplicated on stage with different instance names) \r\rALL 3, sit within a “holderMC”. Each arrow (1,2,3) has 3 states Tween from Grey to orange to Purple (all denoted by frame label inside the arrowMC)\r\rwhat i want to happen: \r\rwhen arrowMC1 goes from Grey to Orange (by a buttone being pressed). I need ArrowMC2 to then go “grey to Orange” … and then arrowMC2 triggers arrowMC3…\r\rthe prcess then repeats by arrowMC1 going Orange to Purple - then making arrowMC2 do the same…\r\rHow do i tackle this ? anyscript on the Inside of the ArrowMC will be duplicated - becuase they are 3 instance of the same thing ? so any actions on fames in side the MC such as “gotoAndPlay _parent.arrow3MC…” wouldn’t work…unless in an “if” statement…becuase it’d be nothing more than an instance…\r\ryour advice would be reallllly appreciated guys.\r\rCheers\r\rKet \r\rany help asap would \r

I am a little confused. Please help me clarify.\r\r1) If you are going to have all arrows change colors, why use 3 different MC’s? Why use Actionscript at all? Just stagger your tween and, Voila!.\r\r2) you can please a/s inside any instance and it will NOT apply to all other instances. You can treat them all as separate objects. However, I go back to number 1.\r\r3) To answer your a/s question. If for some reason you absolutely wanted them to be a/s, then you would constantly check the value of the other mc’s color, perhaps on enterframe. Onclipevent(enterframe) you would use if statements, just like you mentioned. If you went this route, I would do all your fades and separate them by using frame labels and stop actions.\r\ryour first tween starts with frame label “blue” (no quotes); next one starts with label “grey”, etc. Then, you could use your a/s on the instance to check the color values and then send the mc to “blue”, “grey” or “orange”.\r\rDoes that help?

hi iammontoya,\r\rit is just 1 MC, just 3 instances placed on the stage.\ri have used the stop action and frame labels as you have also noted…\r\rI have tried to use this " onClipeEvent (enterframe) {" but with no joy…\r\ri know i can place a/s inside the MC but i just don’t know what i’d do… i’m a bit lost on the logic…\r\rdo you think i could have a bunch of “IF” statements Whilst also looking at the _name attribute …as each instance has a different name ?\r\ri.e. (in a function) \r\rif (_name…instance name, color…blue, green,etc) { \r _root.Holder.arrow1MC.gotoAndPlay (“blue”);\r}\r\rthis way each frame could set a variable on the _root… (as the a/s inside the MC cannot change AND it relies on the specific instance name (_name)?\r\rHERE’S THE QESTION :\r\rwhere do i place the “IF” statments… so that the complete movie keeps “looking” at the function (checking both instance name and the frameLabel) \r\ri’m just really stumped ?.. \r\rKet

how about specifying a target clip in an onLoad event? that way it can be different for each clip, while still using the same code.\r\ron each clip:

 \r\ronClipEvent(load){ targ = /* the next movie */ ; };

\rin each clip:

 \r\r_parent[targ].gotoAndPlay("start");

\rtarg should be a string.

allright… give this a shot…\r\rI have three instances of the arrow mc.\rarrow1\rarrow2\rarrow3\r\rI created a button that would check the color value of arrow1 and change all others accordingly. Put this code on your button.\r\ron(release){\rmycolor1 = new color(root.arrow1);\rmycolor2 = new color(root.arrow2);\rmycolor3 = new color(root.arrow3);\rvalue1 = mycolor1.getRGB();\rvalue2 = mycolor2.getRGB();\rvalue3 = mycolor3.getRGB();\r\rif(mycolor1.getRGB()==255){\r _ _ _ \rmycolor1.setRGB(10066329);\rmycolor2.setRGB(16750848) ;\rmycolor3.setRGB(255);\r} else if(mycolor1.getRGB()==10066329){\r _ _ _ mycolor1.setRGB(16750848) ;\r _ _ _ mycolor2.setRGB(255);\r_ _ _ _ mycolor3.setRGB(10066329);\r} else {\r_ _ _ _ mycolor1.setRGB(255);\rmycolor2.setRGB(10066329);\rmycolor3.setRGB(16750848) ;\r}\r\r}\r\r:)

thanks people ! \r\ri’ll try the loading a MC into the instance thing… \rIammontoya: i’ll try your script out… the only thing i had a problem with was that i had a “tween” between the colours…so it didn’t just jump… but essentially your script does its job well…\r\rcheers for that…\r\rthanks for all your help.\r\rKet

I’m glad it helps a bit. \r\rAbout the tween… that is why I said… why not just make one MC with the tweens staggered? put frame labels at the different points and do gotoandplay(grey)… gotoandPlay(orange) etc…\r\rthat will still do what you want it to… wont it?\r\rwell… since I dont know how to make the swf come up in this window…\r\rjust go here…\r\rwww.realinteresting.com/k…arrows.swf\r\rand the fla…\r\r[url=“http://www.realinteresting.com/kirupa/arrows.fla”]www.realinteresting.com/k…arrows.fla\r\r\rgood luck.