Flash CS4 All-in-One For Dummies- P12

Flash CS4 All-in-One For Dummies- P12: Welcome to Flash CS4 All-in-One For Dummies. Our goal when writing this book was to share our enthusiasm for Flash and, at the same time, demystify the application. You can do so many things with Flash that it becomes mind boggling. The minibooks in this reference are designed to take the boggle out of your mind and show you how to use Flash to create Web banners, animations, and other delights. We also delve into the topics of ActionScript and Flash video. | Checkin Out the Basics My My Deciare 307 Name of variable Must be consistent with type var myVar Type value Indicates a variable Data type Figure 3-1 Declaring a variable and assigning a value. var bestFriend String var crowdSize int var averageWeight Number var favColor uint All of the above variables have fairly general types A string is any kind of expression enclosed in quotation marks string . Usually a string is used where the variable stores a description or label. For example the address 123 Elm Street is a string even though it contains numbers. LU The numbers in an address or a phone number are really identifiers and cannot perform like numbers. If you add two addresses you ll find that you do not get the sum of the two When working with strings be careful if you copy and paste a program from a word processor or PDF file. Sometimes smart quotes are used. Smart quotes are either opening or closing quotes and are not recognized by ActionScript. You need the straight quotes that are identical for opening and closing a string. Numbers even simple ones are a little trickier. Three different numeric types are used int integer uint unsigned integer and Number real number. An integer is any whole number be it positive or negative. If your integers are all positive use unsigned integers. Finally real Book V numbers are floating point numbers that can have fractions. They re Chapter- 3 called real because they can have fractions and floating point because the decimal point can change places float . Unreal numbers are what . . you put on your expense account 3 5 A We will be using type differently than usual. Expressions such as typing a variable or an object has been typed as a Button aren t talking about someone g pounding away on a keyboard rather typed refers to what type a variable or object has been declared. 3 O 3 CD 308 Checkin Out the Basics My My 1 Declare Typing on the Stage So far in this minibook you ve created instances of Buttons and MovieClips on the

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.