You are not logged in.

1

Tuesday, August 30th 2011, 9:45pm

How to create plugin scale +1?

How to create plugin scale +1?

I like to create a button that iciese scale plugin. +0.25 Each time you press.
For Scale not find anything.
A Slud and thanks

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Tuesday, August 30th 2011, 10:36pm

Use the mul function and read the documention on actions. One problem though is that the results won't generally be what you expect fully based on z y and align.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

VN2011

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

3

Tuesday, August 30th 2011, 10:47pm

I like to create a button that iciese scale plugin. +0.25 Each time you press.


use switch action

switch(scale, 1, 1.25, 1.5, 1.75, 2); set(scale,get(scale));

or use tween instead of set to make it smoother transition.

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Wednesday, August 31st 2011, 3:12am

Huh? Shouldnt the switch be doing the setting? Why would you need it?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

jpdeglet69

Intermediate

Posts: 215

Location: France

Occupation: VR Maker and Document Management Expert

  • Send private message

5

Wednesday, August 31st 2011, 1:20pm

What do you except to scale?
- buttons, texts... or pano?

If you want to re-size "plugins...", like in my tours
(user can re-size the web browser, or click on "style buttons", all the plugins are automatically re-sized),
you should consider also the dynamic positioning *wacko* ...

So, be inspired from "KrPano/examples/xml-usage/fix-aspect/fixaspect.html"...
;-)
Best regards,
JPhD
VR-GuideĀ®/Eleana CEO
https://eleana.online

VN2011

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

6

Wednesday, August 31st 2011, 2:58pm

Huh? Shouldnt the switch be doing the setting? Why would you need it?


i made is based off klaus example in the switch documentaion. but i see what you mean the set might not be needed in the scale case.

http://krpano.com/docu/actions/#switch

switch(destpos, -100, 0, +100); tween(y,get(destpos));

7

Friday, September 2nd 2011, 10:21am

Hi,

here a simple example code:

Source code

1
onclick="add(newscale,scale,1); tween(scale,get(newscale));"


here the value 1 will be added to the current scale and saved to the new variable "newscale",
then the tween action will be called to change the current scale to the value of the newscale varialbe,

best regards,
Klaus

8

Sunday, September 4th 2011, 12:25am

Works perfectly.
Thanks for your time

9

Sunday, September 4th 2011, 12:41am

Ation can be put on a particular plugin?

example:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<action name="demoaction1">
addplugin(demo1);
set(plugin[demo1].url,%SWFPATH%/images/a2.png);
set(plugin[demo1].align,top);
set(plugin[demo1].edge,top);
set(plugin[demo1].visible,true);
set(plugin[demo1].x,-300);
set(plugin[demo1].y,10);
set(plugin[demo1].onclick,add(newscale,scale,0.2); tween(plugin[boton1].scale,get(newscale)););
set(plugin[demo1].ondown,);
set(plugin[demo1].onup,);
set(plugin[demo1].zorder,1);


</action>


The function I want is that every time you press enlarge or scale scale + 0.2 - 0.2.

thanks

10

Sunday, September 4th 2011, 1:02am

set(plugin[alphaA1].onclick,add(plugin[a1].newscale,scale,0.2); tween(plugin[a1].scale,get(newscale)););
*confused*

11

Thursday, September 8th 2011, 5:13pm

this way:
set(plugin[alphaA1].onclick,add(plugin[a1].newscale,plugin[a1].scale,0.2); tween(plugin[a1].scale,get(plugin[a1].newscale)););

12

Saturday, September 10th 2011, 7:02pm

It worked perfect thank you very much.