A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service
This article provides several simple and effective tips, saving time and shortcuts, and other practical information that can improve the efficiency of Flash builder.
Note:The CTRL and ALT keys used in this article are only applicable to Windows. For Mac, the equivalent key of the ctrl key (WIN) is the command key, while the equivalent key of the Alt key (WIN) is the option key.
Note:Added: new or enhanced features in Flash builder 4.5Code Completion shortcut
Content Assistant-The content assistant provides a list of suggestions based on some input code strings.
Press Ctrl + Space keyYou can call the content assistant.
In the mxml document:
Enter "[" in the <FX: Metadata> or <FX: SCRIPT> tag:
In the ActionScript document:
Enter "[" before the class name, variable, Getter, or setter function.
You can select a status from the "show status" pop-up menu.
When multiple states are defined in an application, the mxml Code Editor automatically adds a "display status" pop-up menu, as shown below:
Quick access-Press Ctrl + 3Quick access to views, editors, and Common commands.
Press Ctrl + 3AndPress space keyYou can switch between different editors, views, and perspectives:
PressCTRL + 3AndType goYou can see all the go to commands:
You can also type A sub-string or the first letter of the command to display all the matching items. For example, to debug an application,Press Ctrl + 3AndType Deb. Command can also be used to identify case-sensitive and mixed typing.
The quick access function can store historical records of previously used commands, and recent commands appear at the beginning. For example, if you are debugging an application, the DEBUG command first appears in the history. It helps you quickly execute Common commands.
For more information about these quick assistant options, see quick assistant *.
Flash builder can help you locate undefined methods, variables, or classes in the code, and use the quick assistant to generate the stub code. Use an undefined identifier in the code.
The generated stub code can be used as a placeholder for the code to be implemented later, so that your code will not be incompatible.
For more information, see generate from usage *.
The quick outline view is displayed in a pop-up window in the editor. It is not an independent view. You can use it to quickly navigate and check the code.
In the quick outline view, first type the first few letters of the content to be searched, and then select it to go to the corresponding line in the code.
Pipeline Code Template-The code template allows you to accelerate encoding by automatically inserting common encoding modes. Flash Builder provides more than 100 predefined templates for ActionScript, CSS, and mxml code.
To insert a code template, you only need to type the Template Name in the code editor, and thenPress Ctrl + Space key. For example, to insert a for loop in the code, just type
foriPress Ctrl + Space key.
To display all available code templates according to your code context,Press Ctrl + Space key twice.
To create and edit a code template, go to the "Preferences" dialog box and select "Flash builder"> "Editor"> "code template ".
For more information, see Code Template *.
Place the cursor on the Import Statement,Press Ctrl + 1Select "Import organization ".
The import statements should be listed alphabetically by the package name,Press Ctrl + Shift + O.
Press CTRL + ALT + HYou can open the "call hierarchy" view. You can use this view to find all instances of a project that use a specific method, attribute, or variable.
Double-click an item to open the file containing the item and check the code. You can also click a node to view the call stack trace. You can view the call and call of a method in the flex and ActionScript projects.
To fix the indentation of a piece of code without using tabs, you can select this code andPress Ctrl + I.
UseCTRL + FThe shortcut key is used to find and replace the text string in the file currently opened in the (optional) Editor.
You can use the advanced search feature of Flash builder to search for all resources across projects in the workspace. See the followingAdvanced tips and tipsIn SectionSearch codeReference.
You can useCTRL + Shift + cThe shortcut key quickly comment out the code lines in the codes of ActionScript and mxml. This shortcut allows you to switch between adding and deleting comments.
You can add the following types of Annotations:
To add a CDATA block to mxml code (<! [CDATA > ),Press Ctrl + Shift + d.
Flash Builder automatically indent the code line based on your indent preferences (in the "Preferences" dialog box, select "Flash builder"> "Editor", and specify the indent type and size ).
However, if you want to fix any indentation, you can do this without using the tab key to manually indent individual code lines.
You only need to select the code to fix the indentation, and thenPress Ctrl + I.
Option block selection and editing mode
To change multiple instances of a variable or package name, click the flash builder toolbar and select multiple lines of code. All code lines can be modified once.
† Format the mxml document
To format the code by pressing the shortcut key, you can select one or more lines of mxml code, and thenPress Ctrl + Shift + F.
You can use the "Preferences" dialog box to change the default format. In the "Preferences" dialog box, go to "Flash builder"> "mxml code"> "format" to change the order and group of attributes.
Move multiple lines of code
Select multiple lines of code, and then pressALT and up arrow or down arrowYou can quickly move up or down multiple lines of code.
Delete multiple lines of code
Select the lines of code to delete, and thenPress Ctrl + d.
If you only need to delete the last character in a line of code, you can pressCTRL + backspace.
You can configure a conditional breakpoint so that the debugger stops running under any of the following conditions:
To set a condition breakpoint, first pressShift + Ctrl + BSet a breakpoint on a line. Right-click and select "breakpoint properties ". You can specify a condition as multiple expressions separated by commas.
For more information, see set conditional breakpoints *.
Observation Point-You can use the observation point to monitor specific instances of a variable during debugging. When debugging an application, you can set an observation point on a specific instance of the variable and stop the execution when the observed variable value changes.
To set an observation point in the debugging session, first pressShift + Ctrl + BSet a breakpoint on a line. When debugging stops at the breakpoint, go to the "variables" view, open the context menu of the variable, and select "Switch observation point ".
For more information, see use observation points *.
Expression-You can drag multiple lines of code from the editor to the expressions view to quickly monitor the code expressions.
Run to line-Run the "run to line" command to exit the loop during the debugging session.
During debugging, you may find that the Code executes a repeating loop multiple times. To exit the loop and continue running the next line in the code,Press Ctrl + RYou can use the "run to line" command.
Worker works in both source code and design modes.
You can select the source code mode and design mode for simultaneously opening the file.
Opening/disabling the design mode
If you only need to work in source code mode without designing mode, go to the "window" menu and deselect "enable design mode ". Select "enable design mode" to display the design mode again at any time.
When multiple States are used in an application, you can traverse different states, view only the Code applicable to specific States, and gray all other code.
PressCTRL +/You can quickly cycle to the next state, pressShift + Ctrl +/You can go to the previous status.
Ghost Sets flash Builder as the default editor for the ActionScript and mxml files
Open the "preferred Parameters" dialog box, and select "Flash builder"> "File Association ".
Select the check boxes of the <G id = "1">. As </G> and <G id = "2"> mxml </G> files to set file association.
Go to the "Preferences" dialog box and select "Flash builder"> "Editor ". Select "use another Custom trigger" and type the key you want to use as the trigger for the access code prompt.
Even if you type only one key of the trigger, the code prompt is called. For example, if you specify the trigger key as AB. Both A and B call the content assistant.
You can find references to code identifiers such as getter and setter, interfaces and classes, variables, and functions.
To do this, click the code identifier to search for the reference and select search> reference ".
You can search for references in a file, project, or workspace.
Press Ctrl + Shift + GYou can find all references in the workspace.
Refactoring allows you to rename a code identifier and automatically update all references to the identifier. Flash builder allows you to perform this operation in three simple steps:
For more information, see search for references and refactoring Code *.
Flash Builder automatically generates pre-defined code when you generate event processing functions, getter and setter, or override and implementation methods.
You can customize the predefined code generated by flash Builder by editing the code template, as follows:
For more information, see custom code templates *.
You can select"Source code"> "overwrite/implementation method"Select the method to be overwritten and the method to be implemented.
For more information, see overwrite or implementation method *.
You can specify the file type that the flash builder does not want to copy to the Output Folder during project compilation.
Go to the "Preferences" dialog box and select "Flash builder"> "file exclusion ". You can add new file extensions and names, or delete any existing file extensions and names from the list.
When you start or debug an application, you can change the independent Flash Player.
Go to the "Preferences" dialog box and select "Flash builder"> "debug" to change the executable file location of Flash Player.
To display the asdoc tooltip,Press F2:
To display the asdoc view,Press Ctrl + 3And typeAsdocAnd select "View ":
Flash builder references
Press F1Call a flash builder reference document specific to a dialog box or wizard.
Start building with 50+ products and up to 12 months usage for Elastic Compute Service