[Xerte] Re: download file pdf

Kemp Johnathan johnathan.kemp at ntlworld.com
Fri Dec 30 19:13:14 GMT 2011


Hello Matteo,

Try the following

Create a new desktop xerte project with the icon structure

Learning Object
  Interface
    page
      image (id = myPic url = FileLocation + 'media/myFileName.jpg')
      interaction (perpetual setting is either 1 or 0 depending on whether
you want the execution flow to stop at the interaction)
        HotObject (rs = myPic click = 1)
           Script

The contents of the script are

debug("clicked"); // will display a debug message in preview mode to
confirm click was detected
getURL('http://www.bbc.co.uk','_blank'); // change the first parameter to
match the url of the file you want to open
// getURL will open a window in your browser

Notes on properties

   - You need to set the image icon's id property so that this can be used
   in the HotObject to identify what object it is responding to.
   - The interaction Icon can have a perpetual property of 1 or 0 try both,
   one of the values will stop the project flow at the interaction but I can't
   remember which it is - so play around with this setting.
   - The HotObject icon's rs property must be set to the same value as the
   Image icon's id property. The click property is set to 1 if you want the
   event to trigger on clicking or 0 if you want to trigger the event on mouse
   over.

Hope this solves your problem

Kind regards

Johnathan


On 30 December 2011 11:26, pippo pluto <matis25 at yahoo.com> wrote:

> Hello Johnathan
> I tried your suggestion but does not work.
> Maybe I'm wrong but I do not know where is the error...I'll try again..
>
> Kind regards
> Matteo
>
>   ------------------------------
> *Da:* Kemp Johnathan <johnathan.kemp at ntlworld.com>
> *A:* Xerte discussion list <xerte at lists.nottingham.ac.uk>
> *Inviato:* Giovedì 29 Dicembre 2011 23:40
> *Oggetto:* [Xerte] Re: download file pdf
>
> The ID is used as the unique identifier of an icon, so once you set the
> icon property of an icon you can refer directly to it by using its ID. That
> is except for icons that are normally the children of an interaction icon
> i.e. the sort of icons you see listed when you right click on an
> interaction icon in desktop Xerte e.g. button, hotspot etc. These use the
> rs property to identify themselves and not the id property.
>
> Julian will know the why's and wherefore's of this.
>
> You can read about it in the "interactions overview" section of the Xerte
> help file.
>
> Kind regards
>
> Johnathan
>
> You
>
> On 29 December 2011 19:26, KnowledgeWare <knowledgeware at kccsoft.com>wrote:
>
> Johnathan – question if you don’t mind – what’s the difference between the
> ‘rs’ and ‘id’ properties? What’s the appropriate use of each? Where can I
> learn more about these?
>
> Thanks
> RonM2
>
> *From:* xerte-bounces at lists.nottingham.ac.uk [mailto:
> xerte-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* Thursday, December 29, 2011 3:51 AM
> *To:* pippo pluto; Xerte discussion list
> *Subject:* [Xerte] Re: download file pdf
>
> Hello Matteo,
>
> Sorry I don't have time to test this solution before suggesting it.
>
> Check out the Xerte help files.
>
> I don't think that by default an image icon is sensitive to mouse events
> and thus will not trigger an onRelease event.
>
> However you can add a hotObject icon to an interaction and then add an
> image icon as a child of the hotObject. This will allow mouse events to be
> detected by the image. I am not sure if the event will be triggered by the
> hot object or the image. If it is the hot object icon then you may need to
> use the rs property rather than the id property to identify the hotObject
> icon when specifying what object sends the event.
>
> Kind regards
>
> Johnathan
>
> On 29 December 2011 07:45, pippo pluto <matis25 at yahoo.com> wrote:
> hi
> this is my problem:
>
> I have a small icon (a jpg image, it is called 'logopdf1') I would click
> on and download a simple PDF file (its name is comparative.pdf) :
>
> I did it this way:
> 1) I have an id (logo) associated with image
> 2) I create an interection
> 3) I create an event that I called Event1,  icon : logo , eventname:
> onRelease
> 4) I create a script : into the script I wrote:
> getURL('media/pdf/comparative.pdf', '_blank');
>
> but doesn't work...what code should I write in the script?
>
> thank's
> Matteo Pirola
> University of Ferrara
> Italy
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do not
> use, copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham.
> 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.
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> 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.
>
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> 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.
>
>
>
>
>  This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do not
> use, copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham.
>  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.
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.  Please do not
> use, copy or disclose the information contained in this message or in any
> attachment.  Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham.
>
> 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.
>
>
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> 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/20111230/60f1a804/attachment-0001.html>


More information about the Xerte mailing list