Tuesday, 18 October 2011

Coding

When it came to coding my work I was a little worried as I wasn't quite sure how to do it, however when I got the files given to me I realised how simple it was to add the images to the code.
The first thing you do is to save a copy of your image into the images part of the code files. After this you open the "pan1" file in TextWrangler, the code opens up and looks like this.






As you can see there is a line of code saying where the image is coming from (highlighted above) to swap this example image for your own you simply delete the text and write in the file name of your image.
After saving that its all ready to be shown. However the code is linked to some Jquery which has a speed set in it. If you decide that you want this to be faster or slower then you can change that easily. To do this you need to open the Jquery in TextWrangler, this is what it will look like.




One you have this you can simply change the speed by changing the number (highlighted above) to get a higher speed you will need to increase the number and to slow it down select a smaller number.
Another thing you can do with the code is to make separate speeds for each of the panoramas. To do this you simply duplicate the Jquery file and rename it something different in this case "two"


When you the open that  code up you can change the speed as before and to link it to your second panorama you will need to open up "pan2" as you did in the first step for "pan1" and change the part (highlighted below) from "jquery.panorama.js" to "jquery.panorama.two.js". Saving this out will change the speed for only that panorama. You can do this over and over again for each panorama, making sure that each is linked and has a different file name.





No comments:

Post a Comment