SIGN IN
::
SPONSORS
::
ABOUT US
::
CONTACT US
FORUMS
TUTORIALS
MAGAZINE
TRAINING
VIDEOS - REELS
PODCASTS
EVENTS
SERVICES
NEWSLETTER
NEWS
BLOGS
ADOBE DIRECTOR:
Home
Director Forum
Tag
Motion Graphics
Re: Lingo to match two clicked on sprites - like a matching game
Cow Forums
:
Adobe Director
VIEW POSTS
•
ADD A NEW POST
•
SEARCH
•
CHANGE FORUM
Respond to this post
•
Return to posts index
•
Read entire thread
Re: Lingo to match two clicked on sprites - like a matching game
by
William McGrath
on Feb 10, 2009 at 6:12:07 pm
You can do a single script for each pair of sprites. Simply identify them in a property such as this:
property myLetter
on beginSprite me
myLetter="a" --or whatever
end
To match the clicks, I would make two globals, say gClick1 and gClick2.
Remember to write global gClick1, gClick2 at the top
on mouseUp me
if gClick1="" then --in other words, the first slot was available (because this is click number 1)
gClick1=myLetter
else -- if the first slot was taken, then this is obviously the second click
gClick2= myLetter
--at this point you also compare them, do what has to be done with right or wrong answers, and reset the globals for the next set of clicks--
if gClick1=gClick2 then
whatever
else
whateverElse
end if
gClick1=""
gClick2=""
end if
end
There are a million ways of doing it, but I like this one.
---
william
Respond to this post
•
Return to posts index
•
Read entire thread
Current Message Thread:
Lingo to match two clicked on sprites - like a matching game
by shulamis Durden on Jan 29, 2009 at 4:40:13 am
Re: Lingo to match two clicked on sprites - like a matching game
by William McGrath on Feb 10, 2009 at 6:12:07 pm
Re: Lingo to match two clicked on sprites - like a matching game
by shulamis Durden on Feb 10, 2009 at 10:39:06 pm
Re: Lingo to match two clicked on sprites - like a matching game
by William McGrath on Feb 11, 2009 at 5:40:43 pm
Re: scripting error for matching game
by shulamis Durden on Feb 12, 2009 at 3:41:13 am
Re: scripting error for matching game
by William McGrath on Feb 13, 2009 at 7:40:05 pm
Re: function error for matching game
by shulamis Durden on Feb 15, 2009 at 7:02:30 pm
Re: function error for matching game
by William McGrath on Feb 16, 2009 at 8:34:14 am
clarification- function error for matching game
by shulamis Durden on Feb 16, 2009 at 2:00:38 pm
Re: clarification- function error for matching game
by William McGrath on Feb 18, 2009 at 8:16:15 am
Note:
If you are a registered user please
click here to login
before posting.
Your post will not be accepted if your name and email address are not registered in our database. Click
here
if you do not have an account.
Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message
Entire Thread
None
Message:
Note:
The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key.
Read more...
Add your message signature
Note:
By clicking "Post Direct" button above, you are agreeing to the Creative Cow's
Code of Conduct
.
FORUMS
•
TUTORIALS
•
MAGAZINE
•
TRAINING
•
VIDEOS - REELS
•
PODCASTS
•
EVENTS
•
SERVICES
•
NEWSLETTER
•
NEWS
•
BLOGS
©
CreativeCOW.net
All rights are reserved.
[
Top
]