-
Who needs pants?
Wait then duplicate?
I have a mc that needs to be duplicated 10 times. Now the catch is it needs to be duplicated every 0.5 seconds. I cant get it to work. its realy simple just dunno what ive done wrong. Please help
-
Code:
var counter = 0;
// 500 here is milliseconds = 0.5 seconds
var myInterval = setInterval(dupMC, 500);
function dupMC()
{
counter++;
// DUPLICATION CODE IN HERE
if (couter == 10) {
// stop the function interval when reach 10...
clearInterval(myInterval);
}
}
something like that should do it.
-
Who needs pants?
Thanks for that.It works but theirs one thing wrong with it. I think the if statement doesnt work
if (couter == 10) {
// stop the function interval when reach 10...
clearInterval(myInterval);
}
still duplicates.
And another thing with the dupliceMovieclip is their anyway to make it so that its duplicated onto the level under the previous one duplicated.
-
Didn't work? Really? Worked fine for me. D'oh! I see the problem, i edited the code in flashkit, and misspelt counter! The if statement should read
if (counter == 10) { etc.
Sorry!
You could use (10 - counter) i suppose for the depth of the movieclip, so something like
attachMovie("linkage", "newname"+counter, 10-counter);
That should do it. Just make sure you keep track of which levels they are going on, and that they're not replacing anything. If you wanted them to go on higher levels, use a higher number, like 50-counter.
-
Who needs pants?
LOL cant believe i missed the spelling. Thanks for your help
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
|