Flasher Archive

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


Subject: Re: FLASH: AS - scoring/values
From: Nathan Dicken
Date: Tue, 23 May 2000 14:51:13 +0100

Russell,

Assuming that your project is similar to the classic Concentration game,
you could have each mc (item) contain a variable of it's identity that gets
passed on to the stage when clicked. You can monitor which click this is
(first or second) and when a item is clicked for the match (2nd click),
compare its identity to the identity that is residing on the stage... If
they are equal then you have a match, you can then run a script to monitor
how many matches you have left.

After a pair of items are selected, just reset the identity variable on the
stage and get ready for two more to be selected. Of course there are many
ways that you could approach this idea. In the description that you
provided for setting the values to 0 or 1, you'd have to initially set the
value to 1 for the first clicked item, then cycle through the top or bottom
items (whichever is opposite) and set the matching mc's value to 1 and the
rest to 0. Once two items have been clicked, add their values and respond
accordingly. Hope this helps...

Nathan



>Hi folks...
>
>Here's the gist of what I'm attempting to do:
>
>I've got 2 MCs, and they are a bunch of items. Some of the top items match
>with some of the bottom items, and obviously, some do not. Here's the
>premise: If item(top) + item(bottom) = 2, then a "correct" sound/MC will
>play. If item(top) + item(bottom) = 1 or 0, then a "NO" sound/MC will play.
>
>In essence, it's a matching game. All "correct" items have a value of 1 and
>all other items have a value of 0, therefore, a score of 2 generates a good,
>a score of anything else generates a bad.
>
>Can anyone assist me with the ActionScript needed for this? Just a swift
>kick in the right direction is what I'm looking for.
>
>Thanks,
>
>Russell E. Unger


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
World Animation Celebration - Big Internet Animation Pow Wow Discount Offer

Register before May 25 mention flasher and save 25%!! www.wacfest.com

Be discovered, get a job or have your web series picked up. A big talent search for Shockwave
and Flash animators is happening May 30-June 4 in Hollywood. Featuring Rob Burgess, Matt
Groening, Brad Bird and more. www.wacfest.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: AS - scoring/values, Russell E. Unger

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