ActionScript 3.0: Difference between revisions
Jump to navigation
Jump to search
(Created page with "'''File:Bold text<nowiki> ---- Insert non-formatted text here</nowiki>'''left'''ActionScript 3.0''', also known as AS3, is the p...") |
Whirled vox (talk | contribs) m (Text replacement - ">" to ">") |
||
| Line 1: | Line 1: | ||
'''[[File:Bold text]]<nowiki | '''[[File:Bold text]]<nowiki> | ||
---- | ---- | ||
Insert non-formatted text here</nowiki | Insert non-formatted text here</nowiki>'''[[Image:Icon-Programming.png|left]]'''ActionScript 3.0''', also known as AS3, is the programming language put out by Adobe to create Flash content. You can use AS3 both as standalone, or inside [[Adobe Flash CS3]]. You can learn more about it [http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html here]. | ||
{{clear}} | {{clear}} | ||
Here are some examples of what AS3 looks like | Here are some examples of what AS3 looks like | ||
<actionscript | <actionscript> | ||
protected function handleEnterFrame (... ignored) :void | protected function handleEnterFrame (... ignored) :void | ||
{ | { | ||
var now :Number = getTimer(); | var now :Number = getTimer(); | ||
var elapsed :Number = now - _bounceBase; | var elapsed :Number = now - _bounceBase; | ||
while (elapsed | while (elapsed > BOUNCE_FREQUENCY) { | ||
elapsed -= BOUNCE_FREQUENCY; | elapsed -= BOUNCE_FREQUENCY; | ||
_bounceBase += BOUNCE_FREQUENCY; // give us less math to do next time.. | _bounceBase += BOUNCE_FREQUENCY; // give us less math to do next time.. | ||
| Line 20: | Line 20: | ||
} | } | ||
</actionscript | </actionscript> | ||
Files with just stand alone AS3 will usually be called *.as files before you compile them, while AS3 being used in [[Adobe Flash CS3]] are usually part of the *.fla file. Both of these will compile to *.swf. | Files with just stand alone AS3 will usually be called *.as files before you compile them, while AS3 being used in [[Adobe Flash CS3]] are usually part of the *.fla file. Both of these will compile to *.swf. | ||
Revision as of 20:58, 3 September 2018
File:Bold text<nowiki>
Insert non-formatted text here</nowiki>
ActionScript 3.0, also known as AS3, is the programming language put out by Adobe to create Flash content. You can use AS3 both as standalone, or inside Adobe Flash CS3. You can learn more about it here.
Here are some examples of what AS3 looks like
<actionscript>
protected function handleEnterFrame (... ignored) :void
{
var now :Number = getTimer();
var elapsed :Number = now - _bounceBase;
while (elapsed > BOUNCE_FREQUENCY) {
elapsed -= BOUNCE_FREQUENCY;
_bounceBase += BOUNCE_FREQUENCY; // give us less math to do next time..
}
var val :Number = elapsed * Math.PI / BOUNCE_FREQUENCY;
_image.y = BOUNCE - (Math.sin(val) * BOUNCE);
}
</actionscript>
Files with just stand alone AS3 will usually be called *.as files before you compile them, while AS3 being used in Adobe Flash CS3 are usually part of the *.fla file. Both of these will compile to *.swf.