# Whats wrong with this action script?

**URL:** https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623
**Category:** flash
**Created:** [February 11, 2004, 5:10am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623 "2004-02-11T05:10:56Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![zeka](https://avatars.discourse-cdn.com/v4/letter/z/c6cbf5/32.png) [@zeka](https://forum.kirupa.com/u/zeka)
#### Post date: [February 11, 2004, 5:10am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/1 "2004-02-11T05:10:56Z")

</div>

I have a mc called display and I have a button. This button is inside another mc.When the button is pressed i want the movieclip mc to go to frame label “tv” (obviously with out the quotation marks). this is what i have

on (release) {  
\_root.display (gotoAndPlay (“tv”);  
}

why is this not working? :huh:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:00am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/2 "2004-02-11T06:00:16Z")

</div>

hey zeka and welcome to action script. Are you ready to kick yourself??? 🙂

```auto
on (release) {
_root.display (gotoAndPlay ("tv"));
}

```

gotta remember to close those parenthesis. :)a

dont’ worry about it though… the day before yesterday I spent 5 hours working on a php error only to find out that I was using a variable “Verify” in some places and a “verify” in others’. Using Arial font… the capitol and lower case v look almost identical. You can’t believe how I screemed when I saw my error.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:04am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/3 "2004-02-11T06:04:56Z")

</div>

It should be [AS]on (release){  
\_root.display.gotoAndPlay(“tv”);  
}[/AS]

Your gotoAndPlay statement was executed improperly.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:08am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/4 "2004-02-11T06:08:31Z")

</div>

cant get it to work. ill attach it.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:09am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/5 "2004-02-11T06:09:40Z")

</div>

hate that :trout:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:16am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/6 "2004-02-11T06:16:30Z")

</div>

oh man… lost… what the heck is up with my head today. I was so concentrated on the missing paran I missed the fact that the code was just plain wrong.

alright… that’s it, I’m giving up crack for good this time.

(please excuse my brain fart… I have no clue why I missed that.)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:29am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/7 "2004-02-11T06:29:13Z")

</div>

so… Whats wrong with it?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:30am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/8 "2004-02-11T06:30:41Z")

</div>

You know what david, don’t even worry about it. WHen I first looked at the post, offhand I saw a missing parenthesis… but then I realized… “why is there an open parenthesis before a gotoAndPlay?” and I took a second glance and realized the problem.

🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:32am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/9 "2004-02-11T06:32:42Z")

</div>

> \*Originally posted by zeka \*  
> \*\*so… Whats wrong with it? \*\*

Oop

Just loooked at your .fla

The problem is first because of what was just stated… and second because you can’t use numbers as frame labels. A frame label can contain a number, but it cannot just be, or start with a number.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:42am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/10 "2004-02-11T06:42:47Z")

</div>

can you please post the fla?  
EDIT : dont worry, got it to work

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 11, 2004, 6:47am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-action-script/42623/11 "2004-02-11T06:47:13Z")

</div>

What do you need me to post the .fla for?

The on(release) code is in my previous post (3rd post from the top) and the rest is changing the frame labels so they aren’t plain numbers. Like changing “1” to “f1” or whatever.
