A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Action Script - Spacing Peeve

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    Action Script - Spacing Peeve

    Hey everyone,

    Ok so the other day while working on this game with my brother, I was action scripting some code. I had always wondered if it was possible to space out blocks of code, to make it easier on the eyes.

    I dont know about you guys, but I find it very hard to read and code when all the code is blocked together. I sometimes use // to make spacing lines , but it still just annoys me (odd but true)

    Anyways, while I was coding, I actually made a space in the line. No idea how, but I did. I dont know if it was a bug or if it was actually something I did.


    So my question is, how do you make line spacing in your code. If its not possible , then I suppose my Flash is just messed up

    Sorry about the stupid questions, blame it on my curiousity

  2. #2
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    EH?! Line spacing? Like...?:
    code:
    Line 1;
    //<Space (Double spaced format)
    Line 2;


  3. #3
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Haha,

    No , there wasnt even any comment // to space between two lines. It was a normal space like:

    1
    2

    3
    4

  4. #4
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    Oh. Ha ha ha...

    I try to isolate my lines of code with gaps so I can find stuff easily, usually with a couple presses of enter. I never use the AutoFormat button, so it works fine for me.

  5. #5
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Haha,

    I have a habit of always using the AutoFormat button. I guess I should , but doesnt it auto format your code if and when you test run the program?

    If not , then Ill just break the habit and be happy

  6. #6
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    Nope. You could keep everything aligned to the right without indentation, put eighty spaces in between "x +=" and "2"; and it won't fix a thing.

  7. #7
    Senior Member
    Join Date
    Jan 2006
    Location
    USA
    Posts
    383
    lol, I don't know any programming language that doesn't ignore white space...

  8. #8
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Quote Originally Posted by AfternoonDelite
    lol, I don't know any programming language that doesn't ignore white space...
    whitespace is significant in python


  9. #9
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Well then it makes me wonder how I got it to create a space. Even when I pushed the AutoFormat button, it didnt move everything up.

    My Flash is possessed

  10. #10
    Senior Member
    Join Date
    Jan 2006
    Location
    USA
    Posts
    383
    Quote Originally Posted by catbert303
    whitespace is significant in python

    And I don't know Python.


  11. #11
    Hey Timmy!!! walsher's Avatar
    Join Date
    Jan 2005
    Location
    Latrobe, PA
    Posts
    1,899
    Maybe you could /* I know that if you use this it makes anything under it a comment and you end it with */.

  12. #12
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Haha!

    Walsher, you are a genious. I didnt even think about doing that. Well I thank you since now my little pet peeve has been utterly destroyed.

    I will be using this method when I code, it'll make things so much easier.

    Thanks

  13. #13
    Hey Timmy!!! walsher's Avatar
    Join Date
    Jan 2005
    Location
    Latrobe, PA
    Posts
    1,899
    Cool, I wasn't sure if that would work. It just kinda popped up in my mind when I read your post. I'll also have to remember this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center