PDA

View Full Version : Graphic numbers



MikeW
12-04-2013, 03:35 PM
1) Shockwave 3D slideshow v0.9

2) http://www.dynamicdrive.com/dynamicindex14/shockwave/index.htm

3) I am using the cube slider variant and it works perfectly however I would like to have 8 jpg images. The script seems to only want 5 and I've tryed adding a new line

{
src: 'images/a.jpg',
description: 'an image',
}
Which "dissapears" the cube - restored when I delete the line. I have checked and looked for a var/control on image numbers but can't find anything remotly like this.

Appreciate any help.

Thank you.

jscheuer1
12-04-2013, 06:23 PM
{
src: 'images/a.jpg',
description: 'an image', //<-- There should be no comma here
}

There could also be other problems.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

MikeW
12-05-2013, 02:07 PM
John, Thanks quick answer. That does not work and actually every array has a closing , maybe it's set somewhere else. Meantime I put the test site up http://www.artists-showroom.com/ It works as a cube in Firefox as a slide in Safari and Opera and does not work at all in IE 8 despite giving permissions in tools - animations on your site don't work either! I do get a warning
"Message: Expected identifier, string or number
Line: 35
Char: 4
Code: 0
URI: http://www.artists-showroom.com/index.htm
"
But as I am not a Java programer have no idea.

jscheuer1
12-05-2013, 03:17 PM
Different browsers will show different effects depending upon their capabilities. To avoid fatal javascript errors, IE 8 and less require that there be no comma at the end of arrays or objects. Get rid of the red commas:


var imagesDataArray = [ //For demos, define a single set of images to be used in all of the demos below
{
src: 'images/Friends at the gate-72.jpg',

target: '_blank', // default is _self, which opens in the same window (_blank in new window)
description: 'Friends at the farm gate.'
},
{
src: 'images/pl-1.jpg',
description: 'Peter Lee Master Raku Potter.'
},
{
src: 'images/Sunrise ship at anchor-72.jpg',
description: 'Dawn; a ship at anchor in the bay', //<-- There should be no comma here
},
{
src: 'images/Raku-1.jpg',
description: 'A Raku bowl.'
},
{
src: 'images/Passing an anchored ship-72.jpg',
description: 'Passing an anchored ship at Sunset', //<-- There should be no comma here
}
];

It's not essential, but is recommended that a standards invoking DOCTYPE be added at the beginning of the page:


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="robots" content="noindex,nofollow"/>
<title>ARTISTS SHOWROOM</title>
<script type='text/javascript' src='https://ajax.googl . . .

MikeW
12-05-2013, 08:42 PM
John,

Thank you very much. IE now works. It seems that five is the maximum number of images for this program which is OK.

Again, Thank you

jscheuer1
12-05-2013, 10:13 PM
Good. I'm glad it's working for you. But there should be no limit to the number of images. Well virtually no limit. The more images, and more specifically the more bytes of images that are used, the longer it will take to load the page. So try to use optimized images and stay around 20 or less. If you find you can use more, fine.

Back to what you were saying about it being limited to 5. It's not. What makes you think that it is?

MikeW
12-06-2013, 01:46 PM
When I add another image (using the same format) the animation disappears. Remove the extra line and it comes back. Unless there is a different format for adding extra images than
{
src: 'images/a.jpg',
description: 'an image'
}

I assume either they can't be added or that there is some code elsewhere that stops it working.

Incidentally it works best in Opera and OK in other browsers except IE which shows it but in a messy way (Some images cropped etc)

jscheuer1
12-06-2013, 04:35 PM
I think the problem that you're having is either that the image you're adding isn't there, or more likely a syntax error.

For example, when adding the image, you need a comma after the last entry:


var imagesDataArray = [ //For demos, define a single set of images to be used in all of the demos below
{
src: 'images/Friends at the gate-72.jpg',

target: '_blank', // default is _self, which opens in the same window (_blank in new window)
description: 'Friends at the farm gate.'
},
{
src: 'images/pl-1.jpg',
description: 'Peter Lee Master Raku Potter.'
},
{
src: 'images/Sunrise ship at anchor-72.jpg',
description: 'Dawn; a ship at anchor in the bay'
},
{
src: 'images/Raku-1.jpg',
description: 'A Raku bowl.'
},
{
src: 'images/Passing an anchored ship-72.jpg',
description: 'Passing an anchored ship at Sunset'
}, //<-- there needs to be a comma here
{
src: 'images/a.jpg',
description: 'an image'
}
];

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

MikeW
12-06-2013, 05:57 PM
Thank you John,

All clear now. What a difference a comma makes!