Any Actionscripting gurus?

Discussion in 'OT Technology' started by Squally, Mar 26, 2004.

  1. Squally

    Squally New Member

    Joined:
    Sep 24, 2002
    Messages:
    7,293
    Likes Received:
    0
    Location:
    West LA
    ok, so I have buttons that are made dynamically, that is, the number of buttons displayed is decided upon a global variable that is changed when you select a certain button from the main navigation. now my problem is, how do make it so when you click on this sub navigation i made dynamically, have it choose from an array I've made earlier...

    example...

    Code:
    for(y = 0; y < yMax; ++y){
    	for(x = 0; x < xMax; ++x){
    		clip = attachMovie('boxMC', 'box' + x, x);
    		clip._y = yCenter;
    		clip._x = (x -(xMax - 1)/2) * dist + xCenter;
    		clip._xscale = clip._yscale = 50;
    		clip._alpha = 0;
    		clip.onEnterFrame = move;
    	}
    
    }
    that makes my sub nav. eace of the 'boxMC' movie clips have a 'button' button inside them. I though I would just be able to say...

    Code:
    clip.button.onRelease = function(){
                     trace(partsArray[x];
              }
    
    but that only gives me x being the last number (xMax).


    does this make any sense?
     

Share This Page