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
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
@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:
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.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>
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
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.
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:
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.Code:setInterval(function(){xr_spapp((xr_curp+1)%xr_spapn);},3000);
@ 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
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
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
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.
And to hide the navigation panel some CSSCode:<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>
Code:<style>#xr_palrt,#xr_pnava{display:none !important}</style>
Bookmarks