Welcome to TalkGraphics.com
Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 45
  1. #11
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Default Re: The Ultimate Xara Slideshow

    Quote Originally Posted by Egg Bramhill View Post
    Here's my attempt. Tried it with one animated svg and it works great.
    LINK
    Egg, thank you for including you go, especially with the SVGs.

    With a few tweaks, I can imagine having a slideshow in a slide of a second slideshow as well.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  2. #12
    Join Date
    Mar 2018
    Location
    Morelos, Mexico
    Posts
    236

    Default Re: The Ultimate Xara Slideshow

    Very well done, @Acorn. The first one (jQuery – Messing with Slides) is particularly nice. Like @siran, your knowledge of JS opens up a lot of possibilities. Some of the effects you used are quite cool, by the way.

    I noticed (at least as it comes in to WDP) that you left the Web Image Type to “Let Xara… choose”, rather than forcing PNG (Slide5) as your instructions suggest. Is that because you were confident that it would choose PNG (which it did)?

    I played around a little with the design and found that (at least) to some degree, you can make the slideshow full width. (This requires removing any web animations, as they are apparently not compatible with full width in Xara. The decorative pieces that don’t occupy the full screen also go a bit screwy… so they would have to be adjusted.) That would be a great way of avoiding the Xara Slide Show that requires an external http request. (And sometimes, it is slow to show up on the page).

    (If you have thought about it,) I was wondering as well if using the slide show across variants would require distinct instances, or if it would function using the same layers (obviously, with adjusted elements) and the same script?

    And a last question (thanks for your patience… I try to understand all the aspects of these things): Was there a reason that you chose to put the JavaScript in the head of the placeholder rather than the body?

    Again, congratulations on a great effort.

  3. #13
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Default Re: The Ultimate Xara Slideshow

    Quote Originally Posted by gcellison View Post
    Very well done, @Acorn. The first one (jQuery – Messing with Slides) is particularly nice. Like @siran, your knowledge of JS opens up a lot of possibilities. Some of the effects you used are quite cool, by the way.

    I noticed (at least as it comes in to WDP) that you left the Web Image Type to “Let Xara… choose”, rather than forcing PNG (Slide5) as your instructions suggest. Is that because you were confident that it would choose PNG (which it did)?

    I played around a little with the design and found that (at least) to some degree, you can make the slideshow full width. (This requires removing any web animations, as they are apparently not compatible with full width in Xara. The decorative pieces that don’t occupy the full screen also go a bit screwy… so they would have to be adjusted.) That would be a great way of avoiding the Xara Slide Show that requires an external http request. (And sometimes, it is slow to show up on the page).

    (If you have thought about it,) I was wondering as well if using the slide show across variants would require distinct instances, or if it would function using the same layers (obviously, with adjusted elements) and the same script?

    And a last question (thanks for your patience… I try to understand all the aspects of these things): Was there a reason that you chose to put the JavaScript in the head of the placeholder rather than the body?

    Again, congratulations on a great effort.
    Slide5 PNG omission was probably an oversight! When you have transparencies, you need PNG. If you don't you get unintended consequences that can be entertaining but baffling. My generic answer is experiment.

    I did try full width but thought that keeping it simple to start would be best and then I just had to sit back for feature requests. I will have another look-see.

    The code should be in the Head of the page; I did try it in the Body but saw no difference. Normally i would not use a Widget and place it directly in the Website Head, avoiding a Placeholder. The Placeholder is just an easy way to make it visible and portable.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #14
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Info Re: The Ultimate Xara Slideshow

    Quote Originally Posted by Acorn View Post
    Gary, it ought to be simple enough, never had a look though.
    It would be a case of finding the right trigger code to hook into and showing and hiding DIVs.

    What sort of timing delay is needed between pages?

    Had a quick look and it is going to be far simpler than expected.
    It would be a case of naming the pages index, slide-2, then incrementing thereafter.
    All the code need do is count to the number of ClassNames for $('[class*="xr_page"]') and then iterate round first to last simply setting window.location.href = baseUrl + count; & resetting count back to 0 to get an infinite loop.

    To get an idea create a simple 7 page with /index.htm, /index.htm#xl_xr_page_slide-2, /index.htm#xl_xr_page_slide-3, ... and view in a proper browser so you can simply change the last digit by hand.
    Attachment 126972 - This version has no code included (BEFORE).

    Do note, no code is in this demo, it is there to show the approach.

    Acorn
    @Gary / @siran, it turns out the page turner is one line of code (almost): "<script> setInterval( function() { xr_nextp(); }, 30000); </script>" for a 30-second delay.
    Sadly Xara's Next Page link does not cycle back to the start and so stalls on the last page.

    Here is my work-in-progress:
    Code:
    <script>
    var indexPageHash = "#xl_xr_page_index";
    var currentHashedPage;
    
    
    setInterval( function() {
    	currentHashedPage = window.location.hash;
    	xr_nextp();
    	if ( currentHashedPage == window.location.hash ) { window.location.hash = indexPageHash; }
    }, 3000);
    </script>
    Note I set the interval to 3 seconds in this example as there is no point is twiddling while testing. Change to the number of milliseconds you need.

    My revised test file is:
    Xara - Cubic Vertical Tx Supersite demo.xar with code (AFTER).

    I am wary of it as if you watch the browser address line it shuffles back and forward. It might be just how the browser handles the Xara code but is doesn't act that way in the BEFORE version.

    Other than that it seems bombproof. Do test.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  5. #15
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: The Ultimate Xara Slideshow

    Acorn, I made a self running presentation some time ago. The code to make it cycle was a bit tricky. I will make a test if it still works in V17 and report.

  6. #16
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: The Ultimate Xara Slideshow

    Acorn, just checked your example. I think it shouldn't matter very much the address line behaves strange. Guess it happens because the call to xr_nextp doesn't immediately update the hash value of the address, so your if statement always returns true and you always set it to the starting page. After the animation Xara then corrects the hash value. Should we care?
    If you want to avoid it you could use a different approach. Just use:
    Code:
    setInterval(function(){xr_spapp((xr_curp+1)%xr_spapn);},3000);
    My old cycling presentation also still works in V17 (although I had to fix a little bug). But as mentioned it is a presentation and not a supersite. If you are interested to see it just ask.

  7. #17
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    947

    Default Re: The Ultimate Xara Slideshow

    @ Acorn, I am having a senior moment here! I was trying to create a short animation, nothing clever, and for some reason (which will be my error) I can not make it scroll through all the layers. I think all objects have an animation, they all appear to be named. It works for 3 layers, freezes for a while and returns.

    The thought process is that if you have a simple diagram, you can create a workflow that shows how that diagram builds. I thought the issue might have been using time delays for the animation, but in this case, I've made a mistake somewhere, but just can't see it. I did reduce the time to 5 seconds (I think!)

    Thanks in advance!

    Gary
    Attached Files Attached Files
    • File Type: xar S.xar (14.3 KB, 73 views)

  8. #18
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Default Re: The Ultimate Xara Slideshow

    Quote Originally Posted by Initiostar View Post
    @ Acorn, I am having a senior moment here! I was trying to create a short animation, nothing clever, and for some reason (which will be my error) I can not make it scroll through all the layers. I think all objects have an animation, they all appear to be named. It works for 3 layers, freezes for a while and returns.

    The thought process is that if you have a simple diagram, you can create a workflow that shows how that diagram builds. I thought the issue might have been using time delays for the animation, but in this case, I've made a mistake somewhere, but just can't see it. I did reduce the time to 5 seconds (I think!)

    Thanks in advance!

    Gary
    Gary, !Slide > Pink Rectangle is still Instant.

    There problem still exists so I changed all transitions to Slide in for right just to check and everything works so it has to be one of the transition settings somewhere.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  9. #19
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Default Re: The Ultimate Xara Slideshow

    Quote Originally Posted by siran View Post
    Acorn, just checked your example. I think it shouldn't matter very much the address line behaves strange. Guess it happens because the call to xr_nextp doesn't immediately update the hash value of the address, so your if statement always returns true and you always set it to the starting page. After the animation Xara then corrects the hash value. Should we care?
    If you want to avoid it you could use a different approach. Just use:
    Code:
    setInterval(function(){xr_spapp((xr_curp+1)%xr_spapn);},3000);
    My old cycling presentation also still works in V17 (although I had to fix a little bug). But as mentioned it is a presentation and not a supersite. If you are interested to see it just ask.
    siran, I didn't expect it to harm much as it is all one page's hashes; I initially worried it would affect the History (it doesn't) then I was concerned it was a timing issue or bubbling.

    All I did was lift the function call from a Next Page link and ran with that. You could explain how you tracked down your functions, methods and variables. I'm always willing to learn.

    I was worried that v17.0 has the Presentation controls bug so I tested on v16 and it still worked.

    I too did a recycler for Presentation sites ages ago so seeing your code might inspire me to bring it up to spec.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  10. #20
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: The Ultimate Xara Slideshow

    There is not much to explain. I just had a look what xr_nextp does.
    It reads variable xr_curp adds 1 and checks if the result is lower than variable xr_spapn. If so it then calls function xr_spapp passing the result.
    That very much looks like variable xr_spapn holds the number of pages of the supersite and xr_curp is the current page and counting seems to start from 0. Function xr_spapp just seems to go directly to a given page.
    That's it. Take the current page (xr_curp) add 1, set to 0 if max (xr_spapn) is reached (that is what the modulo operator % does) and pass that to xr_spapp.

    As mentioned the presentation code is a little more complex. The problem is, that Xara remembers which step was active for each page. I'll just paste the code and if you like we can discuss on it later.
    Code:
    <script>
    setInterval(function(){
     if(typeof this.d==="undefined"){
      this.d=[[60,10],[50,15],[40,20],[30,25],[20,30]];
      this.c=this.d[0][0];
     }
     if (this.c>0) this.c--; else {
      var p=xr_curp, s=xr_spappsls(p).indexOf("0");
      if (s<0) { s=0; if (++p>=xr_spapn) p=0; } else s++;
      this.c=this.d[p%this.d.length][Math.min(s,this.d[p%this.d.length].length-1)];
      if (s) xr_donext(); else xr_spapps(p,0,xr_spappsls(p).replace(/1/g,"0"));
     }
    },100);// poll ten times per second
    </script>
    And to hide the navigation panel some CSS
    Code:
    <style>#xr_palrt,#xr_pnava{display:none !important}</style>

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •