PDA

View Full Version : ARGH!! Please help me out. Probably easy for you guys


rdefore
10-16-2003, 08:48 PM
Ok here is the deal,

I have MC that is a button. I made this button/MC a component so I can re-use it just by changing the paramaters. Now to label these buttons I am using a pixel font but the labels are on the _root level above the MC/button layer. I had to do this since the labels needed to be centered on the button and pixel fonts can not be centered that I know of?

So the question is this. How can I change the color of the specific text label when the corrsponding MC is in a certain state?

I made a quick and dirty example of this and I think it will do a lot better explaining it than my description :)

Thanks in advance!!

rdefore
10-17-2003, 04:56 PM
Hey all,
I posted a question in the actionScript forum but I have not gotten one reply :( .

So can anyone here help me out?

http://www.actionscript.org/forums/showthread.php3?s=&threadid=36265

Thanks

tg
10-20-2003, 01:17 PM
your button label, since it is a part of your button, should probably be part of your component, instead on the main timeline, since your component has the code: _root.label1.textColor = 0xFF0000;
your component (no matter which one you interact with), will only change 'label1'. put your label inside your component, the set your code to: this.labelname.textColor=0xff0000;


oh yeh... thanks for not crossposting.

tg
10-20-2003, 01:20 PM
posted an answer in the components section.

rdefore
10-20-2003, 05:39 PM
Thanks tg for your help.

I might not be following it right but when I tried it out the font gets blurry since the label is a pixel font and can't be center formatted (gets blurry)? Thats why I put them on the _root so I can manually center each one. Is there a work around for this or am I pretty much screwed?

Thanks again.

tg
10-20-2003, 05:52 PM
try embedding the font... don't know if it will work for you, but it may be worth a go.