We already have a lot of skills under our belt, allowing us to accomplish some pretty exciting stuff. This chapter builds on that experience to create a television set complete with streaming video and visual transitions. Along the way, we'll expand our repertoire to include masking and sound editing.
In Chapter 5, we imported a video into Flash and ended up with an 80 KB .swffile that streamed a 2 MB .flv file. In this chapter, we'll turn a box into a television set, add some buttons to it, and stream three separate videos into a .swf file that is less than 1 KB. To do this, we'll manipulate line art, use a mask to define the area in which video is displayed, add a video object to the Flash document, and use ActionScript to open a streaming connection for the video.
Using ActionScript to stream video is just one of several ways to load external files into the Flash Player and display them. In later chapters, we'll load external images into a Flash movie. We'll also load other movies, text, and even a Cascading Style Sheet (CSS) file to format the text. Using external files helps cut down the time it takes to load and start Flash content, either online or on CD-ROM, improving the experience for the user.
It has been said that humans are story-seeking animals. The cultures, religions, and big ideas of ages past have been transmitted from one generation to another through parables, fables, and legends. I will share several stories with you to illustrate how a professional learning community works in the real world.
The first story occurred at a workshop where I was presenting. During a break, a principal came up to me and asked, “How do you expect me to find the time to do all this professional learning community stuff with all the other demands I have on my job? By the time I finish all the ‘have to’s,’ the things I must do as part of my job, I don’t have time to build a professional learning community.”
I had some sympathy for what he said. The issue he presented is a common one. In essence, he was saying, “I don’t have the time to improve my school when I’m so busy managing it.” I believe that, although the list of “have to’s” may be daunting, a person can always find the time to do the “must do’s.” Moving the professional learning community effort to the “must do” list is the first step in transforming a school.
Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
This chapter introduces basic data types and data structures of Python. Although the Python interpreter itself already brings a rich variety of data structures with it, NumPy and other libraries add to these in a valuable fashion.
The chapter is organized as follows:
The spirit of this chapter is to provide a general introduction to Python specifics when it comes to data types and structures. If you are equipped with a background from another programing language, say C or Matlab, you should be able to easily grasp the differences that Python usage might bring along. The topics introduced here are all important and fundamental for the chapters to come.
Python is a dynamically typed language, which means that the Python interpreter infers the type of an object at runtime. In comparison, compiled languages like C are generally statically typed. In these cases, the type of an object has to be attached to the object before compile time.