Flasher Archive

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


Subject: Re: FLASH: Is it possible to drag tow items around at once?
From: Matt Wobensmith
Date: Wed, 2 Feb 2000 17:53:52 GMT

Hello,

You can't use the Drag Movie Clip action to drag more than one movie clip at
a time. Additionally, as mentioned below, movie clips in mask layers can't
be dragged.

However, a way of faking two draggable movie clips at once would be to make
one draggable, and on the button inside the movie clip, have a script that
activates a function somewhere else to make another item follow the dragged
item, based on its x and y location.

As in, two movie clips on the stage - we'll give them instance names "movie
a" and "movie b".

"movie a" is draggable. Inside "movie a", the button has this action:

On (Press)
Start Drag "/movie a"
Set Variable "/tracker:drag" = "true"
End On

On (Release)
Stop Drag
Set Variable "/tracker:drag" = "false"
End On


Then, the next step is making a movie clip that resides on the main timeline
(next to the draggable movie clips). This movie clip acts as a "function".
Its sole purpose is to check to see if you're dragging something, and if so,
make another movie clip follow it.

Create a new movie clip symbol. Put it on the stage. Give it instance name
"tracker". Edit it and give it two frames. This is important. Then, add the
following actions to the first frame of the movie clip:

If (drag eq "true")
Set Variable: "x" = GetProperty("/movie a",_x)
Set Variable: "y" = GetProperty("/movie a",_y)
Set Property ("/movie b", X Position) = x
Set Property ("/movie b", Y Position) = y
End If

Try it.

-Matt

---------------
Matt Wobensmith
Macromedia Tech Support
Flash Team Lead

----------
>From: "Shaun Brazier" <shaunbrazieratfreeuk [dot] com>
>To: <flasheratchinwag [dot] com>
>Subject: Re: FLASH: Is it possible to drag tow items around at once?
>Date: Wed, Feb 2, 2000, 10:09 AM
>

>As far as I know, and my knowledge only comes from the *on line help*, you
>can only drag one movie on the screen at any time.
>
>May be wrong, check it out in Help Topics
>----- Original Message -----
>From: George Medve <george [dot] medveatpres [dot] co [dot] uk>
>To: <flasheratchinwag [dot] com>
>Sent: Wednesday, February 02, 2000 3:56 PM
>Subject: FLASH: Is it possible to drag tow items around at once?
>
>
>Hi Guys,
>
>I need some assistance.
>
>What I want/need to do is drag two objects around at once, but both
>instances are on different layers:
>
>top layer: needs to be draggable
>middle layer: this is a mask
>bottom layer: this need to be draggable, moves in relation to the top layer
>
>
>I have tried:
>Start Drag "MCA"
>Start Drag "MCB", but the bottom one is the one that is dragged...it seems
>to drag the last movie clip instance named. (so if I tried Start Drag "MCB"
>Start Drag "MCA", the MCA would be dragged).
>
>I even tried to load the top layer onto level 1, still no luck
>
>Can anybody help?
>
>
>
>George
>-----------------------------------------------------------------------
>This message has been checked for all known viruses by UUNET
>in conjunction with the StarLab Virus Control Centre.
>
>flasher is generously supported by...
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and The Flash Film Festival
> "The World's Premier Flash Solutions Conference and Expo"
> March 27-29, Nob Hill Masonic Center, San Francisco, California
>
>-Register before Feb 25 and save $200!!-- www.flashforward2000.com
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>To unsubscribe or change your list settings go to
>http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>
>
>
>
>
>flasher is generously supported by...
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and The Flash Film Festival
> "The World’s Premier Flash Solutions Conference and Expo"
> March 27-29, Nob Hill Masonic Center, San Francisco, California
>
>-Register before Feb 25 and save $200!!-- www.flashforward2000.com
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>To unsubscribe or change your list settings go to
>http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World’s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Is it possible to drag tow it, Dorian Nisinson

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