# getUrl is canceling out animations

**URL:** https://forum.kirupa.com/t/geturl-is-canceling-out-animations/258333
**Category:** flash
**Created:** [April 23, 2008, 5:01am UTC](https://forum.kirupa.com/t/geturl-is-canceling-out-animations/258333 "2008-04-23T05:01:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![SteelCity](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@SteelCity](https://forum.kirupa.com/u/SteelCity)
#### Post date: [April 23, 2008, 5:01am UTC](https://forum.kirupa.com/t/geturl-is-canceling-out-animations/258333/1 "2008-04-23T05:01:59Z")

</div>

This is AS2. I have a mc that is functioning as a button. On the mc timeline the actions frame contains the code at the bottom, and it everything works fine. Except when I try to add the getUrl statement. Here is the statement  
on (release) {  
getURL(“[http://mysite.com](http://mysite.com)”, “\_blank”) ;  
}  
here is how I try to add it.  
When I’m on the main timeline, I click on the mc. then I click on the actions panel then I insert the above code. When I do, Then all the animations etc. in the button is cancelled out, but It does get the url.  
How do I get both the animations and the geturl to work together.  
below is the code contained inside the mc. please help

// When mouse pointer over the button  
box\_color.onRollOver = function() {  
box\_color\_play = 1;  
blickSound.start();  
};  
// When mouse pointer out of the button  
box\_color.onRollOut = function() {  
box\_color\_play = 0;  
};  
// When mouse pointer click to button  
box\_color.onRelease = function() {  
//\_root.gotoAndPlay(“your\_label”);  
// play the box\_highlight\_mc animation  
box\_highlight.play();

};

clickSound = new Sound();  
clickSound.attachSound(“busound01”);  
box\_color.onRelease = function () {  
clickSound.start();  
}  
blickSound = new Sound();  
blickSound.attachSound(“s162”);

box\_color.onEnterFrame = function() {  
if ((box\_color.\_currentframe != box\_color.\_totalframes) || (box\_color.\_currentframe != 0)) {  
if (box\_color\_play == 1) {  
box\_color.nextFrame();  
}  
if (box\_color\_play == 0) {  
box\_color.prevFrame();  
}  
}  
};
