Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Scripting > Other Scripting   »   for actionscript pro.

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Jul 29, 2006, 02:24 AM
cool_dina
New Member
cool_dina is offline
 
Join Date: Jul 2006
Posts: 2
cool_dina See this member's comment history on his/her Profile page.
for actionscript pro.

i despretly need help
i'm trying to make a crossword game in flash and i can't !!!!! because i need the actionscript code so .........

if any body can give me a sample or give me a website that has one i'll be so grateful

thank you

Reply With Quote
 
     

Answers
 
 
Old Aug 1, 2006, 07:47 AM   #2  
LTheobald
Ultra Member
LTheobald is offline
 
LTheobald's Avatar
 
Join Date: Feb 2004
Location: Cambridge, UK
Posts: 1,047
LTheobald See this member's comment history on his/her Profile page.LTheobald See this member's comment history on his/her Profile page.
Call LTheobald via Skype™ Send a message via MSN to LTheobald
General Flash/ActionScript help:

http://www.flashkit.com/
http://www.actionscript.org/


I couldn't find a good crossword tutorial so I will log on tonight and write some thoughts on how I would do it. It won't be the best way but it should help get you started.
  Reply With Quote
 
     
 
 
Old Aug 1, 2006, 01:48 PM   #3  
LTheobald
Ultra Member
LTheobald is offline
 
LTheobald's Avatar
 
Join Date: Feb 2004
Location: Cambridge, UK
Posts: 1,047
LTheobald See this member's comment history on his/her Profile page.LTheobald See this member's comment history on his/her Profile page.
Call LTheobald via Skype™ Send a message via MSN to LTheobald
OK, some ideas on creating a crossword game in Flash/ActionScript:

The Playing Area

First thing to do is to create a square for your puzzle. Create a white square with a black border. Put a text box in this square and set it to be dynamic text. Select this square and text box and convert it to a movie clip symbol (F8). Double click on this symbol to edit it. Create a new frame for the symbol and fill the square in black. So you now should have an embedded movie clip with two frames - a white square and a black square.

Now you want to copy & paste this symbol 99 times (or less depending on your grid size) and put them in a 10 x 10 grid. Each time you paste a new symbol, give it a new instance name relating to it's position in the grid (e.g. x1y1, x1y2 etc.)

From this you should be able to programmatically set if a square is white or black by calling something like:
Code:
x1y7.gotoAndStop(2);
. Try labelling your frames to make this code even easier to read.

Representing the grid
I would represent my crossword puzzle using a 2D array. Something like below:
Code:
var answerGrid = [ ['#', 'H', '#', 'T', 'O'], ['#', 'E', '#', 'H', '#'], ['#', 'L', '#', 'E', '#'], ['#', 'L', 'I', 'F', 'E'], ['#', 'O', '#', 'T', '#'], ];
Something like that - a # representing a black square, a letter representing what should be in that square.

Then it's a case of using the onClick method of the symbol you created earlier to check it's position in the grid, check what the user answered against what's in the square in the answer grid and acting apropriately.


I know all that isn't much help but it would take me a fair while to write a concise tutorial about creating a crossword game.

Lee,
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
Flash ActionScript dragonfly11 Multimedia 2 Jun 18, 2006 07:04 AM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 10:23 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.