Sorry for being a dummy but I purchased a Flash template and am trying to modify a button. Currently there are two actions attached to it:
on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(11);
}
These commands are working fine and call for an animation of the button on rollOver and back to normal on rollOut.
I am trying to add an onrelease/geturl command at the end of the above commands, however, when I do and then cursor over the button, the rollover and rollout states cycle madly until I move the cursor away from the button. How can I preserve the rollOver/rollOut and still have the onRelease work without this conflict?
hmm most likely because after you release it going back to rollOver, but i really dont think thats the problem, but it could be.
First make sure your code looks like this…if it doesnt work ill have another solution for you.
on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(11);
}
on(release){
getURL("kirupa.com","_blank");
}
If that doesnt work make an invisible button. to do that make a box over your existing button on a new layer. f8 to conver to symbol, make it a button. go into the button and drag the keyframe all the way to hit. then when u go to your main timeline you should see a blue box, that is your invisble button and add the get url actions to there.
Thank you very much for your post. I really appreciate your help…
As for the code, yes, that is what I had and that is what caused the button to cycle through the button states/animation repeatedly. See www.mediapresenter.info/index-new.html specifically the “home” button. That’s my problem.
I tried to create the transparent box as you explained but it blocked the button underneath so the rollover didn’t work unless I strayed outside the transparent box boundaries. Should it do that?