Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Sonntag, 27. Januar 2013, 00:38

How to use Style with every scrolling Thumbs ?

Hi,

i'm using a customised version of the scrolling thumbs generated by VTour Editor,
and want to assign style to thumbs, in my case i want to attach every thumbs a tiny pic, (small pic stay in bottom left corner of thumb while scrolling)

so code looks like this :

Quellcode

1
2
3
4
5
6
7
<layer name="thumb1" scale="0.5" style="thumb_style" url="panos/pano01/Panorama.tiles/thumb.jpg" align="left" x="16"  onclick="action(load_pano_01);" ondown="set(plugin[on_over].parent, layer[thumb1]);tween(plugin[on_over].alpha, 1, 0.3);" onup="tween(plugin[on_over].alpha, 0, 0.3);"/>
<layer name="thumb2" scale="0.5" style="thumb_style" url="panos/pano02/Panorama.tiles/thumb.jpg" align="left" x="160" onclick="action(load_pano_02);" ondown="set(plugin[on_over].parent, layer[thumb2]);tween(plugin[on_over].alpha, 1, 0.3);" onup="tween(plugin[on_over].alpha, 0, 0.3);"/>
			
...

and i define my style like this :
<style name="thumb_style" alpha="1" onloaded="set(plugin[thumb_360pic].parent, layer[thumb1])"  />
it works for "thumb1" but i want a code to apply every thumbs, how to do that ?

and second question, if i have 2 styles,
how to apply the style to every thumbs assigned with the style ?

i don't know if an image plugin can have several parents or not,
may be there another solution,
i don't get it for now *confused*

thanks *smile*

z

2

Sonntag, 27. Januar 2013, 15:17

Hi!
layer[thumb1]

that whay only for one
you need to get name from layer
use "get" sction

for example layer[get(name)]

Regards
Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

3

Dienstag, 29. Januar 2013, 14:56

Thanks,

but it doen't help a lot,
i've tried to trace() to get all thumbs name but with no results.. *sad*

anybody else ?

Thanks

z

4

Dienstag, 29. Januar 2013, 15:06

Hm... then please describe you task more detailed
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

5

Dienstag, 29. Januar 2013, 19:51

i've made a simplified source in a zip,
then you can see what i want to do ... *rolleyes*

http://jumpshare.com/v/hVvtBW

Thanks

z

6

Mittwoch, 30. Januar 2013, 07:40

Package broken
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

7

Mittwoch, 30. Januar 2013, 11:36

Zitat

Package broken

Strange, it unzip fine for me, may be because was in Mac... *confused*

anyway, you can see here online example :

http://mezieres.free.fr/test.scrollpic/

Thanks *smile*

z

8

Freitag, 1. Februar 2013, 12:07

Anybody ?

Thanks *smile*

z

9

Mittwoch, 6. Februar 2013, 10:26

So complex ?? *confused*

i'm not trying to make the space shuttle take-off,
this is just a bit tricky, so any help will be welcome *g*

Thanks

z

10

Samstag, 16. Februar 2013, 15:54

well i make some progress...

i can select all thumbs with the same style and remove them with :

Quellcode

1
2
3
4
5
6
7
8
9
10
 <!--  SELECT THUMBS with specific attributes AND apply action -->
 for(set(i,0), i LT layer.count, inc(i),

  if(layer[get(i)].style == thumb_style1,<!-- Select Thumbs with same style -->

  removelayer(get(layer[get(i)].name));<!-- Action on selected Thumbs, here we remove them -->

	dec(i);
  );
);


then next step is to trigger an action on selected thumbs, for testing i want alpha 0.5 :

Quellcode

1
2
3
4
5
6
7
8
9
 <!--  SELECT THUMBS with specific attributes AND apply action -->
 for(set(i,0), i LT layer.count, inc(i),
 <!-- SELECTION  -->
  if(layer[get(i)].style == thumb_style1,
<!-- ACTION ON SELECTED -->
  set(layer[get(layer[get(i)].name)].alpha, 0.5);<!-- set(layer[get(variable_name)].attribute,value); -->

  );
);

works ok here,

and final step will be to attach the small pic to the selected thumbs...

any help welcome

Thanks

z

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »zadda« (17. Februar 2013, 19:43)


11

Samstag, 16. Februar 2013, 16:06

Hi!
for set some layer attribute you need to do so

set(layer[name].attribute,value);
or
set(layer[name].attribute,get(variable));

or
set(layer[get(variable_name)].attribute,value);

or
set(layer[get(index_var)].attribute,value);

or
copy(layer[name].attribute,variable);


or (I love this option)
copy(layerobj,layer[name]);
and then set attributes
set(layerobj.attribute,value);


Hope it help
Regards
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

12

Sonntag, 17. Februar 2013, 16:14

Thanks for the head up ;-) ,
i've edited my previous post, with the correct syntax :

Quellcode

1
set(layer[get(layer[get(i)].name)].alpha, 0.4);


Thanks

z

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »zadda« (17. Februar 2013, 19:43)


13

Sonntag, 17. Februar 2013, 18:59

Hi!
You make double inc(i)

you already inc(i) in for loop, so, don't need to inc(i) again
it's obvious 3 5 7 9 jump +1 *huh*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

14

Sonntag, 17. Februar 2013, 19:42

ok, Thanks,
you see my mistake with fresh eyes *thumbup*
so, i correct it and its working as expected,
but now i have to find a way to paste my tiny pic to the styled thumbs *confused* as it was my goal in first instance,
but i progress by small steps....

z

15

Montag, 18. Februar 2013, 16:37

well,
i can attach my tiny pic to selected thumbs, but there something wrong in my action as only the last selected thumbs got the pic, i think action loop and jump from thumbs to thumbs until the last one :

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<action name="action_selected_thumbs">	
 	<!--  SELECT THUMBS with specific attributes AND apply action -->
 	for(set(i,0), i LT layer.count, inc(i),
 
 	<!-- SELECTION  -->
  	if(layer[get(i)].style == thumb_style1,
  
  	<!-- ACTION ON SELECTED -->
       set(plugin[360pic].parent, get(layer[get(i)].name));<!-- test to add pic every selected thumbs , but go only to the last one... -->
  	  );
)	);


	</action>


my 360_pic is a plugin image,
so it is possible to load it several time being parent of each thumbs or there another easier solution ?? *confused*

Thanks *smile*

z

16

Mittwoch, 27. Februar 2013, 21:17

Still stuck there, any help welcome

http://mezieres.free.fr/test.scrollpic/

I know Klaus is very busy, so if someone else can give me a hand :)

Thanks

Z