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.

1

Saturday, April 10th 2010, 9:54am

Possible to position plugin via ATH or hotspot calls another hotspot ?

Hi!

I do have a hotspot (swf) that should tween another image from alpha0 to alpha1. The image has to be positioned relative (via ATH) not via x and y.

So far I tried:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<hotspot name="test"
		url="test_info-button.swf"
		keep="false"
		ath="-32.364944053725246" atv="-1.232997967570483"
		zoom="false" distorted="false"
		scale="0.2" alpha="0.3" scale9grid="" scalechildren="false" rotate="0"
		rx="0" ry="0" rz="0"
		edge="center" ox="" oy=""
		crop="" ondowncrop="" onovercrop=""
		visible="true" enabled="true" handcursor="true" capture="true" children="true"
		zorder="0"
		blendmode="normal" smoothing="true"
		refreshrate="auto"
		onloaded=""
		onover="tween(alpha,0.9);tween(scale,0.3);"
		onout="tween(alpha,0.3);tween(scale,0.2);"
		ondown="tween(hotspot[test-info].x,0%); tween(alpha,0.9); tween(area.x,0%); tween(area.width,100%);set(autorotate.enabled,false);"
		onup="tween(hotspot[test-info].x,-0%); tween(alpha,0.3); tween(area.x,0%); tween(area.width,100%);set(autorotate.enabled,true);" 	
		details="8"
		effect=""
		flying="0"
		inverserotation="false"
	/>


As you can see ondown the hotspot "test-info" is called, but it does not work. The "test-info" is shown all the time and not alpha tweened in. I tried to call a plugin instead of hotspot and it works, but I can't position a plugin via ATH but only via x and y.

Here's the called hotspot:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<hotspot name="test-info"
		url=info.swf"
		keep="false"
		ath="-22.364944053725246" atv="-1.232997967570483"
		zoom="false" distorted="false"
		scale="0.2"  scale9grid="" scalechildren="false" rotate="0"
		rx="0" ry="0" rz="0"
		edge="center" ox="" oy=""
		crop="" ondowncrop="" onovercrop=""
		visible="true" enabled="true" handcursor="true" capture="true" children="true"
		zorder="0"
		blendmode="normal" smoothing="true"
		refreshrate="auto"
		onloaded=""
		details="8"
		effect=""
		flying="0"
		inverserotation="false"
	/>


Is it possible somehow, that when a hotspot is clicked, an relatively positioned image (ath) is alpha tweened in?

Greetings,
M.

Zephyr

Professional

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

2

Saturday, April 10th 2010, 11:42am

I don't get what you want? You want to click hotspot "test" and then the hotspot "test-info" gets faded in? So what's up with Ath en x/y? Or do you want to tween the image from ath to another ath?

you have like this in your code in the ondown of test

Source code

1
ondown="tween(hotspot[test-info].x,0%); tween(alpha,0.9); tween(area.x,0%); tween(area.width,100%);set(autorotate.enabled,false);"


first you tween test-info x to 0% ?
shouldnt it be tween(hotspot[test-info].ath, 10)
replace 10 with your own value.
Then tween the alpha of test-info. Or rather tween the alpha first (so you can see it) and then tween the ath.
tween(hotspot[test-info].alpha,0.9);

And if you want to tween to a relative spot on the screen. take the view.hlookat and add your offset value

add(dst, 10, get(view.hlookat));
tween(hotspot[test-info].ath, dst);

3

Saturday, April 10th 2010, 3:15pm

Thanks for the reply. At the moment I get the job done by tweeining the image in. The image main position is hidden outside (so it's hidden) and tweens in when the main hotspot is clicked.
Thats why the current code looks that way.

What I would like to have is that:
One hotspot "test" is an .swf and when clicked (button down), it tweens (fades)
second .swf hotspot "test-info" (alpha0 by default) in to alpha1
when button release, it fades "test-info" back to alpha0

No positions changes requiered.

I simply don't know how to get this done.

4

Saturday, April 10th 2010, 8:03pm

like this ?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<hotspot name ="swf">

....

onclick ="action(clicked)"

onup ="action(up)"

</hotspot>

<action name ="clicked">

tween(hotspot[swf].alpha,0);

tween(hotspot[swf2].alpha,1);

</action>

<action name="up"">

tween(hotspot[swf].alpha,1);

tween(hotspot[swf2].alpha,0);

</action>

5

Sunday, April 11th 2010, 4:25pm

Thanks a lot. Your help is highly appreciated!