Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 9th, 2003, 08:08 PM
ssjgohan4life ssjgohan4life is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: USA
Posts: 2 ssjgohan4life User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to ssjgohan4life
New Game.

Hi, im an experienced flash user, but im a n00b when it comes to complex ActionScripting. And im looking to make a game called Connect The Dots, (if you dont know what that is, its the game where 2+ people draw lines on a grid of dots, and the person with the most boxes completed at the end, wins) And i need to know the fallowing:

How to tell the game to know when a user wants to make a line.

How to tell the game to know when a user has completed a box.

How to tell the game to know to put the user's initials in every box they make.

And how to tell the game to know to give the user a extra turn after he/she has made a box.

Any suggestions?

Reply With Quote
  #2  
Old September 11th, 2003, 11:34 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
i would use the drawing API do dynamically create your lines. have them click on the dots (which will be hotspots)...then as long as their mouse is down, use some trig to figure out which dot is closest to the dot they clicked on, but only in a one dot radius.

When they let got of the mouse, have flash make them let up on another dot. If they let up on the dot, draw the line, if not, clear the line and let them draw somewhere else.

i would store all of the dots and lines in a multidimensional array. Do a loop through the array any time it changes. So, if you had a 4x4 box, my array would look like:

Code:
board = [[0,0,0,0],
 [0,0,0,0],
 [0,0,0,0],
 [0,0,0,0]];


And then when a user clicks on a button, and draws a line, change the 0's to 1's.
Code:
board = [[1,1,0,0],
 [0,0,0,0],
 [0,0,0,0],
 [0,0,0,0]];


this would be a line from the first and second dot. Using this method, you could also check to look for squares. So, after a person moves, check to see if there are any new squares. depending on who's turn it is, attach or create a letter or icon representing that player. So, if a new box exists, set the turn back to the same player...

that's one method to approach it...

-bret

Reply With Quote
  #3  
Old September 13th, 2003, 07:42 PM
ssjgohan4life ssjgohan4life is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: USA
Posts: 2 ssjgohan4life User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to ssjgohan4life
I have a 17 by 17 dots, and i've put the "board" code in the frame its on, but how do i assign the buttons?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > New Game.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway