Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Trying to understand array references

$
0
0

In composition.ready:

var tileArray = new Array('ads', 'portfolio', logos', 'websites', 'oversize', directMail)

for (var i = 0; i<5; i++){

          grayscaleArray[i] = getSymbol(tileArray[i]).$(tileArray[i]+'TileGS');

}

In plain english this is what I want to do:

I want to click on a grayscale tile (for example grayscaleArray("adsTileGS") and then show the "adsPortfolio" symbol that is living in the library

 

So this is what I have done

 

for (var i = 0; i<grayscaleArray.length; i++){

                    grayscaleArray[i].click (function( ) {

    

     var arrayIndex =  HOW DO I GET THIS?  //need to get the array key value from the grayscaleArray for the tile that was clicked

     var arrayCategory = tileArray[arrayIndex]; //should return "ads"

     createChildSymbol (arrayCategory + "Portfolio", "Stage");  //should show "adsPortfolio" symbol on stage

        

     }


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>