Forum Topic: nextFrame()

(146 views • 6 replies)

This topic is 1 page long.

<< < > >>
Questioning

Klemzo

Reply To Post Reply & Quote

Posted at: 5/5/09 09:14 AM

Klemzo LIGHT LEVEL 06

Sign-Up: 04/20/09

Posts: 99

I'm having problems with this:

I make an button or watever that orders to go onto next frame or to # frame.
It works; this are the 2 scripts I use for this:

on(release){
nextFrame();
}

AND

on(release){
_root.gotoAndPlay(#)

They work fine as they could.

But the problem is they allways count to main frameline in Scene 1 (even the nextFrame() script).
So how can I make that after clicking the button it puts you to # frame and # scene?

Thanks~

"Let the light or me be with you"


None

AdamJack

Reply To Post Reply & Quote

Posted at: 5/5/09 09:29 AM

AdamJack DARK LEVEL 27

Sign-Up: 10/16/05

Posts: 1,015

on(release){
gotoAndPlay("Scene 2", #);
}

"Think about it think think about it" ~ Flight of the Conchords


None

Klemzo

Reply To Post Reply & Quote

Posted at: 5/5/09 10:44 AM

Klemzo LIGHT LEVEL 06

Sign-Up: 04/20/09

Posts: 99

At 5/5/09 09:29 AM, AdamJack wrote: on(release){
gotoAndPlay("Scene 2", #);
}

ty

"Let the light or me be with you"


None

Klemzo

Reply To Post Reply & Quote

Posted at: 5/6/09 01:58 AM

Klemzo LIGHT LEVEL 06

Sign-Up: 04/20/09

Posts: 99

No it doesn't work. I dunno like its something wrong. If I put a button into a movie clip it doesn't work at all...
But if I put it seperetly and pit that script in it works but It still doesn't put you where I want. It puts you to scene 1, 1st frame! WTF is that :(
The script clearly says:
on(release){
gotoAndPlay("Scene 2", #);
}

(I put number where # is afcourse)

So whats the problem?
THanks~

"Let the light or me be with you"


Resigned

the1manwiththeplan

Reply To Post Reply & Quote

Posted at: 5/6/09 03:38 AM

the1manwiththeplan LIGHT LEVEL 14

Sign-Up: 06/10/08

Posts: 346

If the buttons inside a movie clip try this.

on (release) {
_root.gotoAndPlay("Scene 2","#");
}

I went outside once the graphics were awesome but the gameplay was shit

BBS Signature

None

Denvish

Reply To Post Reply & Quote

Posted at: 5/6/09 04:20 AM

Denvish DARK LEVEL 46

Sign-Up: 04/25/03

Posts: 16,236

At 5/6/09 01:58 AM, Klemzo wrote: No it doesn't work. I dunno like its something wrong. If I put a button into a movie clip it doesn't work at all...
But if I put it seperetly and pit that script in it works but It still doesn't put you where I want. It puts you to scene 1, 1st frame! WTF is that :(
The script clearly says:
on(release){
gotoAndPlay("Scene 2", #);
}

(I put number where # is afcourse)

So whats the problem?
THanks~

I've had this problem with buttons inside MCs/Scenes before. The solution I used was to have a function on the root timeline, first frame:

function GOTOIT(fr){
	gotoAndPlay("Scene 2",fr);
}

Then add this to the button instead:

on(release){
	_root.GOTOIT(1);
}

- - Flash - Music - Images - -

BBS Signature

None

Klemzo

Reply To Post Reply & Quote

Posted at: 5/6/09 06:50 AM

Klemzo LIGHT LEVEL 06

Sign-Up: 04/20/09

Posts: 99


I've had this problem with buttons inside MCs/Scenes before. The solution I used was to have a function on the root timeline, first frame:

function GOTOIT(fr){
gotoAndPlay("Scene 2",fr);
}

Then add this to the button instead:

on(release){
_root.GOTOIT(1);
}

Wow mate! Really nice approach!
Thanks =)

"Let the light or me be with you"


All times are Eastern Standard Time (GMT -5) | Current Time: 12:10 AM

<< 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!