Posts by james

    That’s great Tuur, not to dirty a solution! BTW. Sorry I forgot to send you hte text, it stays in a seperate file. All 700 of them!
    I’m now trying to maintain progress whilst getting tangled in DATA, CDATA, GET and .captures. SCREAM.

    I ALso can’t find some of hte colour and size variables for hte scroll bar. I’ll keep pushing on hte project and come back later in hte week… I suspect hte controls are there but not in the documentation?


    IN hte MEAN TIME TUUR, THANKS, YOU DESERVE A COFFEE!


    James

    OK, I think I have it down to one point, which should get me working again.

    The code for the image below is shown at the bottom of the post:


    On the left, the output from the example on the krpano Example page popup.xml. This is a HTML scrolling window. it appears at a fixed point on the STAGE.

    On the right, a window frame to surround the first window. This can be moved/dragged around the STAGE by clicking the border.

    How do I combine these so the window on the left keeps working, is inside the frame on the right and they both can move around together?

    Thanks

    James

    Supporting Code: LEFT HTML scrolling
    addlayer('popup_bg', popup_bg);
    linkeventscope(popup_bg);
    set(popup_bg,
    type=container,
    align=top,
    width=100%,
    height=100%,
    zorder=99,
    handcursor=false,
    bgroundedge='0 0 7 7',
    bgcapture=true,
    capture=false,
    bgblur=0,
    bgcolor=0xFFFF00,
    bgalpha=0.0,
    onloaded='tween(caller.bgblur,15); tween(caller.bgalpha,0.0);', // bgalpha > 0 => colorize the background
    onclick='popup_close()'
    );


    addlayer('popup', popup);
    set(popup,
    type=container,
    parent='popup_bg',
    popupwidth=get(width),
    popupheight=get(height),
    popupaspect=0,
    width=get(width),
    height=get(height),
    align=center,
    bgborder='1 0x555555 1',
    bgcolor=0x555555,
    bgalpha=0.7,
    bgshadow='0 10 20 0x000000 0.5',
    bgcapture=true,
    maskchildren=false,
    capture=true,
    handcursor=false,
    alpha=0,
    htmllinkcolor='',
    );

    if(type == 'html',
    set(popup.type, html);
    copy(popup.html, content);
    copy(popup.htmlscrollbars, scrollbars);

    ,type == 'image',
    set(popup,
    bgcolor=0xFFFFFF,
    bgalpha=1,
    );
    addlayer("popup_image", img);
    set(img,
    url=get(content),
    align=center,
    width=-20, height=-20,
    parent=get(popup.name),
    onloaded='parentobject.popupwidth=imagewidth+40; parentobject.popupheight=imageheight+40; parentobject.popupaspect=imagewidth/imageheight; parentobject.parentobject.triggerevent(onresize);'
    );
    );

    Supporting Code: RIGHT dragable frame
    addlayer('popupframe', popupframe);
    set(popupframe,
    type=text,
    popupwidth=700,
    popupheight=500,
    popupaspect=1.4,
    width=700,
    height=500,
    align=center,
    bgborder='30,5,5,5 0x111199',
    bgalpha=0.4,
    bgshadow='16 16 20 0x444444 0.5',
    bgroundedge='0 0 9 9',
    bgcapture=true
    maskchildren=false,
    capture=true,
    handcursor=false,
    alpha=0.8,
    htmllinkcolor='',
    ondown="draglayer();"
    );

    Still struggling with this Here is another view of the problem which I think is easier to understand and therefore suggest ways forward.

    The image shows the current result. The central area (popup) with CSS,HTML, auto sidebars, scrolling etc all work.

    The surrounding layers in blue form the containing layers to make it look like a real window, with title and close button eventually. This can be dragged anywhere on the screen for convenience.

    Both parts work BUT THEY DONT WORK TOGETHER, what I mean is

    1. The blue frame should appear to tightly surround the popup grey central area i.e. fit around the size of the example popup in grey as per the size defined for popup and popup_bg.

    2. The blue window when dragged around should carry the popup around with it. The popup grey content works but is immovable from the origin.


    The code is 110 lines as follows

    1-20. temporary code to allow easy use of the code whilst debugging.

    20-50 The routines to generate the blue frame

    50-110 Code from popup.xml copied here from the examples on the web:

    Hello.

    I am tying to combine the sample code from the examples from scrollarea.xml and Draggable Layers.xml.

    The key point is that the header area seems to present the layers in an order which is not as programmed using the PARENT, ZORDER and physical positon in the code. See the header above. NOTE: The CYAN (and other harsh colours) colour is to help you see the build up of layers, it is not meant to be this colour!

    The scrollable content woks fine. The scroll bars also work on the right side. MY addition of a top bar with title text and close button X do not work as expected because they main body layer appears at the top of the layer stack when the title should appear there. The words MAXWELLS FOOTSTEPS should be under the CYAN LETTER BACKGROUND AND the black container that holds the TITLE.

    As constructed the top edge doesn't have a border. I thought initially that the problem was only to do with the border, so I removed it, replacing it with a container called boxtitle, but it's both the border and the scrolled content that are wrong.

    This is a non-issue, although Klaus’ comments on Versioning were well made.

    This observation was made by someone during acceptance testing. I should have been more diligent in identifying that this was nothing more than a misunderstanding about caching and how it effects users view of the internet.

    Delay in closing caused by decision to abort acceptance tests in favour of rolling to 1.22.x and its many improved features.

    I'm supposed to be updating tours to 1.22.2++ but I'm stuck on this really simple mix of brackets, get(s) and its to late in the week, can anyone help with the correct combination please.

    In a separate file I have hundreds of these "labels"

    Code
    <data name="introduction-TITLE"
    The Introduction Heading line is this seperate label.
    </data>

    Then in the tour itself I have a plugin

    Code
    <include url="%FIRSTXML%/captions.xml" /> 
    <plugin name="press_the_button"
             onclick = "popup("HTML", "introduction-TITLE", "introduction-DATA", width etc...   
             scope="private:POPUP" args="type, headings, contents, width, ...
    /> 

    and an action

    The challenge is to use the data in the separate file in this 'private' routine:

    Code
    <action name="popup" scope="private:POPUP" args="type, headings, contents, width ...
            set(texTITLE, get(data[get(headings)].content));
            If you now get(texTITLE) it shoudl contan the string...
            The Introduction Heading line is this seperate label. 

    BUT its null...

    I tried breaking the last line into 2 pieces, but its hardly that complicated?

    Either it something really obvious I cant see, or its to do with PRIVATE and PUBLIC which I can t get my head round.

    Thanks

    James

    Klaus,

    It won’t crash anymore, its very annoying. There are 30 scenes and 13000 lines of xml. On line are 3 versions, doing acceptance test with James Clerk Maxwell trustees. I now don’t believe hte addition of url variable like %FIRSTXML% ACTUALLY FIXED THIS, I believe this to be a infrastructure caching problem?

    I have another site that has this problem, forgive the deviation. I manage a 1300 page online book. The book has 3 jpg files per page and some front end js to do a flip book. So that’s 5000 files to serve,manage send prediction, what one to cache next etc. It uses google drive to store in hte cloud and regularity it takes 3days for chsnges too getvthriugh to users.


    Is there any one else with these problems? Both these functions work well in krpano test server and once stable but getting between them takes days. Is there any experts on trsansmission these days, I m arfraid I’m in hte past withbSONET/SDH LOL. IS Todays model for cache different. All cache used to be local to user, I wonder if. To maintain internet Morevintrrmediate caches are used, would make sense for streamed services but not for krpano?


    Any thoughts?

    James

    Piotr, Thanks for the input. You are correct, not structuring the URL with a system variable lke %VIEWER% is poor practice. I was just relying on relative addressing. As I edited the xml I kept checking that the error also changed. Which it did, as I worked through the code the error kept moving forward indicatng that this was the solution, all I had to do was add one of the sysetm variables for URLs to the start of each aproproate line. Just over 200lines of code required modification and testing - hence my slow response to your inpt!

    Unfortunately I am now finished and seem to be back to the start. All browsers (IE, Crome Edge, Safary etc etc on different platforms ALL WORK (before and after adding teh system variables)) but on FIREFO I can guarantee it will fail within 4-6 file requests to load a pano, or insert an image or button etc etc, any task that requires a file interaction, or either just hangs or takes so long to load the file that the program times out.

    I have over 11,000 lines of xml, so I have started to strip it back to isolate the area were Firefox is behaving difernetly from other browsers. Thsi will take some time to get something I can share with the community, idaelly a few dozen lines of code is required - certainly the fewer the better.

    Whlst I start to generae this cut down tour, if anyone else has any ideas at all please post, you may save me a lot of work trying to understand what I'm doing that makes Firefox work differently.


    Thans

    James

    In the very final stages of releasing a large pano tour when it was noticed that using the Firefox browser leads to the tour crashing.

    The client doesn't like the solution - a pop-up dialogue box with a DO NOT USE FIREFOX Message. I thought it was a great addition to the code as the message and dialogue only appears when using Firefox... LOL

    I know its convention to provide an example of the failing code, but the tour xml is 10000 lines long and it may take some time,to get to the problematic code.


    The tour starts with a flat background then you enter. next panoramas starts by producing the loadingbar which gets stuck while never showss any content loading. Next this eror is produced presumbly because the pano load is faling.with novrules...

    Code
    ERROR: hotspot[hsestourgs] - loading of 'krpano/graphics/hotspot_ani_black_64x64x20.png' failed!

    Any ideas?

    gentles360.uk/JCM-TOUR/

    James

    Thanks for the links to the plugins. Interesting and useful.

    In the end I used a bit of everything, one solution doesn’t fit all. It depends what, in the end, the information is for. E,g. You may want to style a page differently to suit a small screen, or you may want to know if the device can be connected to a 5G network, etc.

    James

    Thanks Klaus,

    I am rather shying away from a solution that involves maintaining a list of devices, it's not clear whether the market is keen on these variants - the big mobile, or maybe its a Tablet with phone? The tester who pointed this out says he personally sees the use of this device as a phone as an "option" and has no intention of adding a SIM. So behavour changes with user?

    What I'm trying to achieve is a simpler, smaller, user interface, for small screens. We all knowthat small screens are not the best way to view VR but hopefully you can get people interested enough to "go large" on anther device.

    Primarily it's eth screen size so I implemented this:

    Code
    	<action name="check4Stagesizee">
    	  		jsget(krpW, 'window.innerWidth' );
    	  		jsget(krpH,'window.innerHeight' );
    			calc(krpDiagonal, ((krpW * krpW) + (krpH * krpH)));

    There are a number of screen and window variables to choose from. the result krpdiagonal is the square of the diagonal pixel count and it is used to make GUI decisions. I didn't take the square root of the result as that calculation takes time and I dont care in my application.

    James

    I have a 30 panoarma tour which uses the mutually exclusive device.desktop device.tablet and device.mobile to make presentation decisions. With mobiles having such small screens they offer reduced menus and reduced captions, basically trading off screen space for operability, always hoping the mobile users will come back on a bigger screen for a better experience. Basically the full tour operates on desktop and tablet (web-vr is also enabled and operates where supported).

    The logic to control this uses extensively device.desktop device.tablet and device.mobile as the they are mutually excusive

    Using krpano 1.21, The SAMSUNG GALAXY TAB A running Android 11 reports that it is a mobile, when I would have expected it to be a Tablet?

    What is the preferred logic for this, would it be better using the screen size as the key attribute

    James

    I have implemented a tour with several information pop-ups using scrollarea The message box that is generated can be called to display many different messages. This all works well an but there is an issue when the message box is scrolled...

    If the message box is used and the text is a bit long then the user drags the text down to read.

    After the message box is dismissed, if another instance of the message box is started, and this time it displays a very short message.

    After the above scénario, the short message doesn't display because the message box still thinks the long message is there and so remains scrolled down. There are three outcomes for this behaviour:

    1. If nothing has been scrolled (or the scroll is moved back to the start) then the system works normally.

    2. If the first message is longer than the second message by less than the height of the message box then on the first drag event there is an awkward jump then everything works.

    3. If the new message is a lot shorter than the original message then the second message appears to be blank, and it stays blank. I dont believe it is blank, its just that you are stuck looking at the window past where there is active data.

    I believe I am not resetting a variable that needs reset. The variable containing the y position of the currently displayed message is being left behind and reused when it should be reset.

    After exhausting most possibilities with the obvious variables used, I believe there must be a less obvious variable, e.g. layer[scrollbox].find_y_here,0 that needs reset, can anyone help please?

    Thanks

    James

    I have a tour where I would like to set the default value of the combobox items with a variable when the tour starts. For example:

    Code
    onload(), variable initmusic is passed into the xml from a cookie via javascript and initvars:{initmusic:initmusic...
        
    <combobox name="cb_music" design="greycombo" zorder="202"  keep="true"
         x="20px" y="1999px" visible="true" align="center" edge="left"
         >
         <item name="M1" caption="auto Music ON"  onclick="set(initmusic, 'M1' );" 
    />
         <item name="M0" caption="auto Music OFF" onclick="set(initmusic, 'M0' );" />
    </combobox>

    Another action is used to write cookies with a varient of settings, that all works. it's only the reading and setting that are a problem.

    I have tried lots of combinations based on:

    Code
      trace(get(layer[get(cb_music)].selecteditemindex;););
      trace(get(layer[cb_music].selecteditemindex;););

    and seem unable to even read what is selected far less preset or setup the combobox using the (cookie) variable.


    Thanks
    James

    Thanks that sounds like an ideal solution. I am not an expert but I thought iframes were seen increasingly as security risks, given their association with drop-in adverts and 3rd party content on a page?

    Finally any idea why someone went to the trouble of writing WP-pano, did it offer anything that was better than the humble iframe?

    Thanks

    James

    I am currently attempting to add a Krpano feature rich tour. into a number of WordPress websites. There appears to only be one recent WordPress plugin available that integrates Krpano within the WordPress world, and this plugin is now obsolete and unsupported: is called “WP-Pano “. This legacy WordPress plug-in does function correctly on limited testing with current versions of WordPress however the unsupported code has not been modified since around 2015 and lags the current versions of WordPress by 3 major versions.

    Can anyone advise on how Krpano can be interfaced into WordPress? Given the scale of WordPress websites globally, I’d think this functionality must be available somewhere? What is the general approach recommended. I have a large volume of Krpano type images that may be impacted.


    Thanks,
    James
    gentles360.uk

    Alexey,
    Yes, you are correct this is a good solution. However... To make things simple I didn't explain EXACTLY what I was doing. Thre intention is to have the final tour have 2 entry points.

    a. The main entry point (usually index.html) would be accessed normally by users, server based, nothing unusual here
    b. A second entry point would NOT be accessed by users, but would be accessed locally using tour_testingserver and allow the Client to run the tour with extra configuration layers enabled to allow Client customisation. Lets call this configuration.html
    Of course the users MUST NOT be able to run configuration.html, it wont work if run remotely and you wont be able to guess teh file name!
    Hence it makes sense to use index.html for USERS and a secret name for tour_testingserver.
    Klaus solution will work for this, your solution will also work. But I do lke the security of index.html running the main tour.
    If you have any other ideas for this I would be happy to hear them!
    Thanks
    James