-
[as1,as2] Attaching objects
I need to attach two different movieclips, with different sizes of width and height.
These two movieclips are main movieclips for its child clips. Each main movieclip, has a child clip.
This child clip, on the stage, rotates. With the registration point on center.
The main movieclips whose holds the child clips has top-left registration.
So, what should I do, to put this two differents main movieclips on the stage, with the condition that they can´t collide visually.
While this two movieclips are on the stage, with its child clip rotating, they can´t collide visually.
Thank you.
Last edited by marcelozep; 09-09-2009 at 03:04 PM.
-
Pumpkin Carving 2008
Code:
mc1 = _root.attachMovie("mc1", "mc1", 0);
mc2 = _root.attachMovie("mc2", "mc2", 0);
do {
mc1._x = Stage.width*Math.random();
mc2._x = Stage.width*Math.random();
} while(mc1.hitTest(mc2));
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Senior Member
Originally Posted by ImprisonedPride
Code:
mc1 = _root.attachMovie("mc1", "mc1", 0);
mc2 = _root.attachMovie("mc2", "mc2", 0);
do {
mc1._x = Stage.width*Math.random();
mc2._x = Stage.width*Math.random();
} while(mc1.hitTest(mc2));
perhaps you should comment the code. so they can learn what you did as well...
-
Being the code above, it´s not possible, because
when the movieclips rotate they can collide visually.
Thank you x-death.
Thank you.
Last edited by marcelozep; 09-04-2009 at 05:03 PM.
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
|