You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

1

Wednesday, June 17th 2009, 1:00pm

Floating object How to do it krpano

Hi,

I saw this in a forum

http://360image.de/mobile/iphone.html

There's a postcard floating when you look down. How would this be done in krpano? This would be an .swf file right? or Can this be done using tweening?

thanks,
Milo

Tuur

Sage

Posts: 3,169

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Wednesday, June 17th 2009, 2:46pm

Hi Milo,,

i've seen it and what i saw was that the size of the stage of (when it's swf) changes all the time as it turns.. i'm not sure if you can do that with swf...??


Like to know this as well

and how to mke it for mobile phones *cry*

Cheers

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

3

Wednesday, June 17th 2009, 5:34pm

yes, that could be done with tweens

just make a very long linear tween of the rx,ry or rz values of a distorted hotspot:

here is quick example:
http://krpano.com/examples/108b8/krpano.…,10000,linear);

and here is the code for a example, where it stops rotating on mouse over:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<hotspot name="nadirlogo"
         url="krpano-roundlogo.png"
         ath="0"
         atv="90"
         distorted="true"
         scale="0.5"
         rotate="0.0"
         rotatewithview="false"
         onclick="switch(rotatewithview);"
         onloaded="tween(rx,1000000,10000,linear);tween(ry,1000000,10000,linear);"
         onover="stoptween(rx,ry);mod(rx,rx,360);mod(ry,ry,360);tween(rx,0);tween(ry,0);delayedcall(0.5,set(onoutready,true));"
         onoutready="false"
         onout="if(onoutready, call(onloaded);set(onoutready,false); );"
         />


best regards,
Klaus

Tangent12

Trainee

Posts: 89

Location: Liverpool, UK

Occupation: Application Developer

  • Send private message

4

Wednesday, June 17th 2009, 9:33pm

Superb!

Thanks Klaus, you da man!
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

5

Wednesday, June 17th 2009, 9:51pm

Woooow !!!

really excellent thank Klaus *thumbsup* *thumbsup* *thumbsup* *thumbsup*

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

6

Wednesday, June 17th 2009, 11:34pm

this is great! first thing that popped into my head when i seen this is ... can we take a 360 degree object and use it in the pano in the same way? a ball rotating, on object icon that rotates and be clicked on to activate something. flipping and turning a 360 object would be phenominal.

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

7

Thursday, June 18th 2009, 2:47am

VN2009
Object vr inside krpano sounds awesome! I hope it can be done.

Klaus,

krpano is the shiznit!!!!!!!!!

8

Thursday, June 18th 2009, 11:09am

excellent,wow

klaus when you show an example can you keep the editor plugin installed so we can take a closer look at the xml

9

Thursday, June 18th 2009, 9:35pm

Hi everybody,
first sorry about my english...
and to Klaus: excellent job,
but for me as a "NOT-Coder" without a good documentation it is very hard to find the code for the
thing I will do, you understand? I know, documentation is a hard job and the last thing to do...
Now my problem:
I used the code of Klaus' example for this floating objekt in the nadir, but the problem is:
how to turn the object into the correct hlook?! so that it is possible to read the word on the pic?
you know what I mean?
the object has to turn horizontally to the monitor on every "onover"
example:
www.planorbis.de/tmp/test

thanks Mario

sorry, but I find a new problem: when I click on a video the turning hotspot is no more visible, so if you try this,
not click on a video; I am trying to solve this

10

Saturday, June 20th 2009, 12:22am

Hi,
klaus when you show an example can you keep the editor plugin installed so we can take a closer look at the xml
I have posted the code above,

but just add the editor by yourself
e.g.
http://krpano.com/examples/108b8/krpano.…gins/editor.swf

I haven't made a new example, I have just taken the nadir logo example and added a new "onloaded" event by passing it as parameter in the url,

have a look at the full url of the example:
.../krpano.swf?xml=examples/nadir-logo/nadir-logo.xml&hotspot[nadirlogo].onloaded=tween(...

the same can be used for the plugin editor, just add
&plugin[editor].url=plugins/editor.swf


Quoted

Hi everybody,
first sorry about my english...
and to Klaus: excellent job,
but for me as a "NOT-Coder" without a good documentation it is very hard to find the code for the
thing I will do, you understand? I know, documentation is a hard job and the last thing to do...

sorry, yes, I know the documentation...
this was done in this example:

Source code

1
onloaded="tween(rx,1000000,10000,linear);tween(ry,1000000,10000,linear);"

in the onloaded event two tweens are started,
these tweens are changing the rx and ry values from 0 to 1000000 in a time of 10000 seconds with linear movement,
this was done to simulate a continues rotation,

Source code

1
2
onover="stoptween(rx,ry);mod(rx,rx,360);mod(ry,ry,360);tween(rx,0);tween(ry,0);delayedcall(0.5,set(onoutready,true));"
onoutready="false"

when mouse comes over the image, the tweens were stopped,
then the rx and ry value is cutted down to the range from 0 to 360 with the modulate operator,
this was made to be able to tween back to 0/0 in a short way,
because while tweening back to 0/0 it would be possible that the mouses leaves the image
and the onout event gets be called, in the onout event the rotation will start again,
so the onout shouldn't start before the tweens were done,
I used a custom variable (onoutready) to make sure that it doesn't start rotation until the tweens were finished,
the default tween time is 0.5 second, so I set the "onoutready" value to "true" after this time,

Source code

1
onout="if(onoutready, call(onloaded);set(onoutready,false); );"

when the mouse leaves the image, it starts rotating again,
to avoid duplicate codes, the "onloaded" event is called and the "onoutready" flag is set back to "false",

I know that's very trick but this open ways to many other possiblites

Quoted

Now my problem:
I used the code of Klaus' example for this floating objekt in the nadir, but the problem is:
how to turn the object into the correct hlook?! so that it is possible to read the word on the pic?
you know what I mean?
the object has to turn horizontally to the monitor on every "onover"
example:
www.planorbis.de/tmp/test

thanks Mario

sorry, but I find a new problem: when I click on a video the turning hotspot is no more visible, so if you try this,
not click on a video; I am trying to solve this
do you want the video to be at the same place like in the real pano?
in this case you don't need "flying" hotspots, just move/scale/rotate(tween) the video to the correct position in the video,
(find it with the editor plugin)

best regards,
Klaus

11

Tuesday, June 30th 2009, 9:44am

Hi, Klaus

Thanx for explaination *thumbup*

12

Thursday, November 12th 2009, 9:53pm

does the trick of adding

Quoted

Source code

1
&plugin[editor].url=plugins/editor.swf
work for any KRPano page or does this only work with your example here? Pretty cool to have a method to reveal codes.

13

Wednesday, March 13th 2013, 5:33pm

Awesome!

Awesome example, using that in my virtual tour as we speak !! :D

ps Klauz KrPano is an absolute delight to work with :) *love*

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

14

Wednesday, March 13th 2013, 5:42pm

&plugin[editor].url=plugins/editor.swf

works if you use viewer.passQueryParameters(); and have the editor on your server as well.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Similar threads