how can I identify wight value of the previous layer?

  • I'm creating a layer type="container" with images inside, and the width varies according to viewing (landscape or portrait).

    How do I assign a variable value to "Y"?

    It would be possible to calculate the width size of the previous image and add the next image layer after 10px?


    For each image appears below the previous image

    Thank you for your help

  • Hi,

    that would be only possible via dynamic script/action code - e.g. the resulting pixel size can be get via the pixelwidth / pixelheight attributes and then used to calculate the resulting x / y positions.

    E.g. the 'skin_addthumbs' <action> from the vtourskin.xml does something like this - it loops though a set of thumb images (from the <scene> element) and adds and calculates the x position of each thumb.

    Best regards,
    Klaus

  • Try like this:

    You should get something like this at the end:
    Regards
    Umalo

  • Try like this:

    You should get something like this at the end:
    Regards
    Umalo


    Thank you for helping me quickly.

    But as I am beginner and I still have doubts.

    I would like to use the code suggested by Uranus, but I have two problems:

    - I am having an error:

    plugin [image_01] loading error:%% SWFPATH / thumbs / 01.jpg
    plugin [image_01] loading error:%% SWFPATH / thumbs / 02.jpg
    plugin [image_01] loading error:%% SWFPATH / thumbs / 03.jpg
    plugin [image_01] loading error:%% SWFPATH / thumbs / 04.jpg
    plugin [image_01] loading error:%% SWFPATH / thumbs / 05.jpg

    I checked and the folder is correct and the pictures too.

    - My other problem is that each image must have an "onclick" function to direct a scene.

    Many thanks for the help.

  • I don't know what someone else has suggested you. I gave you working (tested) solution that is reading and adding plugins in your scrollarea plugin and assign right y values.
    Adding additional onclick attribute would be additional line in my solution.
    You obviously have some errors in your code...without shared code or online version can't help a lot.

    Einmal editiert, zuletzt von Umalo (13. September 2014 um 20:05)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!