# Complex Button Help !URGENT!

**URL:** <https://forum.kirupa.com/t/complex-button-help-urgent/169577>\
**Category:** Uncategorized\
**Created:** [November 17, 2005, 12:34pm UTC](https://forum.kirupa.com/t/complex-button-help-urgent/169577 "2005-11-17T12:34:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![will\_roberts](https://avatars.discourse-cdn.com/v4/letter/w/4da419/32.png) [@will\_roberts](https://forum.kirupa.com/u/will_roberts)\
**Post date:** [November 17, 2005, 12:34pm UTC](https://forum.kirupa.com/t/complex-button-help-urgent/169577/1 "2005-11-17T12:34:59Z")

</div>

Hi Kirupians,

i have been doing the complex button tutorial off this site and have come across a problem.

I am trying to use the complex button tutorial in conjuction with some more code to control a movie.

The actionscript for the button is as follows

```auto

 
[color=#cc00cc]//stop();[/color] 
 
[color=#0000d0]this[/color].[color=#0000d0]onEnterFrame[/color] [color=#0000ff]=[/color] [color=#006610]function[/color][color=#0000ff](){[/color] [color=#006610]if[/color][color=#0000ff]([/color][color=#000050]rewind[/color] [color=#0000ff]==[/color] [color=#006610]true[/color][color=#0000ff]){[/color] [color=#0000d0]prevFrame[/color][color=#0000ff]()[/color]; [color=#0000ff]}[/color] [color=#0000ff]}[/color] 
[color=#0000d0]this[/color].[color=#0000d0]onRollOver[/color] [color=#0000ff]=[/color] [color=#006610]function[/color][color=#0000ff](){[/color] [color=#000050]rewind[/color] [color=#0000ff]=[/color] [color=#006610]false[/color]; [color=#0000d0]play[/color][color=#0000ff]()[/color]; [color=#0000ff]}[/color] 
[color=#0000d0]this[/color].[color=#0000d0]onRollOut[/color] [color=#0000ff]=[/color] [color=#006610]function[/color][color=#0000ff](){[/color] [color=#000050]rewind[/color] [color=#0000ff]=[/color] [color=#006610]true[/color]; [color=#0000ff]}[/color] 
[color=#0000d0]this[/color].[color=#0000d0]onRelease[/color] [color=#0000ff]=[/color] [color=#006610]function[/color][color=#0000ff](){[/color] 
[color=#0000d0]getURL[/color][color=#0000ff]([/color][color=#666666]"http://www.kirupa.com"[/color],[color=#666666]"_blank"[/color][color=#0000ff])[/color]; [color=#0000ff]}[/color] 

```

but i dont want to get a url when clicked! instead i want to control a movie using this code

```auto

on(press){if (mainbox_MC._currentFrame >=1 && mainbox_MC._currentFrame !=6){
				mainbox_MC.gotoAndPlay(2);}
		else if (mainbox_MC._currentFrame == 30){
				mainbox_MC.stop();}
}

```

Can somebody please help me mix this code so i have my working buttons?

Thanks very much in advance

I am pretty new to flash but im thinking the problem may lie in the actionscript calling the movie from within the button rather than the root??
