Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path question 1

Status
Not open for further replies.

Adam14

Technical User
Nov 8, 2003
193
CA
I'd be so grateful if someone can help me with this. I've been trying to figure it out for hours now. Reading, searching and trying to find tutorials. The turorials I've found tell me I'm doing it right, but it's still not working. I have an MC with the instance name "brick" inside another MC with the instance name "brickmov". I have "brickmov" in the first frame, along with a button with this attached to it:

on (release) {
NC = new Color(_root.brickmov.brick)
NC.setRGB (0xcccccc)
}

If I take the ".brick" off the end, it changes the colour of "brickmov" but with the ".brick" in there it doesn't do anything. Am I missing something? I'm really trying to get the hang of this without asking too many stupid newbie questions here, but this one has me stumped. Thank, guys. Also, it's Flash 5 I'm using.

Adam
 
Ok, I got that kinda figured out, but now there's another issue. In frame one, on a button I have this:

on (release) {
bricks = 1;
while (bricks>0) {
duplicateMovieClip ("_root.newbrickmov", "mc"+i, i);
setProperty ("mc"+i, _x, 80);
setProperty ("mc"+i, _y, 318);
i++;
bricks--;
}
}

which creates unlimited duplicate of my MC "newbrickmov". When I click the button to change the colour - with the script in my prior message, each subsequent instance is changed - which is what I want. But, when I make the path
_root.newbrickmov.newbrick, each instance keeps it's original colour. Any ideas?
 
From trying to figure it out from my first message to my second, I changed my instance names from "brickmov" to "newbrickmov". In case you were thinking that was my problem. Thanks in advance.
 
Can you post a link to your .fla, so I (we) get a better picture?

Regards,

cubalibre2.gif
 
Somewhat fixed it...

It seems duplicateMovieClip duplicates the original movie clip as it was, so changes made in the original clip have to also be made in the duplicates...

I've condition the duplication on whether or not the original clip has been modified. Only did the X1 button. Hope you understand what I did...


Regards,

cubalibre2.gif
 
Thank you, oldnewbie. Is there anyway you can save that .fla for Flash 5?
 
Thanks again. Just reading through the script now. I think I can make most of it out, If I can gotonext (lesson), else grab (actionscript_dictionary) ;-)

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top