Flash free online hotspot editor for AJAX-ZOOM 3D/360/2D player. With the help of this editor you can create multiple hotspots or rectangle image areas and setup several click / mouseover actions for them e.g. links, tooltips, popup lightboxes or bind your own JavaScript functions including AJAX-ZOOM API for several events. The default example is a 360 degrees image set. You can however load any other images like catalogue pages or fotoalbums and create hotspots on single (2D) images as well.
As a result the hotspot editor returns a JSON object with all settings including the positions of the hotspots and / or rectangle image areas. Among other considerable possibilities this JSON object can be saved to a JavaScript file and loaded into any other AJAX-ZOOM example later.
jQuery.fn.axZm.loadHotspotsFromJsFile('../pic/hotspotJS/eos_1100D.js');
(If you will use a database you can just link to any other file which will return JavaScript Object with hotspots configuration.)
This file (example33.php) is the actual hotspots editor which which you can define and edit the hotspots. It is supposed to be in some restricted area of your page. For showing the results and integration of the player into your frontend please use one of the following "clean" examples as the starting point. Also please be aware of that AJAX-ZOOM is highly configurable so you can change the look and feel of nearly everything you could think of.
Sometimes you would want not to put visible hotspots on a spin but only spin to a certain frame and zoom to the area you want to show. In this case we suggest you to take a look at example35.php which is also the main editor for this; there you will find links to "clean" and responsive inplementations.
AJAX-ZOOM offers an extended API to handle hotspots in various ways. In fact the entire hotspot editor is built upon this API. The result of the hotspot configurator is a static configuration saved in a file. However you can also build applications which will set hotspots dynamically depending e.g. on users choice.
If you would like AJAX-ZOOM team to build an application for you, please get in touch with us.
The only difference between any other AJAX-ZOOM implementation / example is that the JavaScript file with JSON data produced by this editor is loaded in AJAX-ZOOM onLoad callback with jQuery.fn.axZm.loadHotspotsFromJsFile API, see below...
Please note that depending on configured hotspots functionality other plugins like Fancybox might be needed!
<!-- jQuery core (>= 1.5), needed! --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <!-- AJAX-ZOOM core, needed! --> <link href="../axZm/axZm.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../axZm/jquery.axZm.js"></script>
<div style="min-width: 100px;"> <div id="abc"> <!-- Content inside target will be removed --> <div style="padding: 20px">Loading, please wait...</div> </div> </div>
// Create empty object var ajaxZoom = {}; // Define callbacks, for complete list check the docs ajaxZoom.opt = { onBeforeStart: function(){ // Set backgrounf color, can also be done in css file jQuery(".axZm_zoomContainer").css({backgroundColor: "#FFFFFF"}); }, onLoad: function(){ // Some settings can be set inline jQuery.axZm.spinReverse = false; // Load hotspots over this function... // or just define jQuery.axZm.hotspots here and trigger jQuery.fn.axZm.initHotspots(); jQuery.fn.axZm.loadHotspotsFromJsFile("../pic/hotspotJS/eos_1100D.js", false, function(){ // Do something after hotspots are loaded }); } }; // Define the path to the axZm folder, adjust the path if needed! ajaxZoom.path = "../axZm/"; // Define your custom parameter query string // example=spinIpad has many presets for 360 images // You can change them in /axZm/zoomConfig.inc.php after elseif ($_GET['example'] == 'spinIpad') // 3dDir - best absolute path to the folder with 360/3D images // for 2D you can use zoomData, e.g. zoomData=/your/path/image1.jpg|/your/otherPath/image2.jpg ajaxZoom.parameter = "example=spinIpad&3dDir=/pic/zoom3d/Uvex_Occhiali"; // The ID of the element where ajax-zoom has to be inserted into ajaxZoom.divID = "abc"; // Fire AJAX-ZOOM jQuery.fn.axZm.load({ opt: ajaxZoom.opt, path: ajaxZoom.path, parameter: ajaxZoom.parameter, divID: ajaxZoom.divID });
These options below are only about possible hotspot settings and not the AJAX-ZOOM player itself. AJAX-ZOOM player can be configured with hundreds of other options to suit anybody's needs. See AJAX-ZOOM documentation and other examples.
Value | Default | Description |
---|---|---|
shape | 'point' | Shape of the hotspot. Possible values "point" or "rect", added Ver. 4.0.5; Type: bool |
enabled | true | State of defined hotspot. Possible values true and false, added Ver. 4.0.5; Type: bool |
width | 32 | Width of the hotspot image, only applied if shape value is "point". Type: integer |
height | 32 | Height of the hotspot image, only applied if shape value is "point". Type: integer |
gravity | 'center' | Hotspot gravity relative to its position. Possible values: 'center', 'topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left'. Only applied if shape value is "point". Type: string |
offsetX | 0 | Adjustment of hotspots horizontal visual position. Only applied if shape value is "point". Type: integer |
offsetY | 0 | Adjustment of hotspots vertical visual position. Only applied if shape value is "point". Type: integer |
padding | 0 | Padding of the box with hotspot image and/or text. Type: integer |
opacity | 1 | Default opacity, disabled in IE < 9; Type: float <= 1.0 |
opacityOnHover | 1 | Opacity on mouse hover, disabled in IE < 9; Type: float <= 1.0 |
backColor | 'none' | Background color, added Ver. 4.0.5; Type: string |
zIndex | 1 | zIndex of the hotspot. Type: integer |
borderWidth | 0 | CSS border width, added Ver. 4.0.5; Type: integer |
borderColor | 'red' | CSS border color, added Ver. 4.0.5; Type: string |
borderStyle | 'solid' | CSS border style, e.g. 'none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset' or combinations of them, added Ver. 4.0.5; Type: string |
cursor | 'pointer' | Mouse cursor. Type: string |
zoomRangeMin | 0 | Min zoom level for hotspot to be shown, added Ver. 4.0.6; Type: 0 <= integer <= 100 |
zoomRangeMax | 100 | Max zoom level for hotspot to be shown, added Ver. 4.0.6; Type: 0 <= integer <= 100 |
hotspotImage | 'hotspot64_green.png' | PNG image for the hotspot located in /axZm/icons directory, only applied if shape value is "point". Ver. 4.0.6+ image can be any absolute path with and without http. Type: string |
hotspotImageOnHover | false | PNG image for the hotspot on mouse hover, only applied if shape value is "point". Ver. 4.0.6+ image can be any absolute path with and without http. Type: string |
hotspotText | false | Text puten direct over the hotspot image, can be for example a number if shape value is point; can be also HTML. Type: false or string |
hotspotTextFill | false | If shape value is "rect" the rectange does not capture mouse events like click. Setting this value to true will set the inner box to 100% height capturing all events except mousescroll for zooming. Any css can be overriden with hotspotTextCss option, see below, added Ver. 4.0.5; Type: bool |
hotspotTextClass | false | Additionally to CSS class ".axZmHotspotText" add on ther CSS class to hotspotText layer, added Ver. 4.0.5; Type: false or string |
hotspotTextCss | {} | Additionally to CSS class ".axZmHotspotText" css which is added to hotspotText layer, added Ver. 4.0.5; Type: object |
hotspotObjects | {} | Any number of absolutely positioned layers directly inside the hotspot if shape value is "rect", added Ver. 4.0.5; Type: object |
altTitle | false | Show system like tootip by mousehover if main tooltip is triggered on click (toolTipEvent); CSS class: axZmHoverTooltip; Type: false or string |
altTitleClass | false | CSS class for altTitle instead of axZmHoverTooltip class, added Ver. 4.0.6; Type: false or string |
altTitleAdjustX | 20 | Horizontal offset of the altTitle, added Ver. 4.0.6; Type: integer |
altTitleAdjustY | 20 | Vertical offset of the altTitle, added Ver. 4.0.6; Type: integer |
labelTitle | false | Sticky label (or tooltip) at any position near a hotspot, accepts HTML, added Ver. 4.0.6; Type: string |
labelGravity | 'left' | Label gravity, possible values: 'topLeft', 'topLeftFlag1', 'topLeftFlag2', 'top', 'topRight', 'topRightFlag1', 'topRightFlag2', 'right', 'rightTopFlag1', 'rightTopFlag2', 'rightBottomFlag1', 'rightBottomFlag2', 'bottomRight', 'bottomRightFlag1', 'bottomRightFlag2', 'bottom', 'bottomLeft', 'bottomLeftFlag1', 'bottomLeftFlag2', 'left', 'leftTopFlag1', 'leftTopFlag2', 'leftBottomFlag1', 'leftBottomFlag2', 'center', added Ver. 4.0.6; Type: string |
labelBaseOffset | 5 | Auto offset in all directions, added Ver. 4.0.6; Type: integer |
labelOffsetX | 0 | Horizontal offset, added Ver. 4.0.6; Type: integer |
labelOffsetY | 0 | Vertical offset, added Ver. 4.0.6; Type: integer |
labelClass | false | CSS class instead of axZmHotspotLabel, added 4.0.6; Type: false or integer |
labelOpacity | 1 | Opacity level, added 4.0.6; Type: float <= 1.0 |
toolTipTitle | false | Title shown in the tooltip; Ver. 4.2.1+ value can be also a function which returns a string or HTML; in case the value is a function the first parameter passed to it is an object with all configs of this hotspot including name. Type: false, string or function |
toolTipHtml | false | Text or html inside tooltip, as idea it can be also iframe, e.g. <iframe src="http://www.ebay.de" scrolling="no" width="100%" height="100%" frameborder="0"></iframe> Ver. 4.2.1+ value can be also a function which returns a string or HTML; in case the value is a function the first parameter passed to it is an object with all configs of this hotspot including name. Type: false, string or function |
toolTipAjaxUrl | false | Url for toolTipHtml get from AJAX request (not cross site, for cross site use an iframe inside toolTipHtml); Type: false or string |
toolTipWidth | 250 | Width of the tooltip, ignored when toolTipGravity is set to fullsize or fullscreen! Type: integer |
toolTipHeight | 120 | Min height of the tooltip, ignored when toolTipGravity is set to fullsize or fullscreen! Type: integer |
toolTipGravity | 'hover' | Tooltip gravity, possible values: 'hover', 'fullsize', 'fullscreen' (added Ver. 4.0.6), 'topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left'. The difference between 'fullsize' and 'fullscreen' is that 'fullsize' refers to players dimensions, whereas 'fullscreen' to window size. Type: string |
toolTipGravFixed | false | Applies fixed position to toolTipGravity except 'fullsize', 'hover' turns into centered position. Type: bool |
toolTipFullSizeOffset | 40 | toolTipGravity fullsize uses maximal available player / window width and height. This is the margin to the edges if e.g. toolTipGravity is 'fullscreen', 'fullsize' or toolTipGravFixed option is set to true, so the fixed position is relative to the player size. Type: integer |
toolTipTitleCustomClass | false | Use specific classname instead of axZmToolTipTitle, added Ver. 4.0.5; Type: false or string |
toolTipCustomClass | false | Use specific classname instead of axZmToolTipInner. Type: false or string |
toolTipAdjustX | 10 | Horizontal offset. Type: integer |
toolTipAdjustY | 10 | Vertical offset; Type: integer |
toolTipAutoFlip | true | Flip tooltip horizontaly / vertically depending on best fit. Type: bool |
toolTipOpacity | 1.0 | Opacity of the tooltip. Type: float <= 1.0 |
toolTipFade | false | Fade tooltip time in ms. Type: false or integer |
toolTipEvent | 'click' | 'mouseover' or 'click', defaults to 'click' on touch devices. Type: string |
toolTipClickClose | true | When clicked on the hotspot with already opened toolTip from the same hotspot, the toolTip will be closed, added Ver. 4.2.1 Type: bool |
toolTipHideTimout | 1000 | If toolTipEvent is 'mouseover' this setting allows to move the cursor to the tooltip within this time. Type: integer |
toolTipDraggable | true | Set tooltip to be draggable, toolTipTitle has to be defined because this is the handle, can be an empty div. Type: bool |
toolTipCloseIcon | 'fancy_closebox.png' | PNG image for close button located in /axZm/icons directory. Shown if toolTipEvent is 'click' and touch devices. Ver. 4.0.6 can be absolute image path, also with http; Type: string |
toolTipCloseIconPosition | 'topRight' | Position of the close icon, possible values are: 'topLeft', 'topRight', 'bottomRight' and 'bottomLeft', added Ver. 4.0.5; Type: string |
toolTipCloseIconOffset | false | Offset / position of the close button icon. If false the offset is set instantly. An integer sets depending on toolTipCloseIconPosition - top, bottom or left, right position to this number. If object, e.g. {"right": 20, "top": 0} toolTipCloseIconPosition is ignored. Changed in Ver. 4.0.5; Type: false, integer or object |
toolTipCloseIconMouseOver | false | Show close button also if toolTipEvent is 'mouseover'. Type: bool |
toolTipOverlayShow | false | Show overlay when tooltip window pops up, added Ver. 4.0.5; Type: bool |
toolTipOverlayOpacity | 0.75 | Overlay opacity, added Ver. 4.0.5; Type: float <= 1 |
toolTipOverlayColor | '#000000' | Overlay color, added Ver. 4.0.5; Type: integer |
toolTipOverlayClickClose | false | Close tooltip by clicking on the overlay, added Ver. 4.0.5; Type: bool |
href | false | Simple link for the hotspot. |
hrefTarget | '_blank' | Target for href (simple link), possible values: _blank (new window), anything else is same window. Type: string |
click | null | Your custom click event function, e.g. simple fancybox gallery:
jQuery.fancybox( [{ 'href': '/path/some/image1.jpg', 'title': 'Description 1 image' },{ 'href': '/path/other/image2.jpg', 'title': 'Description 2 image' }], { 'padding': 0, 'transitionIn': 'none', 'transitionOut': 'none', 'type': 'image', 'titlePosition': 'over', 'changeFade': 0 });AJAX-ZOOM does not require fancybox, so fancybox JavaScripts and CSS files need to be included in the document. The above code is just an example of a lightbox usage; it can be any other lightbox where you could define images to be displayed in a simmilar way. Please note that toolTip* options e.g. toolTipHtml would produce a popup which looks simmilar to fancybox, but they do not require fancybox JavaScript and CSS files. |
onRender | null | Ver. 4.1.3+ Your custom function when a particlar hotspot is added to the DOM; receives name of the hotspot as argument |
mouseover | null | Your custom mouseover event function |
mouseout | null | Your custom mouseout event function |
mouseenter | null | Your custom mouseenter event function |
mouseleave | null | Your custom mouseleave event function |
mousedown | null | Your custom mousedown event function |
mouseup | null | Your custom mouseup event function |
position | {} | position is a JS object with the positions of a particular hotspot, e.g.position: { 1: {left: 1500, top: 720 }, 3: {left: 660, top: 710 }, 4: {left: 760, top: 510 } }The keys (1,2,3 ...) can be numbers (starting from 1, not 0) or filenames of particular frames. In case a key is omited the hotspot will not be shown in that particular frame. If shape value is 'rect' each value of position object needs to have 'width' and 'height', e.g. position: { 1: {left: 300, top: 720, width: 300, height: 300 }, 3: {left: 660, top: 710, width: 200, height: 350 }, 4: {left: 760, top: 510, width: 700, height: 220 } }The 'left', 'top', 'width' and 'height' values can be pixel values related to original size of the image or percentage values (e.g. left: '45.75%', top: '37.3%'). |
Below are only couple settings you can set right away.
/pic/zoom/animals/test_animals1.png
"/pic/zoom/animals/test_animals1.png|/pic/zoom/animals/test_animals2.png
"/pic/zoom/animals
"
/pic/zoom3d/Uvex_Occhiali
";
/pic/zoomVR/nike
" /pic/hotspotJS/eos_1100D.js
"When you hit the "LOAD" button the parameters entered are passed to the function "changeAxZmContentPHP" located in "/axZm/extensions/jquery.axZm.hotspotEditor.js", which basically just reloads the player same way it is loaded when the page is opened.
There are also different ways of loading and saving hotspot configuration parameters besides loading a static JavaScript file. For example you could point to /some/dyn_language/file.do?hotspotID=123 which would return the JSON object stored in a database. If you use the API function jQuery.fn.axZm.loadHotspotsFromJsFile then you have to reference jQuery.axZm.hotspots variable to the returned JSON object from your /some/dyn_language/file.do (the return of this file is expected to be JavaScript - without script tags).
Alternatively define jQuery.axZm.hotspots wherever after AJAX-ZOOM is initialized, e.g. onBeforeStart callback (or later at any time) and "manually" init the hotspots with jQuery.fn.initHotspots()
Taking the above one step farther you can also build applications which will set hotspots dynamically depending e.g. on users choice or action. example34 shows such an application, where hotspots are created dynamically and highlight choosen words in the text (saved as image).