Alright... as I said it's dirty code made at 1:00 AM with the one and only (failed) intent to make it work... so I could show the model with my iPod Touch...
http://ales.foxleader.net/-REPO-/3D1/AlesFoxJet5XLS_index.html
Note that "Gauche" is the french for "Left" while "Droite" means "Right" π Also, all the code is in that page between the head tags, and my modified code is at the end of the head.
I added this in the body:
<a href="javascript:cs(10)">Gauche</a> <a href="javascript:cs(20)">Droite </a>and this before the end of the <script> tags in the head, modified from the handleRotate(e) function:
function cs(e) { // STEP is how many pixels equals an image swap var STEP = 10; var width = sketchUpObj.offsetWidth; var delta = e addToPos = Math.floor(delta/STEP); //handle wrap around var wrap = (currentPos + addToPos) % imageCount; var newPos = (wrap < 0) ? imageCount + wrap ; Math.abs(wrap); //hide everyone except the image we are over for (var i = 0; i < imageCount; i++) { hide(sketchUpImageArray[i]); } show(sketchUpImageArray[newPos]); // return false; }I repeat, that's dirty code. Really dirty. Lol. I also know that it's JS, so not really Ruby but I guessed it was still the best section to post this.
Thanks for your help!