Ok, I’m getting a weird error on something that should be way too easy. It’s only a few lines of code so I’m hoping I’m just missing something stupid. Hopefully someone else can see the error.
// I'm using the BulkLoader class to import my images. // I'm creating a new Bitmap because I'm reusing the same image lots of times. var Grass31:Bitmap = new Bitmap(BulkLoader.getLoader("main-site").getBitmapData("Grass")); Grass31.rotation = 180; // Adding it to a larger clip so that I can move and manipulate the whole thing. var rd31:MovieClip = new MovieClip(); rd31.addChild(Grass31); RoadClips.addChild(rd31);
When I execute, I get:
ArgumentError: Error #2015: Invalid BitmapData.
Seriously. WTF? I’ve done this a million times. I gotta be missing something small.
Thanks for your help!