Be a Supporter!

Just 2 things. . .

  • 241 Views
  • 7 Replies
New Topic Respond to this Topic
shadowsdawn11
shadowsdawn11
  • Member since: May. 1, 2007
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Just 2 things. . . 2009-04-09 02:56:40 Reply

Thing number 1:

I have a button with these actions:

on(press){
	_root.bc.gotoAndPlay(nextFrame);
	if((bc._currentframe == 30)){
		gotoAndPlay(nextFrame);
	}
}

When the button is pressed, the bc goes to and plays the next frame, and if it is on frame 30 the main timeline plays to the next frame.

Let me explain this more cleary.
bc is a gray movie clip that I am using for my background, and it has 31 frames. 30 of it is a shape tween. The last frame of it is black so, what I want it to do is when you click the button "play" the background goes black, and goes to the next frame, that is black. So it's like a basic, cool effect kind of. But I test my movie, and .... it doesn't work.

What I think the problem is that I'm not supposed to have If statements on buttons, am I correct?

second thing:

Does anybody know any good sites for sound effects? Because I need a sound effect like a bleep or a bloop maybe even a bleep bloop. I want it to where you hover your mouse cursor over the button is goes "beep" Like the buttons in thing thing arena.

So these are to things I am stuck on, and would appreciate any feedback what so ever
Thanks.


.

shadowsdawn11
shadowsdawn11
  • Member since: May. 1, 2007
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to Just 2 things. . . 2009-04-09 03:09:29 Reply

bump


.

fallinfrog
fallinfrog
  • Member since: Jun. 20, 2007
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to Just 2 things. . . 2009-04-09 03:14:03 Reply

try this.

on(press){
_root.bc.gotoAndPlay(nextFrame);
if((bc._currentframe == 30)){
_root.bc.gotoAndPlay(nextFrame);
}
}

i think that would work. you can have if statements on buttons as well. that isn't a problem.


Classic Snake Gameplay with a Fusion of 4-20 Fun! Play it now!

BBS Signature
fallinfrog
fallinfrog
  • Member since: Jun. 20, 2007
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to Just 2 things. . . 2009-04-09 03:16:27 Reply

almost forgot.

Have you looked in the audio portal?

and theres this:
Sound FX

Sorry for double post.


Classic Snake Gameplay with a Fusion of 4-20 Fun! Play it now!

BBS Signature
shadowsdawn11
shadowsdawn11
  • Member since: May. 1, 2007
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to Just 2 things. . . 2009-04-09 03:18:49 Reply

At 4/9/09 03:14 AM, fallinfrog wrote: try this.

on(press){
_root.bc.gotoAndPlay(nextFrame);
if((bc._currentframe == 30)){
_root.bc.gotoAndPlay(nextFrame);
}
}

i think that would work. you can have if statements on buttons as well. that isn't a problem.

Sorry, but It's not working.


.

fallinfrog
fallinfrog
  • Member since: Jun. 20, 2007
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to Just 2 things. . . 2009-04-09 03:24:27 Reply

ok. go to your main timeline and click on your bc movieclip once to select it.

then look at your properties panel below. there's a box for instance name.

name it bc.

if that isn't it, then im not sure. but try that.


Classic Snake Gameplay with a Fusion of 4-20 Fun! Play it now!

BBS Signature
shadowsdawn11
shadowsdawn11
  • Member since: May. 1, 2007
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to Just 2 things. . . 2009-04-09 03:33:30 Reply

At 4/9/09 03:16 AM, fallinfrog wrote: almost forgot.

Have you looked in the audio portal?

and theres this:
Sound FX

Sorry for double post.

Sweet, now I found a sound that's perfect :)
But um yeah the instance name I already had was "bc".

I hope there is another way of doing this :/


.

shadowsdawn11
shadowsdawn11
  • Member since: May. 1, 2007
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to Just 2 things. . . 2009-04-09 03:47:19 Reply

Nevermind, I found out how to do it.
I took the frames inside the bc movieclip, and placed it on the main timeline. :)


.