View Single Post
  #7  
Unread 01-02-2012, 05:12 PM
TalTal TalTal is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 1,095
Default

This is my understanding:

cfc is center of object fixed to center of container.

So if your container is 250 wide and your object is 120 wide and your location is 0,0 you are telling it that you want pixel 60 of your object to stay fixed in relation to the center of the container (container center is 125, Object center is 60, so fixed distance is 125-60, or 65). If you were to resize the container to 300 wide it would move your object from 0,0 to 25,0(container center is now 150, 150-65 = 85, half object size is 60 so to make its center be at 85 the object has to reposition to 25).

To center the object via cfc You would want the object above to have a start location of 65,0. This would put the center of the object at the center of the container. When you resized it would still be at the center.

The way I echo stuff in game is by including a button that updates text via onpress. Or through the interface that gm9 so kindly built into the profit controlcenter.
Something like

Onpress="Parent.Displaytext.Text=Parent.Object.Width"

where Displaytext is a field I have somewhere set up for that purpose.

Silat
Reply With Quote