Skip to content

A repository for showcasing my knowledge of the ActionScript 3.0 programming language, and continuing to learn the language.

License

Notifications You must be signed in to change notification settings

seanpm2001/Learn-ActionScript-3

Repository files navigation


Learning ActionScript 3.0

/ActionScript_icon.png

I know very little about ActionScript 3.0, but I have no way of testing programs either. These are all the pieces of knowledge I know about ActionScript 3.0.

Hello World in ActionScript 3.0

package // Hello world program
{
    import flash.display.Sprite;
    import flash.text.TextField;
    
    public class actionscript extends Sprite
    {
        private var hello:TextField = new TextField();
        
        public function actionscript(){
            hello.text = "Hello, World!";
            addChild(hello);
        }
    }
}

This is just a copied example. It outputs a standard Hello World program. To complete this section, this is the output:

Hello, World!

/!\ This example has not been tested yet, and may not work

Classes in ActionScript 3.0

public function someFunction()
{
	hello.text = "Dysfunctional function";
}
public class Main
{
return someFunction();
}

This is an example of classes in ActionScript. I had to prematurely include a function and a return statement, so the class could do something.

/!\ This example has not been tested yet, and may not work

Functions in ActionScript 3.0

public function someFunction()
{
	hello.text = "Dysfunctional function";
}
return someFunction();

This is an example of classes in ActionScript. I had to prematurely include a return statement, so the function could do something.

/!\ This example has not been tested yet, and may not work

Return in ActionScript 3.0

public function someFunction()
{
	hello.text = "Dysfunctional function";
}
return someFunction();

There wasn't much to add, so this is just a copy of the Functions in ActionScript 3.0 section.

/!\ This example has not been tested yet, and may not work

Objects in ActionScript 3.0

new MyCustomObject(stage);

This is not a complete example, but this is an example of a stage object in ActionScript 3.0.

/!\ This example has not been tested yet, and may not work

Break keyword in ActionScript 3.0

break;

To this day, I am still not entirely sure what the break keyword does, but most languages support it.

/!\ This example has not been tested yet, and may not work

Comments in ActionScript 3.0

// This is a comment
/* This is 
a block
comment */
/* Block comments
* can also
* be written
* like this */

Comments in ActionScript are very traditional, and similar to languages like C, C++, Java, C#, and so on.

/!\ This example has not been tested yet, and may not work

Variables in ActionScript 3.0

var set variable1 = 1
var set stringvar1 = "I don't know if this is valid

I think that you have to set variables with the set keyword. I don't know if variables can hold strings.

/!\ This example has not been tested yet, and may not work

Other ActionScript knowledge

  1. ActionScript was originally developed by Adobe Inc. and is the language used for the Adobe flash platform.

  2. Adobe Flash was discontinued on 2020 December 31st

  3. Adobe Flash had many security vulnerabilities through its lifetime

  4. ActionScript is used to write flash programs and games

  5. Adobe Flash is proprietary

  6. Ruffle-rs is an implementation of Adobe Flash for modern usage, but is open source, and has better maintenance and guidelines

  7. Adobe Flash took off on the early Internet due to its fast speeds of content loading on a time where slow Internet was very common

  8. Adobe Flash started off as FutureWave Splash, later renamed to MacroMedia Flash, then it was bought by Adobe, and became Adobe Flash.

  9. Apple rejected Adobe Flash for its iPhone platform due to battery drain and performance concerns.

  10. HTML5 superceded Adobe Flash and Adobe began recommending it in 2012, 8 years before Adobe Flash was officially discontinued

  11. Adobe Flash has been considered a major security vulnerability almost universally since 2018, and browsers began removing support for it.

  12. Flash broke the web in many ways, as it required a browser extension to view content on most web pages, even if that content shouldn't have been written in Flash

  13. Adobe Animate allows the creation of flash programs, and is still going

  14. Google offered the program Swiffy before 2010 that converted Flash programs to HTML5 applications

  15. ActionScript had 3 major versions, ActionScript 1.0, ActionScript 2.0, and ActionScript 3.0

  16. ActionScript is a curly bracket and semicolon language

  17. ActionScript is very similar to languages like Java and C++ in several ways.

  18. No other knowledge on Adobe Flash and ActionScript