position a duplicate movieclip

  • 14 years ago

    can someone help me how to position a duplicate movie clip i'm having trouble with computation here's the code....

    the problem is that i can't position the movie clip myLetter with a certain condition the first for loop works fine but when it comes to the second loop the  position is kind of a mess

    by the way the second loop means an enter or the second line...

    it should  looks like this if the condition is met

    _ _ _ _ _ _ _

    _ _ _ _ 

     

    for (var j = 0; (j<guesslen && s!=">"); j++)
    {
     s = guessword.charAt(j);
     var theLine = myLetter.duplicateMovieClip("myLetter"+theclip, theclip+1);
     theLine._x = xpos+((wclip+hspace)*j);
     trace(theLine._x)
     theLine._y = ypos;
     theclip++;
     theLine.letter = "M";
     if (s==">"){
     theLine._visible = false
     }
    }
    //----------------------------
    trace(j)
    for (var j = j; j<guesslen; j++)
    {
     s = guessword.charAt(j);
     hx = 1;
     trace(s)
     var theLine = myLetter.duplicateMovieClip("myLetter"+theclip, theclip+1);
     theLine._x = 3*2
     trace(theLine._x )
     theLine._y = 260
     theclip++;
     theLine.letter = "M";// just a textfield
     hx++
    }


























    by the way its for hangman game .... :D

    thnx .. i'm really new at this....

  • 14 years ago

    Dear AngelDust

    MakeAsteroid() function and add the following code beneath the lines that position the duplicate movie clip:
         asteroidArray[num_clips] = _root["asteroid_mc" + num_clips];
    For more information click

    here

    Regards
    DoctorMahdi

  • 14 years ago

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“We better hurry up and start coding, there are going to be a lot of bugs to fix.”