Be a Supporter!

Button / Frame Control Help Pls !

  • 269 Views
  • 5 Replies
New Topic Respond to this Topic
Veranan
Veranan
  • Member since: Jun. 28, 2008
  • Offline.
Forum Stats
Member
Level 05
Programmer
Button / Frame Control Help Pls ! 2009-03-17 15:43:26 Reply

ok im kinda new to flash and im having a problem.
i am making a website in flash and i made a HOME button,
so i click on the Button layer i go to the ACTIONS panel and type in:

on (release) {
gotoAndPlay(5)
}

once ive typed that in i press F12 and then it opens in Firefox and i go and press the HOME button and Nothing happens.
i go back to Flash and i get a ERROR report and it says:

**Error** Scene=Scene 1, layer=Button_ONE, frame=1:Line 1: Mouse events are permitted only for button instances
     on (release) {

**Error** Scene=Scene 1, layer=Button_ONE, frame=1:Line 2: '{' expected
     gotoAndPlay(5) 

Total ActionScript Errors: 2 	 Reported Errors: 2

Please help me! how do i get the button to actually go to Frame 5?


BBS Signature
14hourlunchbreak
14hourlunchbreak
  • Member since: Jul. 27, 2007
  • Offline.
Forum Stats
Member
Level 30
Game Developer
Response to Button / Frame Control Help Pls ! 2009-03-17 15:45:52 Reply

You're forgetting the

;

at the end of your gotoAndPlay command.


BBS Signature
Veranan
Veranan
  • Member since: Jun. 28, 2008
  • Offline.
Forum Stats
Member
Level 05
Programmer
Response to Button / Frame Control Help Pls ! 2009-03-17 15:48:30 Reply

At 3/17/09 03:45 PM, 14hourlunchbreak wrote: You're forgetting the

;

at the end of your gotoAndPlay command.

hmmm i just tried that and still nothing happens and i get the same ERROR report...


BBS Signature
Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to Button / Frame Control Help Pls ! 2009-03-17 16:00:20 Reply

At 3/17/09 03:43 PM, Veranan wrote:
so i click on the Button layer i go to the ACTIONS panel and type in:
**Error** Scene=Scene 1, layer=Button_ONE, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) {
Total ActionScript Errors: 2 Reported Errors: 2

Don't click on the button layer, click on the button itself. Remove the code you have on the timeline and put it on the button instance


- - Flash - Music - Images - -

BBS Signature
14hourlunchbreak
14hourlunchbreak
  • Member since: Jul. 27, 2007
  • Offline.
Forum Stats
Member
Level 30
Game Developer
Response to Button / Frame Control Help Pls ! 2009-03-17 16:01:07 Reply

At 3/17/09 03:48 PM, Veranan wrote:
At 3/17/09 03:45 PM, 14hourlunchbreak wrote: You're forgetting the

;

at the end of your gotoAndPlay command.
hmmm i just tried that and still nothing happens and i get the same ERROR report...

Are you using AS2 or AS3? Also, is the action script on a button or on the timeline?


BBS Signature
Veranan
Veranan
  • Member since: Jun. 28, 2008
  • Offline.
Forum Stats
Member
Level 05
Programmer
Response to Button / Frame Control Help Pls ! 2009-03-17 16:31:06 Reply

At 3/17/09 04:00 PM, Denvish wrote:
Don't click on the button layer, click on the button itself. Remove the code you have on the timeline and put it on the button instance

oh this was my problem.
THANKS ALOT !
i finally got it working =D
THANKS !


BBS Signature