Cool stuff that can be made with AS3
~
http://www.sonacom.fr/sonacom.html
http://www.pearljamtengame.com/
~
Some of the Hype about AS3
~
■ A new ActionScript Virtual Machine, called AVM2, that uses a new bytecode instruction set and provides significant performance improvements
■ A more modern compiler code base that adheres much more closely to the ECMAScript (ECMA 262) standard and that performs deeper optimizations than previous versions of the compiler 20 Introduction to ActionScript 3.0
■ An expanded and improved application programming interface (API), with low-level control of objects and a true object-oriented model
■ A core language based on the upcoming ECMAScript (ECMA-262) edition 4 draft language specification
■ An XML API based on the ECMAScript for XML (E4X) specification (ECMA-357 edition 2). E4X is a language extension to ECMAScript that adds XML as a native data type of the language.
■ An event model based on the Document Object Model (DOM) Level 3 Events Specification” ~
What the hell did that mean ????
~
If your like I was when I started learning AS3 with no prior programming experience then the previous paragraph and a lot of the information out there about AS3 probably means absolutely nothing to you. Don’t worry this 1st semester course is going to be about making AS3 as easy as possible for you to learn and give you the foundations from which you will be able to make all sorts of things in flash.
~
Rather than confuse you with a whole bunch more introductory technical talk (that didn’t start to really make sense to me until after about a year of using AS3), we’re going to jump straight in and start making things move and interact.
~
We’re going to use the smallest amount of code possible while keeping it basic which means that not everything we learn at first is going to be considered “Best Practice”. As we get more used to using AS3 I’ll introduce the extra things you should do when writing your AS3. Keep in mind that for most people using AS3 (definitely including me) no matter how long they’ve been programming there is probably a better or more efficient way of writing the code but as long as the finished product does what you want it to then the code is correct… (Author of Essential ActionScript 3 Colin Moock said something along those lines when I saw him present in Sydney last year)
~
~
1. Controlling Timelines with AS3
~
The obvious place to start is using AS3 to control the playback of the Stage and MovieClips.
~
The blue bits are the parts you keep and the green parts need to be changed.
~
stop()
Stops the playhead in the movie clip or main timeline at the Keyframe (F6) the AS3 is written on.
~
Starts playing the SWF file at the specified frame.
~
gotoAndStop(frame number or name)
Brings the playhead to the specified frame of the movie clip and stops it there.
~
~
One of the most important things about learning to program AS3 is learning to use the Help Docs. This can be hard at first because they can seem very hard to understand but it’s worth getting into the habit of using the help docs all the time.
~
To find out the rest of the “methods” (ways in which we can control timelines like: “stop()“) for MovieClips:
1. Type MovieClip into the actions panel. (it should be blue)
2. With the cursor somewhere in side the word hit F1 on the keyboard.
3.This will launch the help docs at the page with all the information about MovieClips.
4.To see other Methods that can be used with MovieClips go down to the “Public Methods” section.
5. The ones listed are Methods specific to MovieClips but there are a whole lot of extra ones that can be used with MovieClips because MovieClips are based on other Objects that have Methods of there own. Don’t worry if that didn’t make sense, just click
Show Inherited Public Methods to see the rest of the things you can get MovieClips to do with AS3.