|
-
Please, Call Me Bob
Right, looks like that function was made with AS3 and I just didn't catch it
Seems completely viable
Let's say you have two movieclips on stage in all their vectory goodness
You can use the draw method just fine, the only problem being that the two images will be drawn relative to their own perspective
This can lead to the bitmap being cropped where it ought not be, or the image not being rotated correctly
This means you'll have to make sure the image is between the 0,0 point and whatever width/height you've applied to your bitmaps, and if you want to rotate the image, best rotate the image inside the movieclip instead of the entire movieclip itself
And since you said stars...
Code:
import flash.display.BitmapData;
import flash.geom.Point;
import flash.display.Bitmap;
hit1.x=mouseX-39;
hit1.y=mouseY-39;
hit1.star.rotation++
var bit1,bit2:BitmapData;
bit1=new BitmapData(100,100,true,0);
bit2=new BitmapData(100,100,true,0);
bit1.draw(hit1);
bit2.draw(hit2);
if(bit1.hitTest(new Point(hit1.x,hit1.y),0x80,bit2,new Point(hit2.x,hit2.y))){
hit1.star.gotoAndStop(2);
}else{
hit1.star.gotoAndStop(1);
}
On the stage are two moveclips called "hit1" and "hit2", and inside them are star moveclips called "star" with 2 frames consisting of being purple and red
I made sure the 100x100 bitmap boxes were big enough to always capture the rotating star
And, yeah... is quick example, I don't know how good of quality that was
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|