TAILIEUCHUNG - Học Actionscript 3.0 - p 4

Procedural Versus Object-Oriented Programming Procedural Versus Object-Oriented Programming Much discussion has been made over the pros and cons of procedural and object-oriented programming, and many who are new to ActionScript have been led to believe that using OOP is the only way to program in ActionScript . This is not the case. Object-oriented programming is very powerful, and you’ll probably want to use it when you’re more comfortable with the language. However, it’s just one possible way to write ActionScript. We’ll introduce OOP slowly throughout the book, and we’ll try to encourage you to learn OOP by presenting some exercises that. | Procedural Versus Object-Oriented Programming Procedural Versus Object-Oriented Programming Much discussion has been made over the pros and cons of procedural and object-oriented programming and many who are new to ActionScript have been led to believe that using OOP is the only way to program in ActionScript . This is not the case. Object-oriented programming is very powerful and you ll probably want to use it when you re more comfortable with the language. However it s just one possible way to write ActionScript. We ll introduce OOP slowly throughout the book and we ll try to encourage you to learn OOP by presenting some exercises that use its methodologies. We d like to reassure you however that OOP isn t required to program the Flash Platform or to use this book. To put this into an ActionScript perspective consider a little background on the language s evolution. ActionScript started as a sequential programming language meaning that scripting was limited to a linear sequence of instructions telling Flash what to do in a step-by-step manner. This approach to scripting was not very flexible and did not promote reuse. As the language evolved it became a procedural programming language. Like sequential programming procedural programming relied on a step-by-step set of instructions but introduced a more structured modular approach to scripting. Procedures otherwise known as functions or sometimes subroutines could be executed again and again as needed from different parts of a project without copying and pasting copies of the code into the ongoing sequence of instructions. This modularity promoted reuse and made the code easier to edit and more efficient. Scripters in search of an even greater degree of modularity and reuse gravitated toward object-oriented programming. OOP languages create programs that are a collection of objects. Objects are individual instances of classes collections of code that are self-contained and do not materially alter or disrupt

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.