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.

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

1

Sunday, March 13th 2011, 1:47am

flashing polygonals hotspots ?

Hi,

I'd like to add a flashy behave on my polygonals hotspots. For example, the border is on and off each second.
I've tried a delayedcall action called from the onloaded setting of my hotspot :

Source code

1
2
3
4
5
6
7
8
	<action name="showborder">

		delayedcall(1.0, set(hotspot[pic_tableau].borderalpha, 1.0)); 
		delayedcall(2.0, set(hotspot[pic_tableau].borderalpha, 0.0)); 
		delayedcall(3.0, showborder() );
		
			
	</action>	

I'vve also tried this, just to try to change at least a setting on this hotspot, via onloaded :

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<hotspot name="pic_tableau"
	         style="pichotspot_d"
	         keep="false"
	         visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true"
 	         zorder="0"
	         fillcolor     ="0xffffff" fillalpha     ="0.00" borderwidth     ="2.0" bordercolor     ="0xe91f32" borderalpha     ="1.00"
	         fillcolorhover="0xffffff" fillalphahover="0.10" borderwidthhover="4.0" bordercolorhover="0xffffff" borderalphahover="0.80"
	         fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
	         onover=""
	         onhover=""
	         onout=""
	         onloaded="set(hospot[pic_tableau].borderalpha, 0.0);"
                  ....

It's not working. *cry* The border still visible.
Is it impossible to switch, tween or set a function in polygonal hotspot ?

Any suggestion ?

Thanks. *smile*

Steph
Steph

2

Monday, March 14th 2011, 11:04am

Hi,

changing the polygonal hotspot styles attributes should work,
but changing them will not automatically force a redraw,

there is an internal flag that you can use to force the redraw,
add that code:

Source code

1
set(hotspot[pic_tableau].needredraw, true);


and note - there is no "onloaded" event for polygonal hotspots!
the onloaded event will be only called when an image hotspots was loaded,

best regards,
Klaus

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

3

Tuesday, March 22nd 2011, 4:13pm

Thanks Klaus. One more time. ;-)

It works when i move into the pano (one flashing)! My action is not a loop ?! But it doesn't work when you don't move.
I call the action from the "events onxmlcomplete" of my scene. And the action is written out of the scene (bottom of the xml).

Source code

1
2
3
4
5
6
7
8
9
	<action name="showborder">

		set(hotspot[pic_tableau].needredraw, true);
		delayedcall(1.0, set(hotspot[pic_tableau].borderalpha, 1.0)); 
		delayedcall(2.0, set(hotspot[pic_tableau].borderalpha, 0.0)); 
		delayedcall(3.0, showborder() );
		
			
	</action>

What's wrong ?

Thanks. *smile*
Steph
Steph

This post has been edited 2 times, last edit by "esys" (Mar 22nd 2011, 4:52pm)


michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Tuesday, March 22nd 2011, 7:01pm

Hi Steph,

Try this:

Source code

1
2
3
4
5
6
7
8
	<action name="showborder">
		showlog();
		delayedcall(1.0, set(hotspot[pic_tableau].needredraw, true);set(hotspot[pic_tableau].borderalpha, 1.0);); 
		trace('hotspot[pic_tableau].needredraw = ',hotspot[pic_tableau].needredraw); <!-- Note the result --- FALSE !!! -->
		delayedcall(2.0, set(hotspot[pic_tableau].needredraw, true);set(hotspot[pic_tableau].borderalpha, 0.2);); 
		trace('hotspot[pic_tableau].needredraw = ',hotspot[pic_tableau].needredraw); <!-- Note the result --- FALSE !!! -->
		delayedcall(3.0, showborder() );
	</action>


This other also works:

Source code

1
2
3
4
5
	<action name="showborder">
		delayedcall(1.0, set(hotspot[pic_tableau].borderalpha, 1.0);updatescreen();); 
		delayedcall(2.0, set(hotspot[pic_tableau].borderalpha, 0.2);updatescreen();); 
		delayedcall(3.0, showborder() );
	</action>


