PDA

View Full Version : Linking x poisitions between to symbols?


cliffy
05-25-2003, 09:34 PM
I know this should be an easy question for a lot of you, but I haven't been able to find anything in the book that I have on simple linking of attributes, everything in the books is on event-driven stuff.

Basically I have a circle that is bouncing and I have a shadow that I want linked to an object to allow the shadow to follow the object on the x-axis and vary in size depending on the ball's y-position.

If anyone can help me on this one I would greatly appreciate it

Thanks

cliffy
05-25-2003, 10:27 PM
actually from what I read it would seem that:

ball1._x = ball2._x

would work

or if the script has to be belong to the object that is being controlled then:

this._x = _root.ball2._x

but of course that doesn't work either, otherwise I wouldn't be asking. Thanks for the help

farafiro
05-26-2003, 10:58 AM
cliffy
welcome to the forums
your code would work fine but just fire it within an onEnterFrame()

cliffy
06-02-2003, 07:41 AM
Thanks for the help.
Unfortunately even when using the command that you said I cannot get it to work.

The reason that I wanted a script of this sort was to control a shadow for a bouncing ball. If anyone knows of a tutorial that would go over something like this I would really appreciate it.

Thanks for the help

farafiro
06-02-2003, 08:20 AM
show us your fla, we fix it