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.

andrew22222

Intermediate

  • "andrew22222" started this thread

Posts: 341

Location: Australia

  • Send private message

1

Wednesday, March 9th 2011, 6:37pm

Lose mouse functions when using parent="STAGE"

Hi,

Sorry, I'm not allowed to put a demo up on line so have to take the screen shot route ;-)

I seem to be having a problem with mouse functions when using parent="STAGE"



The stage (The whole background in black) is 1013 px X 590 px

var so = new SWFObject("viewer.swf","krpanoSWFObject","1013","590","9.0.28","#000000");

The whole silver interface thing is a 1013 X 590 plugin png with the screen area cut out to load the panos/maps within it. All the buttons are additional plugins.

Everything works fine apart from the right hand side is missing about 90px of the interface png.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<plugin name="interface"
url="%SWFPATH%/tourfiles/images/viewer_back.png"
keep="true"
visible="true" enabled="false" handcursor="true" capture="false" children="true"
zorder="1"
alpha="1.00" blendmode="normal"
smoothing="true"
origin="centre" edge="centre"
x="90" y="0"
width="1013" height="590"
scale="1"
onloaded=""
onover=""
onhover=""
onout=""
ondown=""
onup=""
onclick=""
/>


This is what the interface should look like.



If I add parent="STAGE" to the above code and also change it to x="0" then the whole thing lines up perfect but there is no mouse control at all on the screen cut out area. The blue buttons on the right work fine to pan, zoom etc but no mouse control for dragging the map or clicking on hotspots to open panos.

Also the maps that I load into the cut out screen have to use the code below to line up.

Source code

1
2
3
4
5
6
<area x="-94" y="0" width="100%" height="100%" />
<view hlookat="0"
  	vlookat="0"
  	maxpixelzoom="1.0"
         limitview="fullrange" 
   	/>


Is there something obvious that I'm missing as to why adding parent="STAGE" blocks the mouse actions?

Many thanks,

Andrew

2

Wednesday, March 9th 2011, 6:47pm

I am guessing when you change x="0" and don't add parent="STAGE" you have an alignment issue on the left??

Maybe I am just not understanding.


How about taking some generic pictures, and making a copy of your interface in all gray to keep the privacy and then posting a link? Maybe that is too much work though.?? I know when I am in a project, making copies and working on the saved set sometimes confuses me as I think I have made the change in the copy and have actually modified the original. I don't know how big your project is but maybe having just two separate images along with a "sample" of your plugins would help us to help you.


Jarred

This post has been edited 1 times, last edit by "Jarredja" (Mar 9th 2011, 7:02pm)


andrew22222

Intermediate

  • "andrew22222" started this thread

Posts: 341

Location: Australia

  • Send private message

3

Wednesday, March 9th 2011, 7:51pm

Yes, sorry Jarred it does look a little confusing.

If I change x="0" and don't add parent="STAGE"then the whole plugin "interface" shifts even more to the left and it all looks way out of whack. The x="90" puts it inline but I lose the section on the right hand side.





You can see from the image in the previous post that it's a straight cut off on the right so in the theory the interface is where it should be using the x="90" but something is stopping it from being shown.




I add parent="STAGE" to the code and also change it to x="0" then the whole thing lines up perfect as shown below but there is no mouse control at all on the screen yet the buttons work on the right hand side.





Here's the code for one of the plugins on the bottom right

Source code

1
<plugin name="in" parent="STAGE" keep="true" url="%SWFPATH%/tourfiles/images/zoom_in.png" zorder="10" align="bottomright" edge="bottomright" x="105" y="85" ondown="set(fov_moveforce,-1);"  onup="set(fov_moveforce,0);" onhover="showtext(ZOOM IN,buttonstyle);" />


and here's the code to display one of the maps with hotspots within the cutout screen

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<area x="-94" y="0" width="100%" height="100%" />

<view hlookat="0"
  	vlookat="0"
  	maxpixelzoom="1.0"
	 	limitview="fullrange"  
	   />


	<preview url="area_select.tiles/preview.jpg" />

	<image type="CYLINDER" hfov="1.00" multires="true" tilesize="512" progressive="true">
		<level tiledimagewidth="685" tiledimageheight="476" download="view">
			<cylinder url="area_select.tiles/l1/%0v_%0h.jpg" />
		</level>
	</image>


Thanks,

