# Action script problem

**URL:** https://forum.kirupa.com/t/action-script-problem/2704
**Category:** flash
**Created:** [April 28, 2002, 4:02pm UTC](https://forum.kirupa.com/t/action-script-problem/2704 "2002-04-28T16:02:23Z")
**Posts on this page:** 19
**Page:** 1

<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: [April 28, 2002, 4:02pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/1 "2002-04-28T16:02:23Z")

</div>

OK heres my problem. I have a dynamic text box and a movie clip with a button in it in the same frame. What I want to happen is when you click the button, it will add 1 to the text box. (when I say ‘Add one’ I mean if the text box says 5, after pushing the button, it will equal 6). I hope people understand what I mean, if not, ill try to explain it better.

---

<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: [April 28, 2002, 4:31pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/2 "2002-04-28T16:31:18Z")

</div>

add 1 what?

---

<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: [April 28, 2002, 4:46pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/3 "2002-04-28T16:46:21Z")

</div>

Name your textbox ‘pom’, and then the code for the button should be :

```auto
 on (press) {
    _parent.pom ++ ;
}

```

Let me try.

pom 0]

---

<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: [April 28, 2002, 4:50pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/4 "2002-04-28T16:50:31Z")

</div>

Yep. It works perfectly :smokin:

pom 0]

---

<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: [April 28, 2002, 5:09pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/5 "2002-04-28T17:09:47Z")

</div>

Thanks alot! You saved me a lot of trouble.

---

<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: [April 28, 2002, 7:46pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/6 "2002-04-28T19:46:53Z")

</div>

Hi, hehe, I need another little bit of help. Ok, now say that the button is in one movie clip and the text box is in another, how to i do it. (to see what I wanna do, read the top post)

---

<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: [April 28, 2002, 8:22pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/7 "2002-04-28T20:22:54Z")

</div>

Give the movie clip the \*\* instance name\*\* ilyaslamasse and then the code is

```auto
 on (press) {
    _parent.ilyaslamasse.pom ++ ;
}

```

Let’s explain this a bit, shall we ?

Now, we are inside a movie clip. So \_parent will get us out of the movie clip. If the movie clip is in the \_root, it will bring us in the \_root, but it’s not necessarily the case.

Now that we’re out of the clip, we want to go to the other movie clip, whose INSTANCE NAME is ‘ilyaslamasse’. Hence the \_parent.ilyaslamasse.

Last but not least, pom is the content of the textbox. We increment it. Get it ?

pom 0]

---

<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: [May 1, 2002, 5:26pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/8 "2002-05-01T17:26:48Z")

</div>

Hehe, thanks for your help. now I got another problem, this little bit of action script isnt working, any ideas why?

```auto
 
on (press) {
    _parent._parent.play;
    _parent.stop;
    play ();
}

```

This script is for a button inside movie clip inside a movie clip inside a movie clip.  
When I click the button, it dose the play(); line but not the other two  
Also, when I switch the ActionScript editor from expert mode to normal mode, it dosent detect any errors.

---

<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: [May 1, 2002, 7:35pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/9 "2002-05-01T19:35:02Z")

</div>

There aren’t any errors (except maybe the fact that it’s play \*\* ()\*\* ).  
The problem has to be the path you’re using. Send me the fla, I’ll check it : [ilyas.usal@club-internet.fr](mailto:ilyas.usal@club-internet.fr)

pom 0]

---

<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: [May 1, 2002, 7:58pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/10 "2002-05-01T19:58:41Z")

</div>

Ok, ilyaslamasse, I sent it. If any one else wants to try to get this working, just say so and I’ll send you the same email.

---

<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: [May 1, 2002, 9:11pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/11 "2002-05-01T21:11:57Z")

</div>

That’s what I thought. You have to write play \*\* () ;\*\*.

pom 0]

---

<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: [May 1, 2002, 9:50pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/12 "2002-05-01T21:50:35Z")

</div>

you da man Pom… 🙂

---

<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: [May 1, 2002, 10:46pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/13 "2002-05-01T22:46:55Z")

</div>

Come on… \<img src=http://www.ezboard.com/intl/aenglish/images/emoticons/embarassed.gif ALT=":o"\>

pom 0]

---

<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: [May 3, 2002, 6:50pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/14 "2002-05-03T18:50:03Z")

</div>

Again I come for help because no one is as good as you guys. Hehe. Anyway…

I figured out how to use AS to rotate and scale movie clips but now I need to know how to shift images. I call it shift b/c I dont know the real name (my friend calls it ‘Slanterize’).

If you still dont know what I mean, open up flash, draw something, select it, right click and hit rotate. Now theirs 8 little white circles, the ones on the corners are for normal rotating and the ones between the corners are for the shift thing.

I need to know the code, if any, to do this.

---

<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: [May 3, 2002, 9:40pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/15 "2002-05-03T21:40:59Z")

</div>

ooo good question. Well… if Pom doesn’t know the answer… I’m looking for it… I’d really like to know that too.

---

<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: [May 3, 2002, 10:45pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/16 "2002-05-03T22:45:02Z")

</div>

What do you mean ? You want the code to be able to edit a clip so that you can change the scale and the rotation ? Arghh !!

pom 0]

---

<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: [May 3, 2002, 11:42pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/17 "2002-05-03T23:42:26Z")

</div>

Hmm, how can i explain it,

ok, basicaly I wanna know how to do this with Action script:  
[www.angelfire.com/pokemon2/onlinepics](http://www.angelfire.com/pokemon2/onlinepics)

---

<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: [May 4, 2002, 12:34am UTC](https://forum.kirupa.com/t/action-script-problem/2704/18 "2002-05-04T00:34:23Z")

</div>

skewing w/ AS isnt easy…someone might know…

---

<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: [May 4, 2002, 1:58pm UTC](https://forum.kirupa.com/t/action-script-problem/2704/19 "2002-05-04T13:58:49Z")

</div>

I tried to do it a while ago. And couldn’t. Maybe Thor knows.

pom 0]
