Be a Supporter!

Action script help!!!

  • 474 Views
  • 23 Replies
New Topic Respond to this Topic
ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Action script help!!! 2005-12-07 17:52:57 Reply

I am using flash mx2004.And i want to create a buttons that makes me go play the movie,scene selectetc and i used the actoinscript:gotoAndPlay(3); but it writes this message when i test the movie:**Error** Scene=Scene 1, layer=Movie, frame=2:Line 1: Statement must appear within onClipEvent handler
gotoAndPlay(3);

Total ActionScript Errors: 1 Reported Errors: 1

Please help


"I need a katana to slice a banana"

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 17:54:39 Reply

ah yhea i already tryed with onclipevent but nothing.
So if you can help me or you have the right code post it here please


"I need a katana to slice a banana"

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 17:55:01 Reply

on(release){
_root.gotoAndPlay(3);
}

toughreviewer
toughreviewer
  • Member since: Oct. 7, 2005
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Action script help!!! 2005-12-07 17:57:14 Reply

At 12/7/05 05:55 PM, Xmas_Blaze wrote: on(release){
_root.gotoAndPlay(3);
}

you probably don't even need the _root

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 17:57:58 Reply

dosn't work

ah yhea its fame 5


"I need a katana to slice a banana"

Tantric
Tantric
  • Member since: Oct. 29, 2005
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to Action script help!!! 2005-12-07 18:01:34 Reply

How hard can this be? :|

Stick this on the button. Make sure it's a button, not a movieclip. It seems you stuck it on an MC judging by your errors.

on(release){
gotoAndPlay(INSERT FRAME NUMBER);
}

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 18:05:37 Reply

At 12/7/05 06:01 PM, SatanicSanta wrote: Stick this on the button. Make sure it's a button, not a movieclip. It seems you stuck it on an MC judging by your errors.

NO. even MC's can have on(release) events. It was on a button, but he just added this

gotoAndPlay(5);

to the topic starter

worked? kthxbai

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 18:26:00 Reply

Look id dosn't work.I will send the movie and you do it for me and send it back k?

on of you give me your e-mail and please can you do it.


"I need a katana to slice a banana"

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 18:29:54 Reply

i dont get what you dont get. But ill explain.

on(release){

thats an onClipEvent (literally). The on, means what will happen if that is done. the thing between parenthesis (release) is what has to happen, the { opens actions so that those actions happen if you do that. Get my drift?

_root.gotoAndPlay(5);

The _root means that it will be in the main stage. For example, if you had a movieclip with the instance name of "thing" without the quotes, and youd want it to goto any frame, youd use _root.thing.gotoAndPlay(blah). Basically, thats how you navigate through things. The _root is the main timeline. Get my drift?

};

Thats just closing the brackets that were opened in a while back, which means, the actions are done.

Again, get my drift? just add

on(release){
_root.gotoAndPlay(5);
};

on the button.

Good luck.

.:Blaze:.

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 18:39:15 Reply

I copy pasted your script and it tells me this:**Error** Scene=Scene 1, layer=Movie, frame=2:Line 3: Statement must appear within on handler
};

Total ActionScript Errors: 1 Reported Errors: 1

God damn flash..


"I need a katana to slice a banana"

Tantric
Tantric
  • Member since: Oct. 29, 2005
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to Action script help!!! 2005-12-07 18:41:50 Reply

At 12/7/05 06:05 PM, Xmas_Blaze wrote:
NO. even MC's can have on(release) events.

Really? I never knew that... :P

Fruitpastles
Fruitpastles
  • Member since: Oct. 13, 2005
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to Action script help!!! 2005-12-07 18:43:57 Reply

craigkewley@msn.com
look if your adding this to a button all you do is highlighjt the button hir f9 and type on(realese){
GoToAndPlay(1);
}

if you dont get it snd me the movie il do it for you

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 18:45:43 Reply

At 12/7/05 06:41 PM, SatanicSanta wrote: Really? I never knew that... :P

then you are fool. ^_^ kidding.

You didnt get it... not after my very evil explanation. What did you do wrong!? Its in the button, right!? then i dont see the error!

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 18:46:21 Reply

dosn't work.Give me your e-mail and i will send it o you


"I need a katana to slice a banana"

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 18:53:47 Reply

At 12/7/05 06:46 PM, DarthKiari wrote: dosn't work.Give me your e-mail and i will send it o you

No thank you. I gave you step to step instructions. I explained the code as best as i could. And all you say is it didnt work? ANSWER MY QUESTION. WHERE THE FUCK DID YOU PUT THE GODDAMN CODE!?

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 18:55:40 Reply

I put it in the actionscrpit baror something by pressing F9 as always.


"I need a katana to slice a banana"

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 18:58:26 Reply

At 12/7/05 06:55 PM, DarthKiari wrote: I put it in the actionscrpit baror something by pressing F9 as always.

while having the button selected. Right?

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 18:58:44 Reply

Yes


"I need a katana to slice a banana"

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 19:03:09 Reply

At 12/7/05 06:58 PM, DarthKiari wrote: Yes

And theres a bloody frame five.

Momo-the-Monkey
Momo-the-Monkey
  • Member since: Oct. 15, 2005
  • Offline.
Forum Stats
Member
Level 45
Musician
Response to Action script help!!! 2005-12-07 19:06:28 Reply

ug...........put this on a BUTTON NOT A MC OR NOTHING

on (release){
gotoAndPlay("1", 5);
}

the "1" is the scene and the 5 is the frame.


Hello, from the past!
[ PHP: Main ]

BBS Signature
ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 19:15:54 Reply

Yes


"I need a katana to slice a banana"

Blaze
Blaze
  • Member since: Aug. 4, 2005
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to Action script help!!! 2005-12-07 19:17:00 Reply

At 12/7/05 07:15 PM, DarthKiari wrote: Yes

then i think youre an alt. -_-

how the fuck could it not work.

ZombieMonkey
ZombieMonkey
  • Member since: Oct. 9, 2004
  • Offline.
Forum Stats
Supporter
Level 19
Melancholy
Response to Action script help!!! 2005-12-07 19:18:24 Reply

How the hell should i know!?


"I need a katana to slice a banana"

keifer121
keifer121
  • Member since: Aug. 31, 2005
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to Action script help!!! 2005-12-07 22:22:06 Reply

First of all do you use Flash 8 if so send me the file ill fix it and send it back to you ok
keifer@kjmproductions.com
keifer121@gawab.com keifer121@gmail.com
keifer@computerguygp.com

lol