2nd February 2012, 10:47 AM
Automated Home Lurker
<posX>, <posY> incorrect relative to grid cells
I am trying to greate a grid of textboxes. There are 2 textboxes in ecah grid cell - first one occupies the upper part of the cell, second occupies the pottom part.
I am specifying tb locations relative to the cell origin.
For the upper tb
for the lower tb
I would expect that no matter gridX and gridY are the texboxed would have the same alignment relatively to the cell boundaries.
Unfortunately when I specify gridX and gridY other than 0,0 the texboxes drif in x or y direction. The higher the values of gridX, gridY the more is the drift.
I am attaching xapconfig.xml that demonstrates this behavior. Any help highly appreciated
2nd February 2012, 10:22 PM
I think I would have expected the same ;-)
A solution would be to use absolute x, y positioning of the textboxes - not ideal but should work
3rd February 2012, 09:47 AM
Automated Home Lurker
Kevin, thanks for your reply. From my (still embryonic) knowledge of flash I can see that you are using ScreenWidth variable that is set to constant value of 800 (which is fine for Joggler). Then you use this value to calculate buttonGutterWidth. The same applies to ScreenHeight/buttonGutterHeight.
is it possible to calculate ScreenWidth/ScreenHeight based on the value of <usejogglerapi> tag? If this tag is true then screen width/height are fixed to 800x420 for joggler. Otherwise initialize ScreenWidth/ScreenHeight with Stage.width/Stage.height to get the real size of the browser window plus add some onResize listener to update ScreenWidth/ScreenHeight accordingly when the window is resized.
Thanks in advance
3rd February 2012, 01:38 PM
Bear in mind this is essentialy a Joggler application that happens to run in a browser / other Flash capable devices too.
Supporting different sizes is something that I had intended to do but never implemented. Beta 6 (unreleased) had some provisional work in this area. Part of the issue on the Joggler is that there isn't a stage with dimensions in the same way that there is in standard Flash but using <usejogglerapi> to alter behaviour would be a possibility.
Resizing as the browser window changes - i.e. I assume you mean the whole interface scaling to retain the same number of horizontal and vertical grid positions / buttons is something that would be quite compute intensive but do-able. OTOH there are as many people who would want the other combinations with more grid positions available or the displayed screen remaining fixed in size as the browser is resized.