Skip navigation
boomsc
Currently Being Moderated

Segmenting Code for ease of reading.

Jun 29, 2012 4:48 AM

Tags: #read #code #to #difficult #segment #actionscrip

Hey, (Awesomely) I'm improving with actionscript, to the point I'm getting working codes, that are long enough to become difficult to read (dyslexia fml)

 

Very simple question. Is there a way to 'segment' my coding, i.e split it into sections that function perfectly normally, but are just easier to distinguish (I.e sperating the custommousecursor coding from the masking codes from the button coding). Or is the only feasable way to just slap a lot of blank lines, 'spaces' between the codes?

 
Replies
  • Currently Being Moderated
    Jun 29, 2012 5:38 AM   in reply to boomsc

    Aside from following some form of standardized code formatting in terms of indenting to make your code more easily readable by anyone, whatever you choose to do to make your own code easier for you to follow/manage is your call.  You can divide things out in any way that makes sense to you and the functionality should not be affected if done properly.  Some things have to precede others.

     

    If you are not familiar with commenting in code, that is one way to help you identify divided up functional sections... making somewhat obvious dividers with identifying headings in them.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 6:59 AM   in reply to boomsc

    The best way would be to separate your code into classes - aka Object Oriented Programming. Besdies being easier to read and manage, classes are also easier to reuse.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points