[Xerte] RE: Xerte interface customisation documentation?

Tenney Julian Julian.Tenney at nottingham.ac.uk
Thu Apr 17 09:17:52 BST 2008


[in response to a recent mail, posted here for the knowledge base]
 
I just tested the frameworkTemplate.fla. It works fine. Here's what you
need to do:
 
On the interface icon, set visuals to 0, which turns off the default
interface;
Add the custom property 'swf' to the interface icon. Use this to set the
path to the custom swf file, i.e. FileLocation + 'ui/custom.swf';
 
Tada! This also works for frameworks (the Interface class is just a
subclass of Framework with the additional UI stuff). So you might
develop a main framework interface for top level navigation, and a fw
navigator for nested pages).
 
What's happening? Each icon on the flowline becomes a movieclip in the
Flash Player. The custom.swf file is loaded as a child of that
movieclip, thus you can call _parent.nextPage(), etc. You can make use
of debug() in the loaded swf code to check things out. You can also call
methods within the loaded swf from Xerte code
(iconID.controller.methodName()), perhaps to update the graphics in the
swf based on, say, suspend_data from the SCORM. 
 
Custom buttons work the same way - refer to the templates/buttons folder
and load them onto interaction icon button responses using the swf
property - by the way there are a load of custom buttons using the Flex
graphics in the flexStyleControls folder for you to use. I use those a
lot. You can also just load swfs as graphics in graphic icons and handle
events such as onRelease / onPress / onRollOver / onRollOut using the
interaction icon and event responses, but buttons allow you to more
easily check / disable the button.
 
My preference has been to create custom interfaces by loading up a
background graphic in the interface's entry frame, and using custom
buttons for the interactivity, because my own preference is to keep the
code on the Xerte side, and minimise the code in swfs I load for any UI
/ navigation stuff. I may still load up swfs with a lot of code in them,
but they are usually for bespoke interactions, or including things that
I can't easily build in Xerte, but can more easily be accomplished in
Flash (such as using components), and they are very much black box style
standalone swfs with an init() method I call from Xerte to kick them
off. 
 
You can save the final entry frame as a model (myUI.rlm) and include it
in other projects using the model property on the entry frame icon (i.e.
set it to FileLocation + 'myUI.rlm').


________________________________

	From: Paul Beckwith, AC&S Ltd
[mailto:paul.beckwith at acns-group.com] 
	Sent: 16 April 2008 16:56
	To: 'Tenney Julian'
	Subject: RE: [Xerte] RE: Xerte interface customisation
documentation?
	
	

	This worked fine however we want to keep the scripting on the
flash side as much as possible. 

	 

	We have tried to run the framework template found in the Xerte
directory thinking that this would navigate our pages but no joy?  Is
there something we are missing?

	 

	Paul

	 

	
________________________________


	From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Tenney Julian
	Sent: 16 April 2008 15:13
	To: Xerte discussion list
	Subject: RE: [Xerte] RE: Xerte interface customisation
documentation?

	 

	Load up your swf, and then use Xerte's events to respond to
onRelease for the icon. Give the graphic icon an id, then create an
interaction to handle that icon's onRelease event.

	 

	Try to keep you code on one side or the other, otherwise it'll
get really messy.

	 

	J

	 

	 

		 

		
________________________________


		From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul
Beckwith, AC&S Ltd
		Sent: 16 April 2008 14:26
		To: xerte at lists.nottingham.ac.uk
		Subject: [Xerte] RE: Xerte interface customisation
documentation?

		Julian,

		 

		Am just working on this, have created a template with
one single button which will be my next button. 

		 

		The actionscript for the button is as follows:

		 

		on (rollOver) {

		            useHandCursor;

		}

		on (press, release, keyPress "<Enter>") {

		            _parent.nextPage();

		            

		}

		 

		 

		It compiles and runs in Xerte fine, the hand pointer
over the button is ok but no joy when actually clicking on the button to
go to the next page. Any ideas? Also thanks for the new update in Xerte,
much appreciated and will be having a look at it later on.

		 

		Paul

		 

		 

		 

		
________________________________


		From: Tenney Julian
[mailto:Julian.Tenney at nottingham.ac.uk] 
		Sent: 11 April 2008 13:05
		To: Mark Tomlinson, AC&S Ltd
		Subject: RE: Xerte interface customisation
documentation?

		There is a template in the templates folder somewhere.
Basically what you do is create a Flash movie. You load that into Xerte
as a property of the interface icon, and then you call the methods of
the interface icon from code in your swf (i think off the top of my head
through _parent.nextPage() etc). 

		 

		You can also address the engine scope and access any
variables / objects etc created in your Xerte scripts from code in your
interface through _level0.engine.myvar. Thus you could combine the two
together to create, for example, an interface with a glossary button.
Clicking the glossary button accessses varibles created in the Xerte
script itself, and is displayed using your interface.

		 

		It's not as hard as it seems. I think the template is
for a dragable controller.

		 

		You can also create framework interfaces this way.

		 

		Next thing you'll be asking about is custom buttons
[check the templates folder again - you'll find a fla in there with a
button mc in it, with 8 states inside it]

		 

		J

			 

			
________________________________


			From: Mark Tomlinson, AC&S Ltd
[mailto:mark.tomlinson at acns-group.com] 
			Sent: 11 April 2008 12:22
			To: 'Tenney Julian'
			Subject: Xerte interface customisation
documentation?

			Jules

			 

			Is there any documentation we can start to look
at for adding a different interface?

			 

			My 'lad' is getting on OK and I see you are
pointing him in the right direction.

			 

			Cheers

			 

			Mark

			 

Aerospace Consulting & Services Ltd

Engineering, Training, Consultancy <http://www.acns-gmbh.com/> 

 

Mark Tomlinson
Managing Director 

AC&S LTD
35A Victoria Road East
Thornton-Cleveleys
Lancashire
FY5 5BU
UK 

mark.tomlinson at acns-group.com <mailto:mark.tomlinson at acns-group.com> 
www.acns-group.com <http://www.acns-group.com/>  

tel: 
fax: 
mobile: 

+44 1253 855 997
<http://www.plaxo.com/click_to_call?lang=en&src=jj_signature&To=%2B44+12
53+855+997&Email=mark.tomlinson at acns-group.com> 
+44 870 762 6818
+44 789 968 7257
<http://www.plaxo.com/click_to_call?lang=en&src=jj_signature&To=%2B44+78
9+968+7257&Email=mark.tomlinson at acns-group.com>  

 

			 

		 

		This message has been checked for viruses but the
contents of an attachment may still contain software viruses, which
could damage your computer system: you are advised to perform your own
checks. Email communications with the University of Nottingham may be
monitored as permitted by UK legislation. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20080417/87468233/attachment.html


More information about the Xerte mailing list