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: 
[Godot Engine](https://godotengine.org/) is an open-source game engine and IDE that can produce games that run on multiple platforms, including the web. For the latter, it produces a WASM (WebAssembly) package that you can integrate with a few lines of HTML/JS into any web page.

Here's an example of a 2D game written in Godot, playable in the browser: [Wurst Day Ever](https://blinry.org/wurst-day-ever/).
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.