Question: I want the ability to animate a scene where I can draw boxes, circles, text, and other things like images, and be able to record it. I figure I will need my own recording software, but that is separate from this post.

Because my needs are very simple, the tool I use should be free.

Since some of the things will be computer science and math related, originally I was looking at 3Blue1Brown's videos, but the application used for those videos is a bit overkill for what I need.

Answer: 
Expanding on Alejandro's comment you could try [p5js](https://p5js.org/get-started/).

> 
> p5.js is a JavaScript library for creative coding, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else!
> 
> 
> 

[Here is an implementation of snake](https://editor.p5js.org/p5/sketches/Interaction:_snake) in their online editor. (Use i,j,k,l to control the snake).

[The Coding Train](https://www.youtube.com/watch?v=HerCR8bw_GE&list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA) on YouTube has lots of video tutorials on p5js (and processing, what p5js is based on (I think!))
The excellent OpenFL library <https://www.openfl.org/> uses many of the same APIs as Actionscript 3.0; even the Haxe programming language used in OpenFL is quite similar in syntax/grammar to Actionscript 3.0. OpenFL is made with portability in mind, so native and HTML5 build targets are available out of the box.