Tooltips and smart scale plugins
Two more open source plugins: long-awaited ToolTips and SmartScale plugin.
ToolTips plugin is very simple: add alt tag to all hotspots you want to see the tooltips:
<spot id="left" alt="move left" static="1" align="BC" salign="BC" staticX="-225.5" staticY="-5" url="images/black_l.png" />
<spot id="right" alt="move right" static="1" align="BC" salign="BC" staticX="-150.5" staticY="-5" url="images/black_r.png" />
ToolTips plugin searches and shows alt tags using nice yellow box. That’s all, nice and easy.
So alt tag is a part of Hotspots code, you can change it dynamically, I’m using in example above:
onEnterFullscreen="full.alt=exit fullscreen" onExitFullscreen="full.alt=enter ullscreen"
This code is changing the tip for fullscreen button depends on the stage state.
SmartScale works with hotspots too. It searches tags with smartStale=”1″ attribute and changes the scale and positions of navigation buttons depends on the screen width (good for flexible windows). This functionality cannot be done using Hotspots script so it doesn’t support conditions. But some Actionscript in the plugin did the trick.
Linear scaling looks a little inaccurate (too big buttons if your screen is really wide), so I added an additional scale mode in SmartScale plugin: it reduces the size of buttons only if the width is less than 800. It prevents missing buttons if your screen is small, but it do not scale the buttons more than 100%. Check the second example.
This second scale mode is switching on by additional parameter in XML:
Both examples are good if you want to create your own plugin to work with Flash Panorama Player hotspots.
This entry was posted on Saturday, November 17th, 2007 at 1:27 pm and is filed under Flash, Flash Panorama Player. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.