@KLAUS... How many other undocumented things like this one *question* *squint*

SAlut.

5

Thursday, March 24th 2011, 7:12am

Here's an example of flashing hotspots that uses a variant of the 2nd method detailed in the above post by Michel.

Goodyear Blimp

Once the intro screen completes, click on the "learning center" button in the upper left corner (it looks like a graduation cap--mortar board). Click on INSTRUMENTS. After the page loads, mouse over any of the items in the menu and you should see the appropriate instrument flash.

There are still a few bugs to work out, but you should get the idea.

steve

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

6

Saturday, March 26th 2011, 1:24am

Hi Steve,

It's nice to see you back *smile* ...
I have played a little with your learning center menu and after changing from an item to another and selecting quickly to the inside items I got those warnings:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
INFO: pressed first
INFO: pressed first
WARNING: loadpano() - busy
INFO: pressed first
ERROR: looktohotspot() - hotspot "bal_press" not found
INFO: error auto_goto[2]: cannot find state 0 in hotspot_flasher
ERROR: looktohotspot() - hotspot "super_heat" not found
INFO: error auto_goto[2]: cannot find state 0 in hotspot_flasher
ERROR: looktohotspot() - hotspot "marker_beacons" not found
INFO: error auto_goto[2]: cannot find state 0 in hotspot_flasher
ERROR: looktohotspot() - hotspot "radar_altimeter" not found
INFO: error auto_goto[2]: cannot find state 0 in hotspot_flasher
ERROR: looktohotspot() - hotspot "hsi" not found

This seems to be because the loadpano() is not ready yet, No?
So I have thought that using an wait(load) could avoid the problem perhaps...
I have taken a look on your code (Pufff... SO complex *g* *squint* so if I am on mistake, excuse me please *whistling* ) and perhaps this can do:
menu.xml:

Source code

3234
3235
3236
3237
3238
	        onclick="if (xml.url != interior_high_res.xml,ld_pano(interior_high_res.xml,null,null,null,null,wait(load)););"
.......
	    	onclick="if (xml.url != under_nose.xml,ld_pano(under_nose.xml,null,null,null,null,wait(load)););"
.......
	    	onclick="if (xml.url != rear_quarter.xml,ld_pano(rear_quarter.xml,null,null,null,null,wait(load)););"

local.xml:

Source code

609
610
611
612
613
614
615
616
617
618
619
620
621
	<action name="ld_pano">
.......
		if (%6 == null,

			set(action[%0].param_6,null);

		<!--else-->,

			set(action[%0].param_6,%6);

		);
.......
			txtadd(action[%0]._queue[0].cmd,'loadpano(%1,',get(action[%0].params),',',get(action[%0].flags),',',get(action[%0].blend),',',get(action[%0].onstrt),',',get(action[%0].param_6),');');


Hope it's correct *smile* ...
SAlut

edited: I forgot, perhaps it should be better to set the selectable parameter to false inside each textfield of the menu items...

This post has been edited 1 times, last edit by "michel" (Mar 26th 2011, 5:08am)


esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

7

Tuesday, March 29th 2011, 1:24am

Quoted

Source code

1
2
3
4
5
<action name="showborder">
		delayedcall(1.0, set(hotspot[pic_tableau].borderalpha, 1.0);updatescreen();); 
		delayedcall(2.0, set(hotspot[pic_tableau].borderalpha, 0.2);updatescreen();); 
		delayedcall(3.0, showborder() );
	</action>


Thanks Michel and Steve. Works great ;-)
Steph
Steph

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

8

Thursday, April 28th 2011, 10:30am

Hi,

The delayed call works great. However, i had a problem with fluidity in one pano. Do you think it could come from the "updatescreen" call ? Or because i have six hotspots like this ?
In this case, is it the only way to have this lightning effect ?

Thank you very much.
Steph
Steph