Jump to content

Shortest Code Possible For Naming

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Shortest Code Possible For Naming Rate Topic: **--- 1 Votes

#1 User is offline   EncoderDecoder 

  • W.R. Sergeant
  • Group: Members
  • Posts: 260
  • Joined: 01-March 11
  • Gender:Female
  • Location:Philippines

Posted 21 May 2011 - 11:27 AM

I have a problem and I hope that someone could give me the right solution.. I am currently making a flashgame that resembles Project Hangman.. You know, that game where you have to guess the word by correctly choosing the letters in that word..

I have already made a button and produced 26 instance of it, each representing 1 letter.. i named the buttons btn_1, btn_2, btn_3, ..., btn_26. The specification is that everytime a letter is chose, the corresponding button should be disabled. Then, when a new word is to be guessed, the buttons will be enabled again. Now my problem is this: how can I optimize my action script so that i don't have to manually type in the code to enable the buttons? That's like coding 26 lines of codes, right?

So how can I optimize this?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users