I'm creating a game, finished all artwork and now onto code.
Basically I have an object that I attach to the display, well I want to have many of the same object on stage at once, within a parent mc. This will mean I can manipulate all the child mcs via calling on the parent mc. Now what I need is the child mc's to act independently as in they can move in a (set) direction. So the result will be having many falling objects and having a 'hero' movieclip that reacts with all of them (hittest etc).
I thought the most logical way for one movieclip to react with many 'duplicate' movieclips was to have all those movieclips within a parent movieclip so I don't have to rename each child movieclip and instead just check hittest on the parent movieclip.
Here is what I have so far:
var newCircle:awning = new awning();
function Main() {
newCircle.x = 130;
addChild(newCircle);
}
the function "main()" is called every 20 seconds.
newCircle is a variable that contains a movieclip from the library called 'awning'
in an Enter_frame event I have called the newCircle to constantly fall > .y++;
This is a very amateur approach but I am looking for a very efficient way to do this.
ALL help is welcome, Thank's in advance and congratulations if you managed to stay reading this post to the end

New Topic/Question
Reply



MultiQuote


|