[Xerte] xerte's main window vertical scroll

Marc Torruella Altadill mtorruella at viguera.com
Wed May 6 15:16:22 BST 2009


But there is no way to resize the div once the default interface is loaded,
right? Or did you already got a function to do that on Xerte that we could
have used?.

 

Thanks for the feedback,

Marc.

De: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] En nombre de Julian Tenney
Enviado el: miércoles, 06 de mayo de 2009 14:03
Para: Xerte discussion list
Asunto: RE: [Xerte] xerte's main window vertical scroll

 

That’s very similar to the way the div’s size is changed when you choose a
new size in the default interface. It’s a good way of adding your own
methods to the interface – of course you could add the method to any
MovieClip in the hierarchy. It’s good that as the engine is updated and
released here, your solution won’t break.

 

J

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Marc Torruella
Altadill
Sent: Wednesday, May 06, 2009 12:42 PM
To: 'Xerte discussion list'
Subject: RE: [Xerte] xerte's main window vertical scroll

 

Hi again, we solved this, so i will share with you how did we accomplished
it.

 

 

1)Modify the html that xerte uses to create the SCORM course
(Xerte\publish\html\ rloObject.html)

a.       Add this javascript code:

 

<SCRIPT LANGUAGE="JavaScript">

function newSize(altura) {

               

    var nombre = "plantilla"; //here it is our template’s name

               

               if(document.all && !document.getElementById) {

                               document.all['rlo' +
nombre].style.pixelHeight = altura;

               }else{

                               document.getElementById('rlo' +
nombre).style.height = altura + 'px';

                               

               }

}

</script>

b.      We will call this function in order to modify the xerte’s main
window div’s height

2)      Add an actionscript function in our custom interface’s flash file

function resize(h:Number) {

       getURL("javascript:newSize(" + h + ")");

}

 

3)      Now we are able to add scroll in any of our xerte pages by calling
“interface.clip.resize(whateverHeightYouWant);” 

4)      PLEASE NOTE: This will only work with the scorm compiled course,
because we need to execute it in a browser in order to use javascript

 

Hope this helps someone in the future. This solution it’s been implemented
by my colleague Moisés Artacho.

 

De: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] En nombre de Patrick Lockley
Enviado el: miércoles, 29 de abril de 2009 11:32
Para: Xerte discussion list
Asunto: RE: [Xerte] xerte's main window vertical scroll

 

Please feel free to ask questions

 

I think you have to do it yourself – although 

 

Usage

Set using the properties panel. Optional.

 

Description

Determines whether the textfield has a scrollbar or not. Set the value to 1
to display a scrollbar. Set the value to 'auto' to have a scrollbar appear
as required.

 

Notes

You must set the h property in the proeprties panel to the required height
of the textfield.

 

Says the help file re textfields.

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Marc Torruella
Altadill
Sent: 29 April 2009 10:25
To: 'Xerte discussion list'
Subject: [Xerte] xerte's main window vertical scroll

 

Hi all again,

First of all, i want to be sure is ok that i write down my questions to this
list, I don’t wanna annoy you if it has other purposes.

 

And the question is: is there any parameter I can set on xerte to have an
automatic vertical scroll when a template’s content exceeds the window’s
height size? Or do I have to add a “scroll pane” on the template itself?

 

Thank you very much,

Marc

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


More information about the Xerte mailing list