Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: LocalToGlobal() (was: FLASH: tracking _x of object w/in MC)
From: Robert Davis
Date: Mon, 8 Jan 2001 15:26:16 GMT

you can use dot notation rather than 'with':

_root.testsym.testdot.localToGlobal();

try putting the command in the OnEnterFrame event of the parent of the
MC you are converting (i.e. in testsym).


In message <F17dOGCJLgRkQ9ZPWv100006289athotmail [dot] com>, Ted Buson
<tbusonathotmail [dot] com> writes
>thanks Muzak for the tip. This sounds like the right path. however, has
>anyone used localToGlobal? I must admit, I'm having a little difficulty
>using it. In the following code, I'm trying to apply it to "testdot", an MC
>w/in "testsym", and then trying to trace the result. I'm sure I'm doing
>something seriously wrong, can someone point it out?
>
>Ted
>
>
>onClipEvent (enterFrame) {
> with (_root.testsym.testdot) {
> localToGlobal();
> trace ("testdot x = " + _root.testsym.testdot._x );
> }
>}
>
>
>
>>From: "Muzak" <muzakatpandora [dot] be>
>>Reply-To: flasheratchinwag [dot] com
>>To: <flasheratchinwag [dot] com>
>>Subject: Re: FLASH: tracking _x of object w/in MC (newbie)
>>Date: Mon, 8 Jan 2001 07:04:19 +0100
>>
>>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
>>
>>----- Original Message -----
>>From: "Ted Buson" <tbusonathotmail [dot] com>
>>To: <flasheratchinwag [dot] com>
>>Sent: Sunday, January 07, 2001 10:08 PM
>>Subject: FLASH: tracking _x of object w/in MC (newbie)
>>
>>
>> > 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

----------------------------------------------------------
Robert Davis
----------------------------------------------------------
Solaris Media
www.solarismedia.co.uk
----------------------------------------------------------
20 Damien Street
London E1 2HX
United Kingdom

Tel: +44 (0)20 7791 1555
Fax: +44 (0)20 7791 1545
Mobile: +44 (0)7973 658033
Email: robatsolarismedia [dot] co [dot] uk
ICQ: 78236873
----------------------------------------------------------
Creative digital media solutions
----------------------------------------------------------


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 helpatchinwag [dot] com


Replies
  LocalToGlobal() (was: FLASH: tracking _x, Ted Buson

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]