Parent-child relationship in Revolution
Thomas McGrath III
3mcgrath at adelphia.net
Sun Dec 26 13:52:08 EST 2004
I don't know how others would do this but I would use a Custom Property
to store the name of the 'child' graphic or whatever. Then via script
move the child which ever way you want.
If you it is relative move than store the 'move' coordinates and then
move the child by that.
Make a new custom property called CustPropChild (or whatever) and put
the name of the child graphic into it. You might have to put quotes
before and after the myChild.
on moveMe
put the CustPropChild of me into myChild
put the loc of me into myLoc
set the loc of graphic myChild to myLoc
end moveMe
on mouseUp
moveMe
end mouseUp
Others will help you more but the Custom Prop is great for storing
things like this associated with a particular graphic/field etc.
Tom
On Dec 26, 2004, at 9:36 AM, Stgoldberg at aol.com wrote:
> I am a new user of Revolution and apologize for missing many of the
> past
> discussions. I hope someone can help with the following question,
> which I could
> not immediately find addressed in the documentation: Can I establish a
> "parent-child" relationship within Revolution in the following 2
> situations:
> a. Can I arrange it so that while the program is running, the user
> can move
> a graphic and have another graphic follow along?
> b. Can I attach a button to a scrolling field such that the button
> scrolls
> along with the field?
> An advice would be greatly appreciated. Happy holidays to all.
> Stephen Goldberg
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541
More information about the use-livecode
mailing list