[Xerte] Trying to overlay a grid for positioning in Xerte 2.10

Dave Burnett d_b_burnett at hotmail.com
Wed Apr 7 18:17:59 BST 2010


This approach keeps all my global nav buttons on top:

global_entry_frame.swapDepths(999);

Where global_entry_frame is the id of the entry pane attached to the my highest framework.

It should keep all the entry panes children perpetual and on top.


________________________________
> Subject: RE: [Xerte] Trying to overlay a grid for positioning in Xerte 2.10
> Date: Wed, 7 Apr 2010 09:44:16 -0700
> From: Paul.Swanson at harlandfs.com
> To: xerte at lists.nottingham.ac.uk
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> I hate when I figure something out right after posting a
> question. Just had to move the grid graphic to the page where I needed to do
> the positioning. But I was hoping I could have it display on every page so I
> could just “flip the switch” in my Setup script and not have to
> move the code & graphic around when I needed it. If anyone knows how I
> could make this work globally, that would be ideal.
>
>
>
>
>
>
>
>
>
>
>
>
>
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
>
> Sent: Wednesday, April 07, 2010 9:25 AM
>
> To: Xerte discussion list
>
> Subject: [Xerte] Trying to overlay a grid for positioning in Xerte 2.10
>
>
>
>
>
>
>
>
>
>
>
> I’m working on a
> routine to create gridlines to assist in positioning some rectangles that I draw with
> code. I’ve got the gridlines working, but they end up under the framework
> for the individual lessons and I need them on top. Here’s the approach
> I’m using:
>
>
>
> I have a flag variable to
> turn it on and off in my setup script, and the graphic icon I draw it on, and
> the code to draw the gridlines, are
> in the main entry frame of the interface icon.
> This works until I enter another framework, at which point the other framework
> sits on top of my gridlines. I’ve tried using swapDepths with a numeric
> value of 10000, which should be higher than the depth of any other icon, and
> I’ve also tried using the id of the framework in place of the numeric
> value. I’ve even moved the code to
> the page where I draw the rectangle, and used the icon id of the screen shot graphic with swapDepths,
> but it always appears under the framework. Anyone have any idea?
>
>
>
> More details:
>
>
>
> Setup script has:
>
>
>
> gridLines =
> true; // set to false to turn off
>
>
>
> In Interface icon Entry
> Frame I have a graphic icon with an ID of ‘grid’
>
>
>
> Script icon that draw
> gridlines has following
> code:
>
>
>
> if (gridLines) {
>
>
>
>
> // set grid to high depth
>
>
>
>
> grid.swapDepths(10000);
>
>
>
>
> // grid line intervals
>
>
>
>
> gridInterval = 50;
>
>
>
>
> grid.lineStyle(1,0x000000,100);
>
>
>
>
> // vertical grids
>
>
>
>
> for (gridX = 0; gridX <= stageWidth; gridX) {
>
>
>
>
> grid.moveTo(gridX, 0);
>
>
>
>
> grid.lineTo(gridX, stageHeight);
>
>
>
>
> gridX = gridX + gridInterval;
>
>
>
>
> }
>
>
>
>
>
>
>
>
> // horizontal grids
>
>
>
>
> for (gridY = 0; gridY <= stageHeight; gridY) {
>
>
>
>
> grid.moveTo(0, gridY);
>
>
>
>
> grid.lineTo(stageWidth, gridY);
>
>
>
>
> gridY = gridY + gridInterval;
>
>
>
>
> }
>
>
>
> }
>
>
>
> _____________________________
>
>
>
> Paul Swanson
>
> Instructional Designer
>
> Harland Financial Solutions
>
> 800.274.7280 Ext. 2462
>
> Paul.Swanson at harlandfs.com
>
> _____________________________
>
>
>
>
 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1


More information about the Xerte mailing list