Flasher Archive

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


Subject: Re: FLASH: get and set property problems in level 1 movie
From: John Croteau
Date: Tue, 27 Jul 1999 01:44:30 +0100

Hi Karin,

> Has anyone experienced problems with GetProperty or SetProperty in a
> level1 Flash4 movie?
No

> I have been struggling for days with the syntax to get this to work.
> Dave Hollinden (thanks) looked at the scripting and agreed it should
> work. The drag and drop action works fine.
I'm a little confused maybe Flash is too :-)

> On (Press)
> Start Drag ("../tube", L=19, T=66, R=274, B=231, lockcenter)
> End On
> On (Release)
> Stop Drag
> If (GetProperty ("/tube",_droptarget) eq "/drain")
> Begin Tell Target ("../tube")
> Go to and Play ("turn")
> End Tell Target
> End If
> End On

First, why are you referring to the same movie
by both the relative and root paths?
..tube and /tube

Second, if the MC is on the main timeline

Begin Tell Target ("../tube")
Go to and Play ("turn")
End Tell Target

This refers to the timeline of the MC clip and is the same as:

Go to and Play ("turn") without the Tell Target

=--------------------------------=
If the frame Labeled turn is in the MC use this script:

On (Press)
Start Drag ("", L=19, T=66, R=274, B=231, lockcenter)
End On
On (Release)
Stop Drag
Set Variable: "DropName" = GetProperty ("", _droptarget)
If ("DropName" eq "_level1/drain")
Go to and Play ("turn")
End If
End On
=--------------------------------=
If turn is on the main timeline use this script:

On (Press)
Start Drag ("", L=19, T=66, R=274, B=231, lockcenter)
End On
On (Release)
Stop Drag
Set Variable: "DropName" = GetProperty ("", _droptarget)
If ("DropName" eq "_level1/drain")
Begin Tell Target ("/")
Go to and Play ("turn")
End Tell Target
End If
End On
-------------
Note, not once did I refer to the MC 'tube' which the button is within
in the above scripts (it isn't needed). This technique will not work if
the button is not on the timeline of the movie clip it will control.
Also, note I separated the Get property from the If statement this makes
it much easier to troubleshoot if you have a problem. You can check on
the variable DropName. For instance just add a temporary text field with
its variable set to DropName right next to your button. Put something
like "Not Yet" as its starting text.

By using the above technique you can see that the drop target includes
_levelx at the beginning of every _droptarget not on level zero.

----------- -----------------------
John Croteau croteauaterols [dot] com (mailto:croteauaterols [dot] com)
------------- -------------------------
FlashTek (Advanced Websites with Flash) http://www.FlashTek.com/
Flash Bible (Fast track to good Flash) http://www.FlashBible.com/
Flash Central(The Universe Starts Here) http://www.FlashCentral.com/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  FLASH: get and set property problems in , Karin Christensen

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