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.
Posts by pablo_ivan57
-
-
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.XML
Display More<?xml version="1.0" encoding="UTF-8"?> <krpano onstart="startup();"> <textStyle name="infostyle" origin="top" edge="top" yoffset="20" textalign="center" background="false" border="false" fontsize="40" textColor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);" showtime="4.0" fadetime="1.0" fadeintime="1.0"/> <action name="startup">loadscene(get(scene[0].name),null,MERGE);</action> <!-- Plugin where user can click to start tagging --> <include url="%SWFPATH%/panotag/panotag_config.xml"/> <include url="%SWFPATH%/panotag/panotag_tagging.xml"/> <plugin name="panotag" url="%SWFPATH%/panotag/PanoTag.swf" style="panotag-plugin-style" visible="false" preload="true" devices="flash"/> <plugin name="fovconversion" url="%SWFPATH%/panotag/FovConversion.swf" devices="flash"/> <!-- Plugin where user can click to start tagging --> <plugin name="panotag-startTag" devices="flash" url="panotag-button.png" alpha="1" align="topright" x="10" y="10" ondown="panotag-start()" onup="panotag-do()" panofulltext="Unable to add more tags to this panorama" keep="true" /> <!-- Plugin which follows the mouse to place a new tag --> <style name="panotag-tagger" url="panotag-tagger.png" edge="center" alpha="0.9" devices="flash"/> <plugin name="panotag-tagger" style="panotag-tagger" devices="flash" x="-10000000000" y="-10000000000" align="topleft" zorder="1" /> <style name="hotspot_arrow_1" url="hotspot/go_top_icon.png"/> <scene name="Biblioteca" title="Biblioteca"><view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fovmin="40"/><preview url="http://localhost/drupal6/sites/default/files/panoramas/MitadMundo100/MitadMundo100.tiles/preview.jpg"/><image type="CUBE" multires="true" tilesize="671" progressive="false"> <level tiledimagewidth="2013" tiledimageheight="2013"> <cube url="http://localhost/drupal6/sites/default/files/panoramas/MitadMundo100/MitadMundo100.tiles/%s_%0v_%0h.jpg"/> </level> </image></scene><scene name="Patio Central" title="Patio Central"><view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fovmin="40"/><preview url="http://localhost/drupal6/sites/default/files/panoramas/NeckarBridge/NeckarBridge.tiles/preview.jpg"/><image type="CUBE" multires="true" tilesize="796" progressive="false"> <level tiledimagewidth="1592" tiledimageheight="1592"> <cube url="http://localhost/drupal6/sites/default/files/panoramas/NeckarBridge/NeckarBridge.tiles/%s_%0v_%0h.jpg"/> </level> </image></scene></krpano>
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. -
Thanks a lot for your response... but don't think it's exactly what I'm looking for. Take a look at https://krpano.com/plugins/userplugins/panotag/#top%20 I want the drag and drop functionallity of that plugin.
-
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:
Code
Display More<plugin name="newhotspot2P" url="%SWFPATH%/plugins/textfield.swf" align="center" width="500" height="300" x="0" y="-1100" visible="false" html="data:newhotspot2D" css="data:newhotspot2C" roundedge="0" borderwidth="1" textcolor="0x000000" bordercolor="0xFFFFFF" backgroundcolor="0xFFFFFF" selectable="false" shadow="5" autosize="center" keep="true"/> <data name="newhotspot2D"><div style="border: 1px solid black; width: 500px;height:250px;"> <div style="border: 1px solid black;float: left; width: 350px;height: 100%"/> <div style="border: 1px solid black;float: left; width: 145px;height: 100%"> <img src="" style="border: 1px solid black;margin: 10px; width: 100px;"/> <img src="" style="border: 1px solid black;margin: 10px;"/> <img src="" style="border: 1px solid black;margin: 10px;"/> </div> </div> <div>Esta nota de krpano el drag lo hace muy suave, hay que mover bastante en direccion vertical para que coja</div> </data> </scene>
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:
XML
Display More<?xml version="1.0" encoding="UTF-8"?> <krpano onstart="startup();"> <plugin name="newhotspot1P" url="%SWFPATH%/plugins/textfield.swf" align="center" width="500" height="300" x="0" y="-1100" visible="false" html="data:html1" css="data:css1" roundedge="0" borderwidth="1" textcolor="0x000000" bordercolor="0xFFFFFF" backgroundcolor="0xFFFFFF" selectable="false" shadow="5" autosize="center"/> <action name="startup">loadscene(get(scene[0].name),null,MERGE);</action> <action name="show_hotspot_html_field"> set(plugin[newhotspot1P].y,-1500); tween(plugin[newhotspot1P].alpha,1,0); tween(plugin[newhotspot1P].textblur,0,0); tween(plugin[newhotspot1P].blur,0,0); set(plugin[newhotspot1P].visible,true); showtext(get(plugin[newhotspot1P].visible),infostyle); set(plugin[newhotspot1P].enabled,true); tween(plugin[newhotspot1P].y,0); </action> <textStyle name="infostyle" origin="top" edge="top" yoffset="20" textalign="center" background="false" border="false" fontsize="40" textColor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);" showtime="4.0" fadetime="1.0" fadeintime="1.0"/> <data name="html1" devices="desktop|tablet"><p align="center"><font face="times" size="16px" style="font-family:times; font-size:16px;"><b>Hello from Textfield HTML</b></font></p><a href="event:action(loadpano);"></a> styles test:<br/><b>bold</b><br/><i>italic</i><br/><u>underlined</u><br/><br/> links test:<br/><a href="http://www.krpano.com">open krpano site</a><br/><a href="event:lookto(0,0,130);lookto(90,0,150);">do some lookto actions</a><br/><a href="event:action(move,htmltext);">click to move field</a><br/><a href="event:action(show_html_field2);">open second field</a><br/><br/> color test:<br/><font color="#FF0000">red </font><font color="#00FF00">green </font><font color="#0000FF">blue</font><br/><br/><br/><br/><p align="left"> left align test left align test left align test left align test left align test<br/> left align testleft align testleft align test<br/></p><p align="center"> center align test center align test center align test center align test center align test<br/> center align test center align test center align test<br/></p><p align="right"> right align test right align test right align test right align test right align test<br/> right align test right align test right align test<br/></p><p align="center"><font size="16px" style="font-size:16px;"><a href="event:action(hidewindow,htmltext);action(showbutton);">close window</a><br/></font></p></data><data name="html1" devices="mobile"><p align="center"><font face="times" size="16px" style="font-family:times; font-size:16px;"><b>Hello from Textfield HTML</b></font></p><a href="event:action(loadpano);"><img src="image.jpg" style="float:left; padding:8px;" width="160px" height="106px"/></a> styles test:<br/><b>bold</b><br/><i>italic</i><br/><u>underlined</u><br/><br/> links test:<br/><a href="http://www.krpano.com">open krpano site</a><br/><a href="event:lookto(0,0,130);lookto(90,0,150);">do some lookto actions</a><br/><a href="event:action(move,htmltext);">click to move field</a><br/><a href="event:action(show_html_field2);">open second field</a><br/><br/> color test:<br/><font color="#FF0000">red </font><font color="#00FF00">green </font><font color="#0000FF">blue</font><br/><br/><br/><br/><p align="left"> left align test left align test left align test left align test left align test<br/> left align testleft align testleft align test<br/></p><p align="center"> center align test center align test center align test center align test center align test<br/> center align test center align test center align test<br/></p><p align="right"> right align test right align test right align test right align test right align test<br/> right align test right align test right align test<br/></p><p align="center"><font size="16px" style="font-size:16px;"><a href="event:action(hidewindow,htmltext);action(showbutton);">close window</a><br/></font></p></data><data name="css1"> a { text-decoration:underline; color:#110088; font-weight:bold; } a:hover { color:#885500; } </data> <data name="css1"> a { text-decoration:underline; color:#110088; font-weight:bold; } a:hover { color:#885500; } </data> <style name="hotspot_arrow_1" url="%SWFPATH%/hotspot/go_top_icon.png"/> <style name="hotspot_info_1" url="%SWFPATH%/hotspot/hotspotInfoImage.png"/> <style name="hotspot_info_2" url="%SWFPATH%/hotspot/infoHotspot.png"/> <scene name="Biblioteca" title="Biblioteca"><view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fovmin="40"/><preview url="http://localhost/drupal6/sites/default/files/panoramas/MitadMundo100/MitadMundo100.tiles/preview.jpg"/><image type="CUBE" multires="true" tilesize="671" progressive="false"> <level tiledimagewidth="2013" tiledimageheight="2013"> <cube url="http://localhost/drupal6/sites/default/files/panoramas/MitadMundo100/MitadMundo100.tiles/%s_%0v_%0h.jpg"/> </level> </image> <hotspot name="Patio Central" style="hotspot_arrow_1" atv="0.0" ath="237.40327424703" zoom="false" onclick="looktohotspot(get(name)); loadscene('Patio Central',null,MERGE,BLEND(1));"/> <hotspot name="newhotspot1" style="hotspot_info_2" atv="-9.661224858825133" ath="75.46221185677985" zoom="false" onclick="show_hotspot_html_field(get(name))"/> <hotspot name="newhotspot2" style="hotspot_info_2" atv="-4.69816161916203" ath="-11.774628504220686" zoom="false"/> </scene><scene name="Patio Central" title="Patio Central"><view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fovmin="40"/> <preview url="http://localhost/drupal6/sites/default/files/panoramas/NeckarBridge/NeckarBridge.tiles/preview.jpg"/> <image type="CUBE" multires="true" tilesize="796" progressive="false"> <level tiledimagewidth="1592" tiledimageheight="1592"> <cube url="http://localhost/drupal6/sites/default/files/panoramas/NeckarBridge/NeckarBridge.tiles/%s_%0v_%0h.jpg"/> </level> </image><hotspot name="Biblioteca" style="hotspot_arrow_1" atv="0.0" ath="57.403274247033" zoom="false" onclick="looktohotspot(get(name)); loadscene('Biblioteca',null,MERGE,BLEND(1));"/> </scene> </krpano>
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.
-
No. it wasn't on a touch device, I am testing on the krpano web viewer web viewer. I'll try updating also, Thanks...
-
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.