String'n together combos isn't always as fun as doing them in a fighting videogame.
If you write script that has a lot String content mixed with variables, I'm sure you're doing a lot of heavy concatenation.
Building string combos with quotes and apostrophes sprinkled all over a script gets confusing. The way I like to keep this confusion to a minimum is to write my static markup separately. This allows me to make sure it shows up as intended. Then I concatenate my variables in all the places that need to have dynamic content.
Taking static markup or script and wrapping quotes around every line is a chore so I made this Concatenation Tool to help with that.
Currently I've only made this support languages I'm using mostly. If I have to use a new language I'd just add it in. Read the rest of this entry »
I like using MXML because it is quicker than writing ActionScript for a lot tasks.
When you create a TitleWindow in MXML, it is not draggable.
To make a TitleWindow draggable you have to create the window in ActionScript using the PopUpManager methods "createPopUp" or "addPopUp"
I wanted this process simpler so that next time I wanted a draggable window, I could just use a simple MXML tag.
Here I extended the TitleWindow to make it be automatically added with the PopUpManager.
Also all the child components get carried over after PopUpManager is used.
I did this so I could lazily use MXML and all references to this component instance stay intact, because the PopUpManager is using the same instance of the MXML component.
The "Move Left" and "Move Right" buttons show that the references are ok.
These are some functions I wrote for finding and replacing parts of XML using AS3.
Not sure if E4X or "XML.replace()" method can be used to make each function's task better.