Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: tracking _x of object w/in MC (newbie) |
From: | Paul Willoughby |
Date: | Tue, 9 Jan 2001 15:21:59 GMT |
That 'localtoglobal' thing seems a bit overly complicated to me, as you have
to define the point you want to convert as a new object. Not being too au
fait with the old OOP I can't make head nor tail of it :-(
An alternative is to use the old F4 workaround of adding the x/y positions
together of the parent and its child, for example:
realBoxX = _root.master_mc._x + _root.master_mc.box_mc._x
hth
paul
Muzak responded 08 January 2001:
> Hi Ted,
>
> If I'm not mistaken, what you need is localToGlobal() and/or
> globalToLocal().
>
> localToGlobal(point)
> Description
> Method; converts the point object from the movie clip's
> (local) coordinates, to
> Stage (global) coordinates.
>
> globalToLocal(point)
> Description
> Method; converts the point object from Stage (global)
> coordinates to the movie
> clip's (local) coordinates.
>
> I haven't used this myself (yet), but from what I read in the
> manual, it looks like that's what you need.
> hth,
> Muzak
"Ted Buson" wrote on January 07:
>
>
> > Hi all, stupid newbie question, hope you can help:
> >
> > So I've got an MC, box_mc, contained within another MC,
> master_mc. When I
> > click on a button, the x position of master_mc changes.
> There's another
> > button, which when clicked changes the _x of another MC,
> circle_mc. What i
> > want to do is set the _x of circle_mc based on the _x of
> box_mc, but as it
> > relates to the _root, not master_mc. In other words, if I just grab
> > master_mc.box_mc._x, it always gives me the same number,
> because in relation
> > to master_mc it is always the same, but what I really want
> is the _x as it
> > actually relates to _root, i.e. where it actually looks
> like it is onscreen.
> > Does this make sense? Can this be done? Any help much appreciated.
> >
> > Ted
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]