Flasher Archive

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


Subject: Re: FLASH: Actionscript problem
From: John Croteau
Date: Wed, 6 Oct 1999 02:37:31 +0100

Hi Karin,

> I am trying to finish a target shooting game but cannot solve a
> scoring problem. I have a round target centered in a larger
> rectangular target. I want to give a higher score if the hit is in
> the circle and a lower score if outside the circle. I thought I was
> going to be really clever and use a circular movie clip then use
> GetProperty of _target similar to using a _droptarget. Except that
> it isn't working. I get the high score if I use and = sign and the
> low score if I use eq, no matter where the hit is.

> I have tried setting a variable but get more or less the same result.
> I've also tried using _name. Any ideas??
Both _target and _name return properties of a movie clip and if external
to that movie clip they prvide no information that you don't already
know since you would need that information to target the information.

Their normal use is for programming shortcuts so you don't have to make
special variable and change them for multiple copies of a symbol.

In the same manor when you have a drag and drop situation where you have
objects you could be moving the name of the current drag item can be
revealed. The target it is dropped on is stored in _droptarget.

> This almost works, but I get only the high score (replacing the = with
> eq results in the low score):
> If (GetProperty ("/result/hit",_target) = "/result/circle")
> Set Variable: "ascore" = 10 - (shots -1)
> Else
> Set Variable: "ascore" = 7 - (shots -1)
> End If
> End If
By what mechanism will the name of /result/hit change so it will become
/result/circle?
Why can't you use the _droptarget property?
I'm not sure how your score is being activated, I think what you
probably need is an innovative use of _droptarget.

--
Coming Soon Flash 4 Web Animation F/X and Design
http://www.amazon.com/exec/obidos/ASIN/1576105555/flashcentral
----------- -----------------------
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-manageratchinwag [dot] com. Problems to: helpatchinwag [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-manageratchinwag [dot] com


Replies
  FLASH: Actionscript problem, Karin Christensen

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