Hey everyone, been a while since I've posted here, hope you're all doing well those who remember me.
Anyways, working on a little project with a bunch of people, and I figured it's about time I finally worked out hitTesting for good. So I've resulted in learning bitMap hitTesting.
With a little research (though it's hard to find answers when you don't know what to look for), we managed to find the help files on how to do bitmap hitTesting, and better yet, how to attach a bitmap movieclip from the library.
However, trying the code used in the Flash Help files (almost copy and paste), it didn't work. Here is the code:
code:
import flash.display.BitmapData;
//
var linkageId:String = "box";
var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);
trace(myBitmapData instanceof BitmapData);
// true
_root.mc_1.attachBitmap(myBitmapData, this.getNextHighestDepth());
So ...
I have the linkage name box taken from the library, and then create the BitmapData object, which loads the movieclip into it. I then attempt to attach that bitmap movieclip into a holder moveclip on the stage dubbed mc_1.
As you can see, when run, the trace should return and display true but that isn't the case, so that is why I'm seeking help here.
Anyone have any ideas? :)
Oh and by the way, if you have any suggestions to do hitTesting that is easier and more efficient then bitmap hitTesting, please enlighten me. :)
Thanks.
Matt.