Andrew

4

Wednesday, March 9th 2011, 8:23pm

*confused*

You are only defining the area once right? I don't think the area tag has the proper info.

<area x="-94" y="0" width="100%" height="100%" />

You are offsetting the area -94 px offscreen which may be why the big png does not line up and the you are declaring the area to be 100% of the stagewidth.

I believe this should be closer to what you are looking for. Although my numbers will be off.

<area x="100" y="100" width="800" height="400" />

You want to define the top left with the x and y and then define your screensize with the width and height.

andrew22222

Intermediate

  • "andrew22222" started this thread

Posts: 341

Location: Australia

  • Send private message

5

Wednesday, March 9th 2011, 8:58pm

Hi Jarred,

After reading your post this seems to have done the trick to get the interface to display where it should be.

Source code

1
2
3
4
5
6
7
<area x="0" y="0" width="1013" height="590" /> 

<view hlookat="0"
  	vlookat="0"
  	maxpixelzoom="1.0"
	 	limitview="fullrange"  
	   />





But I remember having something like that a few days ago and the loaded map (in the screen area) seemed to be offset to the right so it wasn't all displayed correctly. I think that's when I started trying all sorts of combination's and ended up with the messed up version I showed you in the previous posts *unsure*

Can you see the black area to the left of the (blurred) map image in the screen. That's just a space and I could never get rid of it or move the map image more to left to cover it.

very odd.

6

Wednesday, March 9th 2011, 9:18pm

<area x="0" y="0" width="1013" height="590" />

The x and y should not be 0 if you want it to fit that hole as a screen, more like 20 or so on each. You are displaying a bit of your map behind your png panel instead of defining that window size. The width and height should be less than what you have too because that screen size is smaller than the stage.

I hope you get what I am saying. Find the cordinates that are at the top left corner of the little screen where you want your map to appear and maybe in photoshop or whatever, get a measurement of the screen hole size and adjust the width and height to that instead of the entire stage. I believe if you were to view your map without the plugin on top, you would have a black bar on each size because it is not a sphere and does not fill the entire stage.

andrew22222

Intermediate

  • "andrew22222" started this thread

Posts: 341

Location: Australia

  • Send private message

7

Wednesday, March 9th 2011, 11:14pm

What you say makes perfect sense Jarred but no matter what I change the figures to, they change the position of both the the position/size of the map that's loaded into that small window plus it changes the size of the interface png plugin which is the area outside the small window.

It's one of those awful things you get stuck on and waste so much time.

I'm going to look through the 'Showcase' forum and see if anyone else has created something similar but online and perhaps haven't encrpted their code.

My version is destined for a DVD only plus I'm not allowed to put it online.

Thanks for your help though and I'll post the answer back here if and when I find it. At the moment I could quite happily leave it for a month and not go near it *cursing* .

8

Thursday, March 10th 2011, 11:23am

Hi,

right, when using parent="STAGE" routing the mouse events through the element is currently not possible,
(that's technically a bit difficult in the flashplayer because the STAGE is at a different display list tree)

you could try using parent="BGLAYER" (to put the image behind the pano),
and defining the <area> so to let the pano be inside that tv window,
and use parent="STAGE" for the buttons that are outside of the pano,

best regards,
Klaus

andrew22222

Intermediate

  • "andrew22222" started this thread

Posts: 341

Location: Australia

  • Send private message

9

Thursday, March 10th 2011, 5:36pm

And the project lives to see another day *thumbup*

I spent ages looking in the showcase yesterday afternoon/evening but the most popular method to present tours seems to be making it full window size with plugins graphics on top.

Thanks Klaus, that did the trick. I made the interface image plugin parent="BGLAYER" and sent it to the back and all the other control buttons parent="STAGE" to sit on top. Now I was able to use the following code to position and resize anything that's loaded into the small window.

Source code

1
2
3
4
5
6
7
<area x="70" y="58" width="685" height="475" />

<view hlookat="0"
  vlookat="0"
  maxpixelzoom="1.0"
 limitview="fullrange" 
   />


Sorry for messing you around Jarred as I'm sure without a doubt that you would have known the 'BGLAYER' thing had I been able to put a damn demo up online instead of using screenshots and probably a frustrated jibberish explanation.

That was one of the crappy parts of the project to get through as I guess it can't all be fun.

Thanks again,

Andrew

Similar threads