Versatile content / media loader: ContentLoader.as

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”