Is there anyway to group ojects with AS
like
var Hat:MovieClip = attachMovie("Hat","MyHat",1)
var Head:MovieClip = attachMovie("Head","myHead",2)
//place head in middle of screen
Head._x = 300
Head._y = 300
//place hat on head
Hat._x = Head._x - 15
Hat._y = Head._y - 30
//this is what i need help with
createGoup("myHead","MyHat") // forms a group of the two objects
now when i do
_root.myHead._rotation = 45
would it rotate myHat so that its always on myHead?
Wy not put the Hat and Head movieclips into a movieclip. Then any transformation done to that movieclip would apply to both movieclips inside.
/Mirandir
cause I need the hat to fly off the head towards the mouse and do hitTests
when you click a mouse(it would ungroup and move towards mouse)
ok so its more of a bullet than a hat
the head has its own set of hitTests and they are two different objects that just need to move like one object…using only AS
[edit] the only movement involved is rotation