PDA

View Full Version : save me 10mins with attachMovie


doomlord
01-10-2007, 10:09 PM
I don't want to sound demanding like "gimme this, shove that up that" but answering this saves me 10minutes of trying to remember. Lets say i want to duplicateMovieClip a and with this example i just want it at point b, and when it attaches i want it to constantly move at the same speed but its random as in starts at say speed 6 and it constantly moves that speed til its off the stage and when that happens i can easily use removeMovieClip. And then (i'm pretty sure i can do this) when say c comes onto the stage they all head to that spot (as in with my thing they try to kill it) then i can easily have them head down and get on there merry ways.
I can understand all these things seperate however put together i'm hopeless.
I can do ALL of this seperate is the point and would wonder if anyone wanted to help me put it all together, also jsut ask if you want proof i can do it seperate. I just want to do this so i can put together a 5ish-in-one tut for beginners on this "site" with a forum, also i will mention your name on what you help me with but all the rest that i did i will say i did it and won't say otherwise. ANY help is appreciated and if you don't help oh well have a nice day :) and try not to make it too complicated because if it is most likely i won't use it, also i'm doing this because i'm bored.

Insane Knux
01-10-2007, 11:12 PM
I'm not completely sure what you're asking but, sounds like you're trying to duplicate or attach a clip to a certain point that's a variable?
If so, here:
Attach Movie version

pointA = 300
pointB = 100
attachMovie(mc, instancemc, 1);
instancemc._y = pointA;
instancemc._x = pointB;

Duplicate way, put the mc on the stage and on the frame put:

pointA = 300
pointB = 100
duplicateMovieClip("mc", "instancemc", 1);
instancemc._y = pointA
instancemc._x = pointB

Not sure of syntax, flash isn't open.

doomlord
01-11-2007, 12:53 AM
thanks but ill try to make it simpler here:
My mc spawns at an exact y (mines like 0 or something) and (this part i can do) when the enemy comes they all flock it like bees, but i need help with just attaching lets say about 2 per second on the sides, ahh i cant be stuffed editting but ill make it simpler.
Guys spawn from the bottom left and right of my stage constantly and they move at a random speed which is the speed they started at from the beginning, like with matts snowflake generator they all move at a constant speed (i think) but its random. My goal for this is just a little thing you can just keep watching and every time its different like if i got bored i could just watch it for a while