I’m trying to create a simple map in AS3.
Basic actions:
- Rolling over a dot presents another movie-clip.
- This movie-clip acts like a drop down menu. You can roll-on, click an active link, or make the movie-clip disappear when you roll-off.
Now, I don’t think my version is fully compatible with AS3 since I’m still getting an output warning message that states:
’WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.'
I guess my question is, can I do this more efficiently and how?
Is my hyperlink link information (within the movie-clip) efficient? Can this be done outside of the movie-clip, maybe main time-line?
Is there a better way to turnoff the clip (on roll-off), rather than having code on the invisible button (within the bubbleclip) do it?
I have attached a working example.
example code (use as reference)
// Code that enables bubbleclip from the main timeline.
invis.addEventListener(MouseEvent.ROLL_OVER,roll);
function roll(event:MouseEvent):void {
bubbleClip.gotoAndPlay(11);
}
**// invisible movieClip Code (it is inside bubbleclip) that makes bubble **disappear on roll_off.
function invisClipOver(event:MouseEvent):void {
gotoAndPlay(“stop”);
}
invisiClip.addEventListener(MouseEvent.ROLL_OVER,invisClipOver);
// hyperlink code
function init(){
hearst.web1.addEventListener(MouseEvent.CLICK, weblink);
}
init();
function weblink(event:MouseEvent)
{
navigateToURL(web, “_blank”);
}