In the set-up for an animated logo that will be set before the game (just like the big boys do it), I'm attempting to arrange instance of an object so that they can "distribute" themselves to their final position after being created.
To try to give a succinct overview of what I have so far...
1. On start of layout, establish values of object instances (see capx).
2. GROUP: Grid Pieces: Place LogoGridPiece instances at a distance to be Lerp-ed back in to a tic-tac-toe arrangement. The center instance will Lerp its opacity to 100 at the same rate the other 8 instances are moved back into place.
3. GROUP: Randomize Trigrid Draw pieces: The instances of the LogoTrigridPiecesDraw object are manually placed on the layout in an ordered manner (covering two layers which will come into play later on when I write in the events), they will eventually form the letters "XDG" (remove the "XDGLettersOutline" layer and you'll see what I mean). I don't want the letters to be obvious initially. So every instance of the object here is randomized - positions swapped all the way through.
4. GROUP: Trigrid Piece Placement: And this is where things get to be problematic. I've assigned every instance of the solid black LogoTrigridPiece object a number from 0 to 5 for one of the six instances of the LogoGridColorFlash object. The PLAN is to move the instances to one of the Flash object (underneath it). Then, each instance from one of the six positions on the board will Lerp to its original spawn location (represented by the HomeX and HomeY instance variables). The problem I am having is getting the instance variables, DisplaceX and DisplaceY to be set to the X and Y values of the Flash instance objects. The Displace variables are the other end of the Lerp distance to be traveled. So what ends up happening is that ALL the LogoTrigridPieces get thrust to the far left side of the window and slowly Lerp together...like cool looking ninja stars, which are fine, but not the goal.
No matter how I try, I cannot get it to select one instance of the LogoTrigridPieces AND the correct Flash instance to store its X and Y coordinates into the DisplaceX/Y instance variables. For each iteration of the For Each event loop, I want to advance the WhichGrid instance variable to select the correct instance of the Flash object. And THAT much works...but the X/Y values never get stored to the Displace instance variables because it won't let me ALSO pick another instance of another object at the same time during the loop. Again, I've tried several different methods.
Thanks for your time and support!