ActionScript 3 introduced new ways to load content and new types of content – now Flash can handle raw bytedata. This also increased the complexity of the process. You need a Loader, URLLoader, URLRequest, event listeners…
ContentLoader is a class that simplifies the process into a one class that can fulfill most of the basic needs:
– send and load data
– load bytedata
– load variables
– hande errors
– load images, mp3s, xml, text (JSON too, of course, but parsing is not supported)
Example: Jatka lukemista ”Versatile content / media loader: ContentLoader.as”
Here’s another helper class that loads one or multiple file(s) separately or all in a batch. There is one special feature: this class can check the filesize of each file (without fully loading them) and therefore it can show the loading progress of the whole batch not just single file. The loaded data is stored so the file or its size is never loaded twice.
This class uses my ContentLoader as the actual file loader. Read more about the ContentLoader »
Example: Jatka lukemista ”Loading and handling external files in Flash: ExternalAssets.as”
One of the best Flash production houses in Helsinki/Finland made a quite surprising comment while making a project with us: their own Flash video player can’t handle live streams. That functionality is very easily added and I’ve used my VideoLoader class (now version 4.X) in various video projects over the years.
Maybe someone else is missing a versatile video loader too, so here’s one. And I say Loader, because this class loads, plays, pauses, buffers, sends events, handles errors and does everything you need for handling video files, but it does not have any UI. But that’s what extends VideoLoader is for! Jatka lukemista ”The ultimate VideoLoader with rtmp support”