The book explains the most important and fundamental changes in ActionScript drawing comparisons between the two languages both visually and contextually.
Read more Read less. Prime Book Box for Kids. New Riders; 1 edition July 21, Language: Related Video Shorts 0 Upload your video. Share your thoughts with other customers. Write a customer review. There was a problem filtering reviews right now. Please try again later. As an actionscript AS developer making the transition from 2. On a positive note, the book is intelligently organized by topics Event models, scope, timing, text, sound, etc..
The code is listed in color and includes little break out notes and explanations that are quite handy. Also, program output is not included in the book.
- Related Video Shorts (0);
- ?
- .
- .
- ?
- Through The Years: The Quarterbacks Of The San Francisco 49ers (Through The Years: The Quarterbacks Book 16).
An additional problem is that the code in the book is often a bit confusing and lengthy. The confusing parts are often not germane to the subject being demonstrated. The book does do a good job of explaining some of the benefits of using AS3 over the previous version. It also appears to be well proofed. Despite this, the terse commentary and not quite optimal code lead me to believe that this migration guide was assembled hurriedly.
Finally, I recommend going directly to the Actionscript help file on your computer or a good Actionscript 3. When I first started building ActionScript 3 apps, the hardest thing for me to get used to was the changes to the simple commands that I had used for years.
- More Like This!
- Ill Be Watching You: True Stories of Stalkers and Their Victims (Sport).
- The ActionScript 3.0 Migration Guide: Making the Move from ActionScript 2.0.
- by Kris Hadlock | PB | LikeNew.
- The Rebirth of the Middle East.
Where did the attachMovie method go? Where did everything in the MovieClip class move to? It felt like I had to learn to walk again right before a big race. I laughed, I cried, I hit the wall figuratively a few times. In the end, I have to say that it's hard to picture going back to ActionScript 2. On a general level, the great thing about ActionScript 3 is that everything is standardized: If you're new to coding ActionScript, there may be more to learn but it's easier to learn and ultimately a good place to start.
ActionScript Migration Guide, The: Making the Move from ActionScript | Peachpit
The following sections describe fundamental changes to the core language syntax in ActionScript 3. One of the most noticeable changes from prior versions of ActionScript is that you can no longer place code directly on an instance. ActionScript 3 requires that all code be placed on keyframes on a timeline or in ActionScript classes associated with a timeline. That means that you can no longer place code directly on a button or movie clip instance as you might have in the past.
- ActionScript 3.0 Migration Guide, The: Making the Move from ActionScript 2.0.
- ActionScript Migration Guide : Making the Move from ActionScript | eBay.
- Покупки по категориям.
- Product details.
While this change may take some getting used to, in the end it promotes better coding standards and creates projects where the code is easier to follow. As a best practice, you should add an "actions" layer to the top of any timeline's layer stack and add your code to keyframes on this layer.
Description
If possible, try to add your code to frame 1 to make it easier to find. Of course you can place stop actions wherever you need them. If you've work with code in your FLA file before, using an actions layer probably isn't a new concept but be aware that adding code to the timeline is now required. One of the key concepts related to optimization is using the data type syntax whenever you declare variables, functions, or elements in your loops. Doing so allows the Flash compiler to check your code and identify errors at compile-time as well as run faster and more efficiently at runtime.
The following statement shows a variable declared as a String data type: Notice that the variable name is followed by a colon and the name of the data type. ActionScript 3 is a strictly typed language. By declaring the variable as a String, you're basically saying that the variable container can only hold literal string content and that Flash Player should allocate memory accordingly. If you were to try to fill the variable with a number or an array, the compiler would throw an error or you would receive a runtime error in the SWF.
Flash Professional CS5 has improved the Actions panel support for code hints. When you add a colon in your variable declaration the Actions panel will show you a list of options for the data type. Variables as essentially the same in ActionScript 3 as they were in prior versions with the following exceptions: Omitting the var keyword will produce an error.
Omitting the data type will produce a warning or an error depending on the environment in which you're writing the code. Functions are also essentially the same in ActionScript 3 except that the arguments and return type must be data typed in the function declaration: Notice in the sample above that the incoming argument "url" is data typed as a String and, since there is no return data type, the void keyword appears after the parenthesis. In ActionScript 3 the void keyword is spelled with a lowercase v. It's important to note that ActionScript 3 is case-sensitive. There are two significant changes to how events are written in ActionScript 3: In ActionScript 3 you write your event code in a similar manner to the way you did for ActionScript 2 components.
Responding to an event requires that you write an event handler function and that you register with function with the object broadcasting the event using addEventListener.
See the Working with events section of this article for more details. The good news is that the bulk of the core language of ActionScript is still the same. You create arrays, objects, dates, and the range of core language syntax such as loops and conditional statements as you previously had. The following sections describe fundamental changes to how movie clips are perceived in ActionScript 3. In prior versions of ActionScript, the MovieClip object was the center of the universe as it contained all the commands for working with timelines and visual content. Though the MovieClip class worked well for controlling animations, it had some disadvantages in structure, flexibility, and granularity of its application programming interface API.
Migrating from ActionScript 2 to ActionScript 3: Key concepts and changes
You need to know this information as you'll probably spend some time looking through the ActionScript 3 Help documentation to find what commands are available. Here's the list of the classes from which the MovieClip class inherits: Notice that the MovieClip class subclasses the Sprite class. A Sprite is essentially a movie clip without a timeline. It's lighter weight and recommended for creating visual objects that don't need access to timeline control. To find out everything a movie clip can do, review the documentation for each class in the inheritance chain.
Creating nested levels of movie clip instances has been a part of Flash since long before ActionScript was a player in the mix. When ActionScript first evolved it treated movie clips in code the same way it treated movie clips at authortime. In ActionScript 3, this isn't the case. Timelines in ActionScript 3 are perceived through the notion of a display list. The display list has a single stage property and a root property for each SWF loaded into the movie. When movie clips and other visual objects are instantiated in ActionScript they are not explicitly assigned to a timeline.
It's an odd notion if you have experience dynamically creating movie clips, but it has the advantage of being able to instantiate a movie clip and have it remain invisible until you decide to show it in the display list. Furthermore, you can display the new instance in any timeline you like, not just the timeline it was instantiated on. Movie clip instances are display objects when they are instantiated. When a movie clip instance is associated with the display list, the movie clip then becomes active in the display list.
That means two things. First, child instances can be instantiated and configured at any time but they cannot be seen until the parent movie clip is added to the display list. Second, until the movie clip instance is added to the display list, it isn't capable of accessing the stage , parent , or root properties of the display list.
This change in timing creates some new considerations in ActionScript 3. In ActionScript 3, you use the addChild method to see a display object appear on the Stage. Then there follows an AS2 listing with static public variables being used in place of constants and after this a similar listing with constants replacing the variables.
Requirements
The problem here is that while it shows how to best convert an AS2 program into an equivalent AS3 problem it does little to explain what const and static are all about. This means that if you don't really understand static then you are unlikely to make correct and best use of const in the future. The same sort of problem occurs throughout the book. On the other hand if you like real world side-by-side comparisons of how code in AS2 can be converted into AS3 then this might be useful to you.
For me it simply missed the opportunity to tell me the principles and then perhaps provide one or two simple illustrations of the idea. The final problem with this book is that it is very short at around pages and so doesn't really provide value for money.
If you are a complete beginner you might get something out of the very practical presentation of changes in the language but your time would be better spent in getting a better grip on the science and art of programming and AS3 in particular. If you are an expert and looking for a quick summary of changes in the language - this isn't it.