Action script problem

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.

add 1 what?

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

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

Let me try.

pom 0]

Yep. It works perfectly :smokin:

pom 0]

Thanks alot! You saved me a lot of trouble.

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)

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

 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]

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

 
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.

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 : [email protected]

pom 0]

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.

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

pom 0]

you da man Pom… :slight_smile:

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

pom 0]

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.

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

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]

Hmm, how can i explain it,

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

skewing w/ AS isnt easy…someone might know…

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

pom 0]