Java Reference
In-Depth Information
Figure 6-9. Second set of controls fading in
Figure 6-7 presents the controls before the transition starts; there are number of Controls contained
in a rounded rectangle. Figure 6-8 displays the same controls falling as the force of gravity affects each
one. Figure 6-9 shows the second group of controls fading in. The basic strategy is to identify all of the
Controls and link their location to a Phys2D Body . As this Body 's location is updated, the location of the
Control is updated. The code in Listing 6-10 shows how this was implemented.
Listing 6-10. TransitionExampleMain.fx (partial)
public function
var handlers:ControlHandler[];
var inactives:ControlHandler[];
var initHeight = nodeToReplace.boundsInLocal.height;
Search WWH ::

Custom Search