Page 2 of 3

change photos

Posted: Thu May 29, 2014 11:44 am
by Nureddin Akpinar

hi katya

  1. click to open the image;

    Image

  2. click to open the image;

    Image

  3. click to open the image;

    Image

  4. click to open the image;

    Image

    As in the example.
    I want the picture to change every clicks.

    katya (mobileimage_168) component will change each click photos
    1 click .hasta.png
    2 click izinli.png
    3 click mevcut.png
    4 click yok.png

    Waiting for your help.
    Thank you.


change photos

Posted: Thu May 29, 2014 1:33 pm
by Kateryna Grynko

Hi Nureddin,

Use the following code:prevar array = ["hasta.png", "izinli.png", "mevcut.png", "yok.png"];

var fileId = parseInt(localStorage.getItem("fileId")) || 0 ;

if (fileId === (array.length - 1)){
fileId = 0;
}

Apperyio("mobileimage_33").attr("src", Appery.getImagePath(array[fileId]));/pre


change photos

Posted: Thu May 29, 2014 4:52 pm
by Nureddin Akpinar

Image

Hello katya, thank you for the quick reply

I've added the code.
but the picture has not changed
Can you please check again

thank you


change photos

Posted: Thu May 29, 2014 4:54 pm
by Nureddin Akpinar

Click the picture has not changed, but

Image


change photos

Posted: Thu May 29, 2014 5:08 pm
by Nureddin Akpinar

I added media manager

Image


change photos

Posted: Thu May 29, 2014 5:14 pm
by Nureddin Akpinar

media manager I've added photos

Image


change photos

Posted: Thu May 29, 2014 8:32 pm
by Evgene Karachevtsev

Hello Nureddin,

Please make sure that elements in array (var array = ["hasta.png", "izinli.png", "mevcut.png", "yok.png"];) match the names of files that you've uploaded with Media manager. Also you should somewhere increment value fileId: localStorage.setItem("fileId",fileId+ 1);


change photos

Posted: Fri May 30, 2014 3:06 pm
by Nureddin Akpinar

I did it
Thank you
Thank you app team


change photos

Posted: Sat Jun 07, 2014 1:39 pm
by Nureddin Akpinar

hay

the open the picture in random.
i want to open the picture in order.
what can i do

I'm using the code below:

var array = ["hasta.png", "izinli.png", "mevcut.png", "yok.png"];
var fileId = parseInt(localStorage.getItem("fileId")) || 0 ;
if (fileId === (array.length - 1)){
fileId = 0;
}
Apperyio("mobileimage_33").attr("src", Appery.getImagePath(array[fileId]));
localStorage.setItem("fileId",fileId+ 1);


change photos

Posted: Mon Jun 09, 2014 8:25 am
by Kateryna Grynko

Hi Nureddin,

This code displays images in the order they are in an array.