ActionScript 3.0 Cookbook(影印版)
ActionScript 3.0 Cookbook(影印版)
Joey Lott, Darron Schall, Keith Peters
出版时间:2007年07月
页数:556
当你需要使用Adobe Flash或者Adobe Flex软件快速完成一件任务时,《ActionScript 3.0 Cookbook》就应该是你身边触手可及的那本书。本书容纳了300余项深入具体细节的问题解决方案,是你解决ActionScript 3.0相关疑问的一站式答案宝库。
《ActionScript 3.0 Cookbook》提供了快速查询条目(有交叉参考),包括了应对下列挑战的解决方案:展开全部内容介绍
  1. Preface
  2. 1. ActionScript Basics
  3. 1.1 Creating an ActionScript Project
  4. 1.2 Customizing the Properties of an Application
  5. 1.3 Where to Place ActionScript Code
  6. 1.4 How to Trace a Message
  7. 1.5 Handling Events
  8. 1.6 Responding to Mouse and Key Events
  9. 1.7 Using Mathematical Operators
  10. 1.8 Checking Equality or Comparing Values
  11. 1.9 Performing Actions Conditionally
  12. 1.10 Performing Complex Conditional Testing
  13. 1.11 Repeating an Operation Many Times
  14. 1.12 Repeating a Task over Time
  15. 1.13 Creating Reusable Code
  16. 1.14 Generalizing a Method to Enhance Reusability
  17. 1.15 Exiting a Method
  18. 1.16 Obtaining the Result of a Method
  19. 1.17 Handling Errors
  20. 2. Custom Classes
  21. 2.1 Creating a Custom Class
  22. 2.2 Determining Where to Save a Class
  23. 2.3 Creating Properties That Behave As Methods
  24. 2.4 Creating Static Methods and Properties
  25. 2.5 Creating Subclasses
  26. 2.6 Implementing Subclass Versions of Superclass Methods
  27. 2.7 Creating Constants
  28. 2.8 Dispatching Events
  29. 3. Runtime Environment
  30. 3.1 Detecting the Player Version
  31. 3.2 Detecting the Operating System
  32. 3.3 Checking the Player Type
  33. 3.4 Checking the System Language
  34. 3.5 Detecting Display Settings
  35. 3.6 Scaling the Movie
  36. 3.7 Changing the Alignment
  37. 3.8 Hiding the Flash Player’s Menu Items
  38. 3.9 Detecting the Device’s Audio Capabilities
  39. 3.10 Detecting the Device’s Video Capabilities
  40. 3.11 Prompting the User to Change Player Settings
  41. 3.12 Dealing with System Security
  42. 4. Numbers and Math
  43. 4.1 Representing Numbers in Different Bases
  44. 4.2 Converting Between Different Number Systems
  45. 4.3 Rounding Numbers
  46. 4.4 Inserting Leading or Trailing Zeros or Spaces
  47. 4.5 Formatting Numbers for Display Without a Mask
  48. 4.6 Formatting Currency Amounts
  49. 4.7 Generating a Random Number
  50. 4.8 Simulating a Coin Toss
  51. 4.9 Simulating Dice
  52. 4.10 Simulating Playing Cards
  53. 4.11 Generating a Unique Number
  54. 4.12 Converting Angle Measurements
  55. 4.13 Calculating the Distance Between Two Points
  56. 4.14 Determining Points Along a Circle
  57. 4.15 Converting Between Units of Measurement
  58. 5. Arrays
  59. 5.1 Adding Elements to the Start or End of an Array
  60. 5.2 Looping Through an Array
  61. 5.3 Searching for Matching Elements in an Array
  62. 5.4 Removing Elements
  63. 5.5 Inserting Elements in the Middle of an Array
  64. 5.6 Converting a String to an Array
  65. 5.7 Converting an Array to a String
  66. 5.8 Creating a Separate Copy of an Array
  67. 5.9 Storing Complex or Multidimensional Data
  68. 5.10 Sorting or Reversing an Array
  69. 5.11 Implementing a Custom Sort
  70. 5.12 Randomizing the Elements of an Array
  71. 5.13 Getting the Minimum or Maximum Element
  72. 5.14 Comparing Arrays
  73. 5.15 Creating an Associative Array
  74. 5.16 Reading Elements of an Associative Array
  75. 6. Display List
  76. 6.1 Adding an Item to the Display List
  77. 6.2 Removing an Item from the Display List
  78. 6.3 Moving Objects Forward and Backward
  79. 6.4 Creating Custom Visual Classes
  80. 6.5 Creating Simple Buttons
  81. 6.6 Loading External Images at Runtime
  82. 6.7 Loading and Interacting with External Movies
  83. 6.8 Creating Mouse Interactions
  84. 6.9 Dragging and Dropping Objects with the Mouse
  85. 7. Drawing and Masking
  86. 7.1 Setting a Line Style
  87. 7.2 Setting Gradient Line Styles
  88. 7.3 Drawing a Line
  89. 7.4 Drawing a Curve
  90. 7.5 Drawing an Arc
  91. 7.6 Drawing a Rectangle
  92. 7.7 Drawing a Circle
  93. 7.8 Drawing an Ellipse
  94. 7.9 Drawing a Triangle
  95. 7.10 Drawing Regular Polygons
  96. 7.11 Drawing a Star
  97. 7.12 Filling a Shape with a Solid or Translucent Color
  98. 7.13 Filling a Shape with a Gradient
  99. 7.14 Filling a Shape with a Bitmap
  100. 7.15 Scripting Masks
  101. 8. Bitmaps
  102. 8.1 Creating a BitmapData Object
  103. 8.2 Adding a Bitmap to the Display List
  104. 8.3 Drawing a Display Object to a Bitmap
  105. 8.4 Loading an External Image into a Bitmap
  106. 8.5 Manipulating Pixels
  107. 8.6 Creating Rectangular Fills
  108. 8.7 Creating a Flood Fill
  109. 8.8 Copying Pixels
  110. 8.9 Copying Channels
  111. 8.10 Creating Noise
  112. 8.11 Creating Perlin Noise
  113. 8.12 Using Threshold
  114. 8.13 Applying a Filter to a Bitmap
  115. 8.14 Dissolving Between Two Bitmaps
  116. 8.15 Scrolling a Bitmap
  117. 9. Text
  118. 9.1 Creating an Outline Around a Text Field
  119. 9.2 Creating a Background for a Text Field
  120. 9.3 Making a User Input Field
  121. 9.4 Making a Password Input Field
  122. 9.5 Filtering Text Input
  123. 9.6 Setting a Field’s Maximum Length
  124. 9.7 Displaying Text
  125. 9.8 Displaying HTML-Formatted Text
  126. 9.9 Condensing Whitespace
  127. 9.10 Sizing Text Fields to Fit Contents
  128. 9.11 Scrolling Text Programmatically
  129. 9.12 Responding to Scroll Events
  130. 9.13 Formatting Text
  131. 9.14 Formatting User-Input Text
  132. 9.15 Formatting a Portion of Existing Text
  133. 9.16 Setting a Text Field’s Font
  134. 9.17 Embedding Fonts
  135. 9.18 Creating Text That Can Be Rotated
  136. 9.19 Displaying Unicode Text
  137. 9.20 Assigning Focus to a Text Field
  138. 9.21 Selecting Text with ActionScript
  139. 9.22 Setting the Insertion Point in a Text Field
  140. 9.23 Responding When Text Is Selected or Deselected
  141. 9.24 Responding to User Text Entry
  142. 9.25 Adding a Hyperlink to Text
  143. 9.26 Calling ActionScript from Hyperlinks
  144. 9.27 Working with Advanced Text Layout
  145. 9.28 Applying Advanced Anti-Aliasing
  146. 9.29 Replacing Text
  147. 9.30 Retrieving a List of System Fonts
  148. 10. Filters and Transforms
  149. 10.1 Applying Color Changes
  150. 10.2 Applying Color Tints
  151. 10.3 Resetting Color
  152. 10.4 Shearing
  153. 10.5 Applying Basic Filters
  154. 10.6 Applying Advanced Filter Effects (Emboss, etc.)
  155. 10.7 Embossing
  156. 10.8 Detecting Edges
  157. 10.9 Sharpening
  158. 10.10 Making a Digital Negative
  159. 10.11 Applying Grayscale
  160. 10.12 Changing Saturation
  161. 10.13 Changing Brightness
  162. 10.14 Changing Contrast
  163. 11. Programmatic Animation
  164. 11.1 Moving an Object
  165. 11.2 Moving an Object in a Specific Direction
  166. 11.3 Easing
  167. 11.4 Acceleration
  168. 11.5 Springs
  169. 11.6 Using Trigonometry
  170. 11.7 Applying Animation Techniques to Other Properties
  171. 12. Strings
  172. 12.1 Joining Strings
  173. 12.2 Using Quotes and Apostrophes in Strings
  174. 12.3 Inserting Special Whitespace Characters
  175. 12.4 Searching for a Substring
  176. 12.5 Extracting a Substring
  177. 12.6 Parsing a String into Words
  178. 12.7 Removing and Replacing Characters and Words
  179. 12.8 Retrieving One Character at a Time
  180. 12.9 Converting Case
  181. 12.10 Trimming Whitespace
  182. 12.11 Reversing a String by Word or by Character
  183. 12.12 Converting Between Strings and Unicode or ASCII
  184. 13. Regular Expressions
  185. 13.1 Understanding Regular Expression Patterns
  186. 13.2 Testing Regular Expressions
  187. 13.3 Looking for Pattern Matches
  188. 13.4 Removing and Replacing Characters and Words Using Patterns
  189. 13.5 Creating a Nongreedy Pattern
  190. 13.6 Validating User Input with Common Patterns
  191. 14. Dates and Times
  192. 14.1 Finding the Current Date and Time
  193. 14.2 Retrieving the Date Values
  194. 14.3 Retrieving the Day or Month Name
  195. 14.4 Formatting the Date and Time
  196. 14.5 Formatting Seconds or Milliseconds as Minutes and Seconds
  197. 14.6 Converting Between DMYHMSM and Epoch Milliseconds
  198. 14.7 Using Timers
  199. 14.8 Calculating Elapsed Time or Intervals Between Dates
  200. 14.9 Parsing a Date from a String
  201. 15. Programming Sound
  202. 15.1 Creating a Sound Object and Loading a Sound
  203. 15.2 Starting and Stopping a Sound
  204. 15.3 Setting the Buffer for a Sound
  205. 15.4 Offsetting the Start of a Sound
  206. 15.5 Playing a Sound Multiple Times (Looping)
  207. 15.6 Getting the Size of a Sound File
  208. 15.7 Reading the ID3 Tag of a Sound File
  209. 15.8 Find Out When a Sound Finishes Playing
  210. 15.9 Tracking the Progress of a Playing Sound
  211. 15.10 Pausing and Restarting a Sound
  212. 15.11 Reading the Level of a Sound
  213. 15.12 Stopping All Sounds
  214. 15.13 Reading the Sound Spectrum
  215. 15.14 Changing the Volume or Pan of a Sound
  216. 15.15 Creating a Sound Application
  217. 16. Video
  218. 16.1 Loading and Playing Back Video
  219. 16.2 Controlling Video Sound
  220. 16.3 Reading Playback Time
  221. 16.4 Reading Video Duration
  222. 16.5 Controlling Playback Time
  223. 16.6 Scaling Video
  224. 16.7 Managing and Monitoring Buffering and Loading
  225. 16.8 Listening for Cue Points
  226. 16.9 Applying Filters to Video
  227. 16.10 Pausing and Resuming Video
  228. 16.11 Stopping Video
  229. 16.12 Scrubbing Video
  230. 16.13 Clearing the Video Display
  231. 16.14 Determining User Bandwidth
  232. 17. Storing Persistent Data
  233. 17.1 Creating and Opening a Local Shared Object
  234. 17.2 Writing Data to a Shared Object
  235. 17.3 Saving a Local Shared Object
  236. 17.4 Reading Data from a Shared Object
  237. 17.5 Removing Data from a Shared Object
  238. 17.6 Serializing Custom Classes
  239. 17.7 Sharing Data Between Flash Applications
  240. 17.8 Controlling the Size of Local Shared Objects
  241. 18. Communicating with Other Movies
  242. 18.1 Creating Local Connections
  243. 18.2 Sending Data
  244. 18.3 Validating Receipt of Communication over Local Connections
  245. 18.4 Accepting Local Communications from Other Domains
  246. 19. Sending and Loading Data
  247. 19.1 Loading Variables from a Text File
  248. 19.2 Loading Variables from a Server-Side Script
  249. 19.3 Loading a Block of Text (Including HTML and XML)
  250. 19.4 Checking Load Progress
  251. 19.5 Accessing Data Being Downloaded
  252. 19.6 Sending Data to a Server-Side Script
  253. 19.7 Sending Variables and Handling a Returned Result
  254. 20. XML
  255. 20.1 Understanding XML Structure (Reading and Writing XML)
  256. 20.2 Creating an XML Object
  257. 20.3 Adding Elements to an XML Object
  258. 20.4 Adding Text Nodes to an XML Object
  259. 20.5 Adding Attributes to an XML Element
  260. 20.6 Reading Elements in an XML Tree
  261. 20.7 Finding Elements by Name
  262. 20.8 Reading Text Nodes and Their Values
  263. 20.9 Reading an Element’s Attributes
  264. 20.10 Removing Elements, Text Nodes, and Attributes
  265. 20.11 Loading XML
  266. 20.12 Loading XML from Different Domains
  267. 20.13 Sending XML
  268. 20.14 Searching XML
  269. 20.15 Using HTML and Special Characters in XML
  270. 21. Web Services and Flash Remoting
  271. 21.1 Calling Web Services Methods
  272. 21.2 Handling Web Services Responses
  273. 21.3 Handling Web Services Errors
  274. 21.4 Calling Flash Remoting Methods
  275. 21.5 Handling Flash Remoting Responses
  276. 22. Building Integrated Applications
  277. 22.1 Calling JavaScript Functions
  278. 22.2 Calling ActionScript Functions
  279. 22.3 Passing Parameters from HTML
  280. 23. File Management
  281. 23.1 Downloading Files
  282. 23.2 Detecting When a User Selects a File to Upload
  283. 23.3 Monitoring Download Progress
  284. 23.4 Browsing for Files
  285. 23.5 Filtering Files That Display in the Browser Window
  286. 23.6 Detecting When the User Has Selected a File to Upload
  287. 23.7 Uploading Files
  288. 23.8 Monitoring File Upload Progress
  289. 24. Socket Programming
  290. 24.1 Connecting to a Socket Server
  291. 24.2 Sending Data
  292. 24.3 Receiving Data
  293. 24.4 Handshaking with a Socket Server
  294. 24.5 Disconnecting from a Socket Server
  295. 24.6 Handling Socket Errors
  296. Appendix. Unicode Escape Sequences for Latin 1 Characters
  297. Index
购买选项
定价:78.00元
书号:978-7-5641-0776-5
出版社:东南大学出版社