Be a Supporter!

Help With Actionscript..

  • 321 Views
  • 7 Replies
New Topic Respond to this Topic
TvP
TvP
  • Member since: Apr. 27, 2003
  • Offline.
Forum Stats
Member
Level 19
Blank Slate
Help With Actionscript.. 2004-08-02 14:13:30 Reply

sup, I have a question for this game im making. I need a movie clip, the 'object' to move from point A to point B. But, I need a code for when you touch the 'object' with your mouse, it send you to Scene 2, Frame 1 and stop.

So basically its a movie clip button? I can't get it to work. Please help.


BBS Signature
otacon
otacon
  • Member since: May. 23, 2004
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to Help With Actionscript.. 2004-08-02 14:22:00 Reply

Touch? You mean mouseover? Or when you click it? If its mouse over use this:

on (rollOver) {
gotoAndStop("Scene 2", 1);
}

put that on a movie clip or button symbol or whatever you have.

However, if it is a click, replace rollOver with "release"

Valtrix
Valtrix
  • Member since: Jun. 26, 2004
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to Help With Actionscript.. 2004-08-02 14:24:10 Reply

Put a button inside the movie clip with a code something like

on (release) {
nextScene();
}

I hope that helps.

TvP
TvP
  • Member since: Apr. 27, 2003
  • Offline.
Forum Stats
Member
Level 19
Blank Slate
Response to Help With Actionscript.. 2004-08-03 03:00:15 Reply

But you cant put those actions in the button. Only in the movie clip.


BBS Signature
TvP
TvP
  • Member since: Apr. 27, 2003
  • Offline.
Forum Stats
Member
Level 19
Blank Slate
Response to Help With Actionscript.. 2004-08-03 03:04:43 Reply

I made a movie clip, and put the actions _otacon_ said in there. This error came up.

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 2: on handlers may not nest within other on handlers
on (rollOver) {


BBS Signature
otacon
otacon
  • Member since: May. 23, 2004
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to Help With Actionscript.. 2004-08-03 04:26:37 Reply

Like the error suggests you used to "on" handlers. Just copy paste the exact code i gave you, only changing the 2nd scene's name.

Amish
Amish
  • Member since: Mar. 13, 2003
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to Help With Actionscript.. 2004-08-03 04:59:14 Reply

The error means he had an on handeler and he put your script which is another onhandeler in it

otacon
otacon
  • Member since: May. 23, 2004
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to Help With Actionscript.. 2004-08-03 05:04:51 Reply

Yes. That is what i said.

At 8/3/04 04:26 AM, _otacon_ wrote: Like the error suggests you used to "on" handlers. Just copy paste the exact code i gave you, only changing the 2nd scene's name.

Woops. Typo.

Like the error suggests you used two "on" handlers. Just copy paste the exact code i gave you, only changing the 2nd scene's name.