Flasher Archive

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


Subject: RE: FLASH: Flash4: Variables
From: Ed Harvey
Date: Wed, 28 Jul 1999 16:37:40 +0100

Thanks for all your help. I final got it to work. This is want I ended up
doing.
I set up my Text Field (instance name "score") in a MC called "ScoreMC".
I have 3 frames in the "ScoreMC".
Frame 1: Set Variable: "score" = 0
Frame 2: Stop (labeled Hold)
Frame 3: (labeled Adding)
Set Variable: "Xpos" = GetProperty ("/ball", _x)
Set Variable: "Ypos" = GetProperty ("/ball", _y)
If ( (Xpos >= 178) and (Xpos <= 178) and (Ypos >=
164) and (Ypos <= 243))
> Set Variable: "score" = score + 1
end if
In the ball MC I just use
Begin Tell Target ("/ScoreMC")
Go to and stop ("Adding")
end tell target

Ed
> ----------
> From: John Croteau
> Reply To: flasheratshocker [dot] com
> Sent: Wednesday, July 28, 1999 3:37 AM
> To: flasheratshocker [dot] com
> Subject: Re: FLASH: Flash4: Variables
>
> Hi Ed,
>
> > I am tracking a ball, so that when it reaches a certain spot on the
> screen
> > it snaps into place and adds one to your score.
> > Set Variable: "score" = 0
> > IF (GetProperty ("/ball", _x) >= 96 and GetProperty ("/ball",_y) >= 164
> and GetProperty ("/ball", _x ) <= 178 and GetProperty ("/ball",_y) <= 243)
> > Set Variable: "score" = score + 1
> > end if
> > Can anyone tell me why the score stays at 0.
>
> Set Variable: "score" = 0
> Set Variable: "Xpos" = GetProperty ("/ball", _x)
> Set Variable: "Ypos" = GetProperty ("/ball", _y)
> If ( (Xpos >= 178) and (Xpos <= 178) and (Ypos >= 164) and (Ypos <=
> 243))
> Set Variable: "score" = score + 1
> end if
>
> In the code above, with the separation of Get Property and addition of
> parentheses, you can be sure the script is understood. Most likely the
> original script you supplied will work but with mine you can now check
> Xpos and Ypos and make troubleshooting much easier.
> The major problem is how you are using this code I think.
>
> ----------- -----------------------
> 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
>

------------------------------------------------------------------------
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


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