Beiträge von pablo_ivan57

    I would like to know, if the latest textField plugin has support for scrolling content. Right now I'm using it with a plugin background image, however it's overflowing the image when the text gets bigger. I found another threads where in fact there is an implementation of textField.swf with scroll support, however the posts relate to 2011, and I would like to keep the newest functionallity of textField (html5). Thanks a lot.

    I'm looking for a way to generate an unique string inside the viewer, in similar manner to the uniqid() function of the php programming language, where it's assured the uniqueness of the variable based on the current time.I already made something like that by using a start number that's passed trough the javascript interface, however this approach is external to the viewer and error prone.
    Hope there's a way to do it...
    Thanks a lot.

    Hi, I have been checking the PanoTag plugin, it's really great, but I would like to use just a piece of it's functionallity, specifically the drag and drop plugins that were created to tag points inside the viewer. So the question is, what would I need in order to implement the drag and drop behaviour executing my own actions??.
    I have tried already, but... I coudn't make it work.

    There must be and error somewhere, because I didn't managed even to show the drag button... What's wrong with the code above?.
    Thanks a lot.

    Hello, Is there a way to add a hotspot based on a drag an drop action?. I want something like the facebook tag plugin (Where users can drag from a button the tag they want)... Can it be achieved trough regular krpano??, or are there any plugins that are already made for that purpose?.
    Thanks a lot

    Because, they want to have some description text and links below the images... I already looked at the plugin you suggested, however it will only show images. Another reason would be to customize the layout and background and look and feel, and make it configurable by the administrator. With textfield the admin would just have to change css in order to achieve that.

    Hello, I'm trying to implement a basic gallery inside a texfield plugin. What I want to achieve is to have a centered image with thumbnails below it representing the availble images, so... when the user clicks a thumbnail the image will be replaced by it.

    This is relatively simple using javascript, however I don't think that's possible inside the textfield... right?, if so is there any other way you would suggest to achieve that behaviour?. I have seen something similar on certain sites, but I think they customized the textfield.swf file. In other words... they changed the source ActionScript to accomplish that...

    Is there any kind of post or tutorial where I can see how to change a plugin source code? Well in this case textfield's source code?.
    Thanks a lot.

    Ok, so the problem as stated in the textfield plugin page, is that actually div tags aren't suuported on the plugin. However.. I have seen other posts where the html tag in fact contains some div elements like this: "html=[div style="float:left;"]", my guess is that onlye the HTML 5 version of textfield supports that. I am correct??? If so... how could I force the krpano viewer to use only the html5 textfiel version regarding if it's running on a desktop machine or tablet?

    I have a question regarding the TextField plugin, when using the style tag inside any html tag... it seems like the plugin is ignoring them. For example I have the following script:

    The only part that's shown on screen is the last div from the data tag.

    Code
    <div>Esta nota de krpano el drag lo hace muy suave, hay que mover bastante en direccion vertical para que coja</div>

    . Why is happening this? Thanks a lot.

    I'm having trouble displaying a textField plugin, Here is my xml:

    When I click the newhotspot1 Hotspot, nothing is shown on screen, just the result of the showtext action that was inside the show_hotspot_html_field action. What I'm doing wrong??

    EDIT: Nevermind, the problem was keep = true, since the loadScene was the first action on the xml, the plugin was getting removed from it.

    Hello, I'm implementing an script where the user has the ability to add a hotspot to the panorama when clicking on it. So far it's working great, however I'm having a hard time differencing between a user click and a user drag... What's happening right now is that when the user drags the panorama, almost always a click event is launched at the final position of the mouse. How could I avoid that?

    Hi, I saw a similar question on other thread however think this situation is slightly different. Ok so let's supose my panorama is geotagged, so it's center would be at an specific coordinate, and it will be always initially loaded pointing at north. I got some calculations in order to create hotspots pointing to other geotagged scenes in my viewer. It works pretty well... but then the user is able to add hotspots inside the viewer, So the question is as follows. Is there some kind of variable that I could use in order to recreate distance??. For example my panorama is located at coordinate -0.12232,1.445433. Now I added a hotspot inside the viewer and want to assign it also a coordinate, that would be the center plus some meters depending on the angle that's currently pointing the user... But is there some kind of zoom?? in the viewer that I could use to calculate or relate meters or distance to the coordinates? Thanks a lot.

    I tried it, but it didn't worked...

    set(hotspot[get(lastCreatedHotspotName)].onclick , showtext('get(lastCreatedHotspotName)',infostyle));

    even this retrieves the altered variable when clicking on the hotspot. I need a way to retrieve the variable's value and then convert it to string, and put that result on the hotspot's onclick event. Is there a way to do this?

    EDIT: Sorry it worked with the name variable, I got confused. Thanks a lot.

    Ok, lastCreatedHotspotName is a variable that stores a generated name, based on the serial value that's passed to the viewer from js code. This is done in order to allow the user to click anywhere inside the panorama and create a new hotspot dinamically (Administration of hotspots in other words).
    the lastCreatedHotspotName is used in order for the txtAdd action to have a variable to alter; wich would be the first parameter it receives.
    The problem is the following use case, let's suppose the user adds a new hotspot and at that moment serial has the value of 1. The action code that I posted then creates a new name 'newHotspot1' in this case, and adds a new hotspot to the viewer with that name. Finally it adds 1 to the serial value, so that the next generated name is newHotspot2 (to avoid replacing the hotspot that was already created). However, the problem comes because I need a way to identify wich one was clicked when the user clicks on the hotspot, and the only way to do that is (I think...) is by getting it's name. so that I could retrieve the selected hotspot ath or atv, or whatever I need. That's what I'm trying to do with that code on the hotspot's onclick event. But since lastCreatedHotspotName was already altered ( Let's say the user created 5 hotspots after that and the actualName is newHotspot6). When I click on it, the hotspot it's showing 'newHotspot6', but what I actually need it the 'newHotspot1' value.
    Hope now it's more clear what I'm trying to achieve.
    Thanks a lot.

    Thank you, now I faced some trouble when adding them dinamically, the problem is that I need to retrieve the name that was used to create the hotspot when the user clicks on it. However since the name is dinamically generated, the variable that's used to create the names changes after that. For example the following code:

    <action name="addNewHotspot">txtadd(lastCreatedHotspotName,'newHotspot',get(serial));
    addhotspot(get(lastCreatedHotspotName));
    set(hotspot[get(lastCreatedHotspotName)].url, '%CURRENTXML%/hotspot/hotspotInfoImage.png');
    screentosphere(mouse.x,mouse.y,toh,tov);
    set(hotspot[get(lastCreatedHotspotName)].ath, get(toh));
    set(hotspot[get(lastCreatedHotspotName)].atv, get(tov));
    showtext(get(lastCreatedHotspotName),infostyle);
    set(hotspot[get(lastCreatedHotspotName)].onclick , showtext(get(lastCreatedHotspotName),infostyle););
    add(serial,1);
    </action>

    The problem is that when a hotspot is clicked, it's showing the lastCreatedHostpotName value ( In other words tha last generated name)... how could I modify it in order to retrieve the clicked hotspot's name? Thank you so much.

    Hello, I have a doubt since I need to do some simple operations on a variable that is passed from the js, ( viewer.addVariable("serial",1);)

    I can get that variable by using the get action. So for example
    showtext(get(serial),infostyle); effectively shows the 1 value on screen. Now what I want is to add a value to the serial variable...it could be done by using the add action
    add(get(serial),1);
    However it would not change the actual get(serial) value how could that?? The confusion is because the add function works over the variable that is passed as the first argument ( like by reference in programming languages). But by doing the last action nothing is changed, what I mean is that if I use the following code:

    add(get(serial),1);
    showtext(get(serial),infostyle);

    1 it's shown on screen, and nothing changes that... is there something like local variables in krpano??? or how could I add a value to a global variable and then retrieve the changed value?.
    Thanks a lot.

    Hi, well thanks for the help... thanks to that I managed to create a piece of code that should be able to add a hotspot dinamically bu clicking on the screen. However I got a flash error when loading the pano. Specifically it says:

    ArgumentError: Error #1063: Argument count mismatch on krpano::krpano_base/addhotspot(). Expected 1, got 2.
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at krpano::krpano_interface/call()
    at kflashpano::Kactionqueue/process_actions()
    at kflashpano::Kactionqueue/parse_action()
    at kflashpano::Kactionqueue/callaction()
    at krpano::krpano_interface/call()
    at krpano::krpano_events/dispatch()
    at kflashpano::Kpano/mouse_click()


    <action name="addHotspot">
    set(lastCreatedHotspotName,"");
    txtadd(get(lastCreatedHotspotName),'newHotspot',get(serial));
    set(serial,get(serial)+1);
    addhotspot(get(lastCreatedHotspotName));
    set(hotspot[get(lastCreatedHotspotName)].url, 'hotspots/hotspotInfoImage.png');
    set(hotspot[get(lastCreatedHotspotName)].ath, %1);
    set(hotspot[get(lastCreatedHotspotName)].atv, %2);
    set(infoText,"");
    txtadd(get(infoText),get(lastCreatedHotspotName),' clicked');
    set(hotspot[get(lastCreatedHotspotName)].onclick, showlog(); trace(get(infoText)); );
    </action>

    <events onclick="addHotspot(toh,tov)">
    </events>

    What I'm doing wrong? according to documentation that's the correct way to call an action, right?
    Thanks a lot.

    Ok thanks, now I had another doubt while I was adding the hotspot, how could I retrieve the event's click position... The documentation states that we have the events tag, where I would set the actions that I want to execute on the onclick event, but then I would like to do some processing wich the data of the position where I clicked on the screen, ath, atw... etc. Is there a way to retrieve this?.

    Hello, I'm trying to find a way to execute some javascript code defined on the html page that embeds the krpano viewer, however I want to execute that function when a certain action inside the viewer is done, for example onlick, or on hotspot click, etc. I already have seen the javascript interface that allow us to execute an action within a javascript function, but the inverse is possible? An action that executes code on the web page. Thanks a lot.