|
-
[RESOLVED] Help needed with attaching movie clips
Hi, I am using AS2.0 and I need to attach movie clips dynamically to specific parts of an object. I get all of the information about what to attach and where from an array. I have 20 different people being loaded at the start of my game. Inside of those 20 people, there are about 10 different body parts that i want to load the clothes onto. I need to have names within an array, then have a script read them, and find an object within "clip" with the same name. Here is the script that I have to load clothes onto people:
PHP Code:
function loadClothes(clip,sets){
for (v=0; v<sets.length/4; v++) {
clip.sets[v*4+1].attachMovie(sets[v*4], sets[v*4+3], sets[v*4+2]);
}
}
I have tested all my variables and sets[v*4+1] comes out undefined, everything else is normal. Hope somebody can help.
-
var x:Number = 1; x /= 0;
I think you are using the attachMovie function incorrectly. Look it up in the help files.
-
I am using it right, the part I needed help with was the first part, clip.sets[v*4+1]. I decided to uses a lot of if statements to fix the problem.
Tags for this Thread
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
|