Benutzerinformationen überspringen
Wohnort: Mexico City
Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
Benutzerinformationen überspringen
Wohnort: Mexico City
Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
|
|
Quellcode |
1 |
<action name="verify_file" > set(events[test].onloaderror, showlog();trace('OOPS! NO FILE FOUND!');); addlayer(test); set(layer[test].url, 'skin/test.png'); set(layer[test].onloaded, trace(FILE WAS RELOADED!);); delayedcall(3, set(layer[test].url, 'skin/vtourskin_hotspot.png');); delayedcall(6, set(layer[test].url, 'skin/rotate_device.png');); </action>
|
Benutzerinformationen überspringen
Wohnort: Mexico City
Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
but in your case, you could add a small php on your server to check if the file exists
then on the client side you can do a request like yourserver.com/checkfile.php?name=image.jpg
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
for(set(i,0), i LT maxNumofImg, inc(i),
checkFileExist(calc('path/to/your/folder/img_' + i + '.jpg'));
if(urlExist,
addlayer(...)
,
// if no holes in numeration
warning('no more images');
break();
);
);
|
Benutzerinformationen überspringen
Wohnort: Mexico City
Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
This is the idea Jordi, I've used some similar code for this functionality with your plugin but had some issues aat online implementation, will PM to check those with you. Thank you!
What Luis is trying to do is different, he wants to get an array of files from a specific folder, that could be done with my plugin right now, only if you would follow a specific naming, let's say if you name all your images in those folder img_1.jpg, img_2.jpg, img_n.jpg, then you can easily do a for that check if those images exist
Source code
for(set(i,0), i LT maxNumofImg, inc(i),
checkFileExist(calc('path/to/your/folder/img_' + i + '.jpg'));
if(urlExist,
addlayer(...)
,
// if no holes in numeration
warning('no more images');
break();
);
);
LOL!OMG))) this is my 666th post here))) LOL