[Xerte] Page Templates - Interface Customization
James McCleese
jmccleese at 2wire.com
Fri Sep 11 04:42:03 BST 2009
Thanks for the help everyone -- I was able to get my navigation buttons in my .swf working hand in hand with the rootIcon navigation functions. However, I'm having a problem similar to one another user was having with some dynamic text boxes that I use to display the current page and a total page count. I've done a couple of things to try to debug and ran up against a problem I thought you might help with :)
In my .swf I can use the code:
this._parent._parent.rootIcon.controller.numpg_txt.text = this._parent._parent.rootIcon.pages.length
...in a button which will set the numpg_txt dynamic text box to the total number of pages.
However, in the onInit event, I use the code:
rootIcon.controller.numpg_txt.text = rootIcon.pages.length
...which doesn't work at all. I have established that the onInit script I wrote is firing. I've also used debug() to establish that I have the correct hierarchy, but according to the onInit script, numpg_txt is undefined. Is there a problem with a Xerte script utilizing components in a .swf? I notice that in the default interface there is a current page / total pages count -- is this a .swf/.fla and if so, is the .fla available?
James McCleese
Technical Support Supervisor | Tier One Uverse
2Wire Services & Support
2Wire, Inc. Company Confidential. The information contained in this message may be privileged and/or confidential. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.
________________________________
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Thu 09/10/09 3:58 AM
To: Xerte list
Subject: RE: [Xerte] Page Templates - Interface Customization
> I can definitely try that change to the button, but what concerns me more is when I attempt to pull rootIcon.CurrentPage to a dynamic text box, I get an "undefined" value. Seems like my .swf can't find the "rootIcon"...
It helped me with the swf relationship structure when I started to think of it like a directory tree on a hard drive.
If you have any programming background, you know that C:\ is also referred to as "root".
So if you think of the Xerte engine swf as "root", (rootIcon), loading a swf into it is like creating another directory in C:\ or root.
So now I have C:\my_swf.
To have my_swf talk to anything in root, I have to add a direction to look "up" a folder in the directory tree.
In DOS I would use ../my_swf, the ".." being shorthand for saying "look up a directory from 'my_swf'", or "look in my parent directory".
Same as a loaded swf.
You have to tell the swf to look "up" a directory from where it is (this), to it's parent (this._parent)
So if my_swf loads another swf, it's like creating another directory and another level in the tree:
C:\my_swf\swf_loaded_by_my_swf
Another layer of depth in the tree, so for swf_loaded_by_my_swf to talk to root, look up 2 directories:
this._parent._parent
HTH
Dave
________________________________
With Windows Live, you can organize, edit, and share your photos. Click here. <http://www.windowslive.com/Desktop/PhotoGallery>
More information about the Xerte
mailing list