Hi , I'm working on a banner that has an invisble button at the size of the banner that has a hyperlink and 1 rollover that needs to point tho the same url. I already made a cutout in the invisible button so that they don't intersect. But how do I hook up the code for the rollover? TIA!
Assign instance names to the buttons via the Properties panel and in the timeline that contains them add the code for them.
btn1Name.onRelease = openPage;
btn2Name.onRollOver = openPage;
getURL("your link url", "_blank")
Whenever you assign code to something, that something needs to be present. What you should do is either put that button's code where the button is or put the button where the code is. In either case, you need to be sure to have the instance name assigned in every keyframe for it.
Thanks Ned. I'm almost there I think. I've put the button in its unanimated state on a separate layer and put the action on the first frame the button appears. Although I get an error in the compiler window it does work. The error says something like (have to translate this):
fr. instruction has to appear within handle btnName .onRelease = openPage
fr. instruction has to appear within handle function openPage ()