linking only one axis position
Posted: March 16th, 2007, 6:49 am
hi everyone!
i´m new to these expressions stuff, even though i´ve used some copypasted code now and then. i like programming (the very little i know of actionscript or java), so don´t mind explaining every bit! (heheheh)
let´s get to it: i´m working on a typical bullseye vision, like terminator´s eye. i have a center, and two lines (horizontal and vertical). i want to animate the center´s position, and that the lines move along with it.
so i thought: "let´s link the horizontal line to the center´s Y axis, and the vertical line to the center´s X axis". like, with the whip, right...? ... ... apparently not.
i kept thinking, cause everytime i mess with the code it shows me errors. i was looking for a way around it, and thought: "maybe if i link the line´s ANCHOR POINT to the center´s X axis position...". THAT WORKED! ... yeah, but exactly the opposite of what i was looking for: every time the center moves to the left, the line goes to the right. and it makes sense, right? since i´m moving it´s anchor point towards the left.
well that´s my current situation. i´m looking for either an expression that links Y axis of a layer to X axis of another layer, or a way to make "invert" of the anchor point expression i created with the whip.
guess this is easy stuff to you, hope i´ll learn something from this. i apologize if my english´s quite messy.
greetings from bariloche, argentina!
i´m new to these expressions stuff, even though i´ve used some copypasted code now and then. i like programming (the very little i know of actionscript or java), so don´t mind explaining every bit! (heheheh)
let´s get to it: i´m working on a typical bullseye vision, like terminator´s eye. i have a center, and two lines (horizontal and vertical). i want to animate the center´s position, and that the lines move along with it.
so i thought: "let´s link the horizontal line to the center´s Y axis, and the vertical line to the center´s X axis". like, with the whip, right...? ... ... apparently not.
i kept thinking, cause everytime i mess with the code it shows me errors. i was looking for a way around it, and thought: "maybe if i link the line´s ANCHOR POINT to the center´s X axis position...". THAT WORKED! ... yeah, but exactly the opposite of what i was looking for: every time the center moves to the left, the line goes to the right. and it makes sense, right? since i´m moving it´s anchor point towards the left.
well that´s my current situation. i´m looking for either an expression that links Y axis of a layer to X axis of another layer, or a way to make "invert" of the anchor point expression i created with the whip.
guess this is easy stuff to you, hope i´ll learn something from this. i apologize if my english´s quite messy.
greetings from bariloche, argentina!