What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
OK, so I’m trying to push myself to work on the GiTD thing, and I’m testing just to make sure the player’s character moves properly. Lo (and behold), it gives me a “sourceBitmapData must be non-null” error for the copyPixels call. The thing is, I’m embedding the image and assigning it to a bitmapData object _exactly like I did for the last GiTD_ (which worked fine).
I had updated FD before working on this (actually, un- and re-install), but I wouldn’t think that would be the issue…
[Embed(source = "images/horseman.png")] protected static var horsemanGFXClass:Class;
…and in the constructor:
actorMap = (new horsemanGFXClass() as Bitmap).bitmapData;
…and the render call:
renderer.copyPixels(actorMap, actorScrollRect, at);
So I tried changing it to extend the Sprite class and adding the image directly to the screen (commenting out the lines that give the aforementioned error), but nothing appears. If I double-click on the image in the directory list on the right, it opens and shows exactly what it is supposed to show.
Trace `actorMap` immediately after assigning to it. If it’s null, recheck the path you use (I know you’ve checked it already; do it again). Otherwise, search your code for “`actorMap =`” to see if it gets set anywhere else.
Did you generate the embed tag by right-click/generate embed code in the project pane? I ask because your source path looks…unconventional. Try the generate embed code again and make sure the directory matches what you have.
Well, thanks for the suggestions, both of you. It turns out it was something far more stupid: I had typed “Horsem **_e_** n” as the constructor name instead of “Horsem **_a_** n”, like the class name…. I kept wondering why the damned trace statements were showing up everywhere but there. If I had paid closer attention, I might’ve noticed that the function name colour wasn’t light blue…
Sorry about that. I kept screwing with it, trying to figure it out, but I couldn’t seem to make any headway (no wonder)…