TAILIEUCHUNG - Foundation Flash CS4 for Designers- P8

Foundation Flash CS4 for Designers- P8: I can remember the day as clear as if it were just yesterday. I was walking by my boss’s office late one winter afternoon at the college where I teach, and he called me into his office. Sitting on his desk was a thin, white box with some sort of weird swirl on it. He slid the box across to me and asked, “You know anything about Flash?” | CHAPTER 4 6. Replace the existing ActionScript altogether with this variation trace loneliestNumber function quickTest void var loneliestNumber int 1 trace loneliestNumber quickTest 7. Test this movie one last time. You ll see an error in the Compiler Errors panel 1120 Access of undefined property loneliestNumber. Close the SWF. This time the variable is declared inside the function. The function s scope can see it but the main timeline s no longer can. Why Outer scopes can t look in the process only moves from inside out. You got an error because when the main timeline looks into its own private world it doesn t see anything named loneliestNumber. There s nothing above it that has that value either so it gives up. You ve seen that scope has the potential to trip you up with variables. Now let s dig deeper into variables. Variables Variables are often described as buckets. It s not a bad analogy. Like buckets variables are containers that temporarily hold things. Like buckets variables come in specific shapes and sizes and these configurations determine what sorts of things and how many of them a given variable can hold. In fact variables are practically the same as properties. A great way of understanding the concept of a variable is to consider a trip to the supermarket. You pay for a bunch of tomatoes a can of soup a box of Twinkies a head of lettuce and a package of paper towels. The clerk puts them in a bag you pay for them pick up the bag and walk out of the store. If someone were to ask you what you carrying the answer would be groceries. The word describes all of the objects you have purchased but it doesn t describe any item in particular and the contents of your bag certainly might change. The word groceries is a suitable placeholder. Essentially variables are properties that aren t associated with a particular class which means you can create a variable in any timeline and access it from that timeline without needing to refer to an object first. The .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.