A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: MovieClips

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Location
    Ags.,Mx
    Posts
    14

    Unhappy MovieClips

    Hi, I need help!!!

    I have many MovieClips (86 hahaha).

    I have an array like this

    var array:Array = new Array(1, 2, 3, 4, 5);

    And I need to do comparisons like this

    if(array[0]==1){
    mc1.visible = true;
    }
    else{
    mc1.visible = false;
    }

    but I need to do the same thing in the 86 movieclips, is there any way to do it in a "for" like this

    for(i=0; i!=4; i++){
    for(j=0; j!=86; j++){
    if(vector[i]==j)
    mc_[j+1].visible = true; //The movie clip from 1 to 86
    else
    mc_[j+1].visible = false; //The movie clip from 1 to 86
    }
    }

    The important thing is that I don't know how to do it...


    HELP PLEASE

    Thanks for helping....

  2. #2
    Senior Member byweb's Avatar
    Join Date
    Apr 2007
    Location
    Andalucia (spain)
    Posts
    267
    Spanish: No entiendo lo que quieres hacer. Por que arrays, y por que 86, si me dijeras lo que quieres o pretendes hacer ?. A lo mejor existe una alternativa más sencilla. No sé lo que quieres hacer.
    English: I do not understand what you do. Why arrays, and Why 86 mcs ? if you tell me what you want or intend to do?. Maybe there is a simpler alternative. I do not know what you do.

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Location
    Ags.,Mx
    Posts
    14
    Hola mira tenemos un array de 4 posiciones, pero depende de las posiciones se mostran diversos movieClips, por ejemplo si mi array tiene 1,4,5,12 debe mostrar mc1, mc4, mc5 y mc12.

    Pero como en el stage hay 86 movieClips, debo ocultar los que no vienene en el array y mostrar los que vienene dentro de el

    Saludos

    es posible o no me explico?

    [english translation]
    Hey look we have an array of 4 positions, but it depends on various movieclips position will be displayed, for example if my array is 1,4,5,12 must show MC1, MC4, MC5 and MC12.

    But as in the stage there are 86 movieclips, I hide vienene not in the array and display it within the vienene

    Greetings

    is possible or not explain?
    Last edited by blanius; 11-26-2009 at 02:23 PM.

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    You can make an array of movie clips.
    Look at this example
    Attached Files Attached Files

  5. #5
    Junior Member
    Join Date
    Jul 2008
    Location
    Ags.,Mx
    Posts
    14
    Thanks blanius that is better!!!

    Thanks for helping

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