Forum Topic: Need help

(102 views • 4 replies)

This topic is 1 page long.

<< < > >>
None

Fullsteel

Reply To Post Reply & Quote

Posted at: 8/18/08 10:50 PM

Fullsteel DARK LEVEL 14

Sign-Up: 05/19/08

Posts: 358

onClipEvent(enterFrame) {
if (_root.score = 13) {
gotoAndPlay(1); }
}

I'm trying to make it so when the score reaches 13, it goes to another frame in the movie.
How do I do this?


None

Rammer

Reply To Post Reply & Quote

Posted at: 8/18/08 10:58 PM

Rammer DARK LEVEL 32

Sign-Up: 06/08/03

Posts: 4,327

At 8/18/08 10:50 PM, Fullsteel wrote: onClipEvent(enterFrame) {
if (_root.score = 13) {
gotoAndPlay(1); }
}

I'm trying to make it so when the score reaches 13, it goes to another frame in the movie.
How do I do this?

in flash, "=" is an assignment operator. you need to use the equality operator, "=="

also, use _root to refer to the main timeline. _root.gotoAndPlay(13);

snyggys


Shouting

8PM

Reply To Post Reply & Quote

Posted at: 8/19/08 12:03 AM

8PM DARK LEVEL 05

Sign-Up: 06/30/08

Posts: 37

GAAAAAAAAHH! Actionscript Makes NO SENCE!

8pm

BBS Signature

None

Rammer

Reply To Post Reply & Quote

Posted at: 8/19/08 12:23 AM

Rammer DARK LEVEL 32

Sign-Up: 06/08/03

Posts: 4,327

At 8/19/08 12:03 AM, 8PM wrote: GAAAAAAAAHH! Actionscript Makes NO SENCE!

it makes perfect sense. "=" is used when assigning values to variables, and "==" is used to compare them.

for example,

var num:Number = 5;
var num2:Number = 5;
var num3:Number = 306;
trace(num == num2);  //traces true
trace(num == num3); //traces false

snyggys


None

Fullsteel

Reply To Post Reply & Quote

Posted at: 8/19/08 09:14 AM

Fullsteel DARK LEVEL 14

Sign-Up: 05/19/08

Posts: 358

Thanks for your help...


All times are Eastern Standard Time (GMT -5) | Current Time: 04:57 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!