Changing layer properties

Does anyone know how to change the property of one layer on a rollover of another? For instance, I want to change the color of some words on a different part of the page when I rollover a button.

If you’re using Flash 5.0, then you’ll have to place the text you want to change in a movie clip. Give the movie clip an instance name, and then target it with the button.

do you know how that’s accomplished or should I explain it more indepth?

I am not sure how to target it with the button.

The thing is I want to rollover the button and have certain text change color and stay changed until I rollover the next button, then the orginal text will go back to its original color and other text will change color.

ok… follow these steps…

  1. open flash

  2. create a button

  3. create a movie clip and put it on the stage

  4. give the movie clip an instance name of “colors”

  5. go in and edit your movie clip

  6. in your movie clip put the words you want to have change color

oops sent on accident!

  1. open flash

  2. create a button

  3. create a movie clip and put it on the stage

  4. give the movie clip an instance name of “colors” (no quotes)

  5. go in and edit your movie clip

  6. in your movie clip put the words you want to have change color in frame 1

  7. copy that frame in frame 2 and off of that do a tween for it to change color… then copy that keyframe… then a tween for it to change back… directly off of that one…

  8. on the first frame put a stop action, on the second keyframe (the copy after it has changed color before it changes back) where the color is tweened put a stop, and on the last frame of your tweens (where it is the original color) put a gotoAndStop(1); action

  9. select the second frame (the copy of the first) and on your “frame” tab (by instance) give the tween a label name of “change” (no quotes), and on your copy of the frame after it has changed color, give it a label name of “back”

  10. in your button, put the following code:

on(rollOver) {
colors.gotoAndPlay(“change”);
}
on(rollOut) {
colors.gotoAndPlay(“back”);
}

that should work…

what the code does:


on(rollOver) {
colors.gotoAndPlay(“change”);
}

if the mouse rolls over the button, it accesses the movie clip with the instance name of “colors”, and it goes to the frame labeled “change” and plays the animation, then it will hit your stop(); action when it gets to the keyframe where the color is tweened… so the color will be changed when you roll over the button


on(rollOut) {
colors.gotoAndPlay(“back”);
}

this is the same as the other basically… when you roll off the button it accesses the movie clip just like before
then it goes to the frame labeled “back” (frame after the stop(); action it is at now) and plays the animation… when it gets to the end of the tween back to regular color, it will hit the gotoAndStop(1); action, which will set it back to frame 1 and it will stop there until you roll over the button again

i can make you an fla of it and email it to you if you want, cuz i dont know how to post files on here… lemme know if you want me to make you an example…

P.S. if anyone reads this and knows how to post files on here… like a link to download a file or whatever… lemme know so its easier to give examples

hope this helps…

-scott

just remembered… you cant directly tween text, convert it to a movie clip and use tint to change the color, or select it and go to modify > break apart, and change the color using the paint bucket, and use a shape tween… just lettin u know… (only cuz i tried the direct text tween and it didnt work)

-scott

It will work if you embed the font. None embeded fonts cannot go through a tween.

OK OK, I know this was asnwered 200 times, but I never took the time to learn it : HOW do you embed a font ? And does it also solve troubles with Text masking ?

pom 0]

just convert the text box to a movie clip and use the tint to change the color… or break it apart and use the swatch to color it… works perfectly fine for me… not sure about that imbeding… dont know what it does… but this way works for me…

-scott