After a hotspot is clicked, a custom movieClip as defined in the config.xml is loaded.
Syntax:
<hotspot id="newExample" type="custom" className="MyCustomHotspot" absolutePosition="true" offsetX="330" offsetY="230" > <movieclip src="images/other/mchotspot.swf" title="Some Title" /> </hotspot>
The movieclip is placed at 0,0 and is not scaled to fit the rotateTool width or height. You must take care so the loaded swf is the right size. Once the movieClip is loaded, the above xml is passed as the parameter in the setData() function, which is called on the loaded movieClip. This way you can pass any data to your swf (just add your nodes to the hotspot node). When the closeButton is clicked, the function destroy() is called on the loaded movieClip.The loaded .swf is very simple, here is it's main class:
package {
import flash.display.MovieClip;
import flash.text.TextField;
public class Main extends MovieClip {
private var _tfText : TextField;
public function Main() {
_tfText = this["tfText"];
_tfText.text = "Status Window";
}
public function setData (xml : XML = null) {
_tfText.text = String(xml);
}
public function destroy():void {
trace(" Destroy Called!");
}
}
}
You can find the .fla of the movieClip in the images/other folder.