Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Whether you are cleaning up your own code or reformatting code in a file you have received from someone else, Flash makes it easy to format your code exactly how you want it. Before you have Flash automatically format your code, however, you need to make sure there are no errors. You can find out that there are no errors in your code by testing a movie. If you don't see any syntax errors in the compiler errors window, you should be okay to autoformat your code.
Code formatting is controlled through the Auto Format settings in Flash preferences. So if you go to Flash preferences or Edit > Preferences on the PC and click the Auto Format category, you can control the settings here. So let's say I unchecked all these boxes, and I get a preview of what my code will look like. Notice the curly braces, they are on the same line as the function name. I click OK, and my code looks the same as it did before, until I clicked the Auto Format button. So we click that button, which looks like an indented paragraph, Flash will format your code based on those settings.
Now personally, I like to have my curly braces on separate lines and have the settings as I had them before. So I am going to change it back, but if you prefer this way, by all means, keep your code like that. So I click OK and to get my code back to how I had it, all I have to do is click the Auto Format button again. And Flash will format the code based on my settings. Again, this works really well if you get code from someone else and you prefer to read code in a different way.
So whenever you want to reformat your code, simply check that there are no errors and then click the Auto Format button and let Flash do all the work for you.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 101622 Viewers
61 Video lessons · 88377 Viewers
71 Video lessons · 72218 Viewers
56 Video lessons · 103969 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.