![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
For your application to multiply the quantity of parts selected by the price of the part, you need to define a variable for each part in ActionScript. The value for the variable is the cost of the part.
//declare variables and values for car part prices
.
The parallel slashes (//) indicate that the text that follows is a comment. As a best practice, always add comments that offer an explanation of your ActionScript.
Note: As you take this lesson, you might find that you'd like to turn off code hintsthe tooltips that prompt you with the correct ActionScript syntax. If so, you can turn off code hinting by clicking the options menu in the upper right corner of the Actions panel. Select Preferences, and then deselect Code Hints on the ActionScript tab.
var priceCD = 320; var priceShocks = 150; var priceCover = 125;
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |