tailieunhanh - adobe press ActionScript 3.0 for ADOBE FLASH PROFESSIONAL CS5 Classroom in a Book phần 5
Các biến% theo dõi tỷ lệ phần trăm của các tập tin được yêu cầu đã được tải. Chú ý rằng kiểu dữ liệu của biến% được thiết lập để int. Trước đây, khi bạn đã được lưu trữ một giá trị số trong một biến, bạn đã thiết lập các kiểu dữ liệu số. Lý do rằng int đã được lựa chọn trong trường hợp này là không giống như các kiểu dữ liệu số, có thể trả lại bất kỳ số bao gồm cả. | currentFruit fruitsOnstage j removeChild currentF rui t ce j 1 If you have problems with your code review any error messages in the Output or Compiler Errors panels. Especially keep track of the number and placement of curly braces as this lesson has numerous conditional statements and for loops inside of functions. Go through the steps in the lesson as many times as you need to and remember that you can compare your file to the completed version of the file found at Lessons Lesson07 Complete . If you have succeeded in getting your game to work congratulations Although this is a relatively simple game it contains numerous techniques used to create many types of games and you now have the foundation that will allow you to take on more advanced ActionScript challenges. Some suggestions to try on your own If you have successfully completed this lesson and are comfortable with the materials covered so far you can consider yourself a serious student of ActionScript with some formidable capabilities already in your toolkit. This might be a good time to reward yourself with a break before proceeding. Go for a walk in a beautiful place watch a movie do something fun with people you like get away from the computer for awhile. After that you may want to try a few techniques for review before proceeding to the next lesson Add an item to the List component in the completed file from Lesson 6 Creating Preloaders in ActionScript . Use the list to load your finished file from this lesson into the UILoader component in that file. In this lesson s file create a button that allows the user to replay the game. This will involve creating a function that resets the initial values of the fruitsCollected fruitsLost and fruitsOnstage variables and re-executing the for loop that initially places the fruits onstage. Add graphics in movie clips that are triggered when the user wins or loses the game. Create additional levels of the game that work .
đang nạp các trang xem trước