A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Help needed with attaching movie clips

  1. #1
    Senior Member
    Join Date
    Dec 2009
    Posts
    109

    resolved [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=0v<sets.length/4v++) {
            
    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.
    Syntax Error

  2. #2
    var x:Number = 1; x /= 0;
    Join Date
    Dec 2004
    Posts
    549
    I think you are using the attachMovie function incorrectly. Look it up in the help files.
    Z¡µµ¥ D££

    Soup In A Box

  3. #3
    Senior Member
    Join Date
    Dec 2009
    Posts
    109
    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.
    Syntax Error

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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center