***

### Learning ActionScript 3.0

![/ActionScript_icon.png](/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

```actionscript
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

```actionscript
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

```actionscript
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

```actionscript
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

```actionscript
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

```actionscript
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

```actionscript
// 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

```actionscript
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

***

