Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: So Simple... I Hope

(98 views • 8 replies)

This topic is 1 page long.

<< < > >>
Misunderstood

Jynxxx

Reply To Post Reply & Quote

Posted at: 7/2/08 10:31 PM

Jynxxx EVIL LEVEL 19

Sign-Up: 05/05/07

Posts: 690

I have a main character mc with a bunch of frames in it, it kinda goes like this:

CharacterMovieClip > Bunch of frames with different movie clips of actions > A specific movie clip

I have a line of code at the last frame of the "a specific movie clip" that is supposed to change a variable that the "CharacterMovieClip" holds. What is the code to do that?

_root.CharacterMovieClip.variable = false; didn't work.

Any help appreciated.

13 place in Madness Day 07, thanks to Tom and all the voters.
Forthelose.org
Epic giraffe porn

BBS Signature

None

zrb

Reply To Post Reply & Quote

Posted at: 7/2/08 10:36 PM

zrb LIGHT LEVEL 10

Sign-Up: 08/08/06

Posts: 3,851

_root.CharacterMovieClip.variable = false; didn't work.

Well try this on the main character Movie Clip:

if (this.specificMCName._currentframe == #( of the frame with the action in it)) {
variable = false;
}

I can speak french :3 || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature

None

Jynxxx

Reply To Post Reply & Quote

Posted at: 7/2/08 10:56 PM

Jynxxx EVIL LEVEL 19

Sign-Up: 05/05/07

Posts: 690

At 7/2/08 10:36 PM, zrb wrote:
_root.CharacterMovieClip.variable = false; didn't work.
Well try this on the main character Movie Clip:

if (this.specificMCName._currentframe == #( of the frame with the action in it)) {
variable = false;
}

Thanks, but no. That didn't work either...

13 place in Madness Day 07, thanks to Tom and all the voters.
Forthelose.org
Epic giraffe porn

BBS Signature

None

Jynxxx

Reply To Post Reply & Quote

Posted at: 7/2/08 11:41 PM

Jynxxx EVIL LEVEL 19

Sign-Up: 05/05/07

Posts: 690

I'd assume this is possible, I mean, its not real technical at all...

13 place in Madness Day 07, thanks to Tom and all the voters.
Forthelose.org
Epic giraffe porn

BBS Signature

Questioning

zrb

Reply To Post Reply & Quote

Posted at: 7/2/08 11:46 PM

zrb LIGHT LEVEL 10

Sign-Up: 08/08/06

Posts: 3,851

I'd assume this is possible, I mean, its not real technical at all...

Well for your method, I don't see how it didn't work unless you gave your character the wrong instance name.

I can speak french :3 || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature

None

Jynxxx

Reply To Post Reply & Quote

Posted at: 7/3/08 09:37 AM

Jynxxx EVIL LEVEL 19

Sign-Up: 05/05/07

Posts: 690

I gave the "A Specific Movie Clip" an instance name, then, on the main timeline, applied that action you gave to me to the main character movie clip.

Basically, it ended up not doing anything...

13 place in Madness Day 07, thanks to Tom and all the voters.
Forthelose.org
Epic giraffe porn

BBS Signature

None

Jynxxx

Reply To Post Reply & Quote

Posted at: 7/3/08 10:01 AM

Jynxxx EVIL LEVEL 19

Sign-Up: 05/05/07

Posts: 690

if (this.gettingUp._currentframe == 2) {
		ducking = false;
	}

That's what I have. Then inside the main character movie clip, I have the movie clip of him getting up named gettingUp.

Didn't work...

13 place in Madness Day 07, thanks to Tom and all the voters.
Forthelose.org
Epic giraffe porn

BBS Signature

None

Neo-13

Reply To Post Reply & Quote

Posted at: 7/3/08 10:06 AM

Neo-13 LIGHT LEVEL 18

Sign-Up: 06/09/07

Posts: 719

This sounds like a simple problem, one that I think I could help with; however I don't really understand how you have it organised. Your diagram thing with words was confusing.

One thing you could try, is to make the variable _global.

BBS Signature

None

Coolio-Niato

Reply To Post Reply & Quote

Posted at: 7/3/08 10:12 AM

Coolio-Niato LIGHT LEVEL 23

Sign-Up: 06/30/05

Posts: 1,651

If getting up is non-existant in the frames before at the beginning of the movie clip, the instance name may possibly not be recognized. Rather, try to set the actions up inside the gettingUp MC or on it to set the MC above it's actions to true.

basically an

 
onClipEvent(enterFrame){
if(this._currentframe == 2){
_parent.variable = true;
}
}

It's weird when stuff like that happens and you just have to get used to getting around it.

=)

BBS Signature

All times are Eastern Daylight Time (GMT -4) | Current Time: 04:58 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!