To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-06-2006, 11:01 AM   #1
TommyRensh
Junior Member
 
Join Date: Dec 2005
Posts: 5
problem with scene jumping back to begining

im making an rpg style game and have a part where the main character collides with a telephone mc which ive set to jump to another frame later in the scene which is a telephone convo. when i test the scene on its own it works fine although when i test the whole movie it jumps back right to the begining of the game when i collide with the telephone. the scene im working in is scene 2 and the scene its jumping back to is scene 1 frame one.

heres the script ive used:

if (_root.phone.hitTest(_x, _y, true)) {
_root.gotoAndPlay(120);
}

i dont understand why its doin that?
any suggestions?

cheers
TommyRensh is offline   Reply With Quote
Old 01-06-2006, 11:05 AM   #2
Osteel
An FKer
 
Join Date: Sep 2005
Location: Ontario
Posts: 1,032
Its most likely due to the fact that the timeline in Scene2 has no where to go at the end of it.

What I mean is that at the end of a timeline, if there is no where to go or you dont tell it to do anything it will go back to the start of the timeline. If there is any other scenes, then the timeline will go to the next available scene.

You most likely have to put a stop(); action on the last frame of scene 2 or have it go somewhere.
Osteel is offline   Reply With Quote
Old 01-06-2006, 11:11 AM   #3
TommyRensh
Junior Member
 
Join Date: Dec 2005
Posts: 5
thanks for the sugestion, there is a stop on that scene and there is even a scene 3 after which it never gets to. Its weird cause when you test each scene individually they work fine but when you play the whole movie they dont.
TommyRensh is offline   Reply With Quote
Old 01-06-2006, 11:18 AM   #4
Osteel
An FKer
 
Join Date: Sep 2005
Location: Ontario
Posts: 1,032
So then it has to be something with your hitTest. Might be the whole _root.gotoAndPlay(120) line.

I suggest naming frame 120 on Scene2. Click on it and at the bottom left you will see a spot where you can give the frame a name. Then change the line to:

_root.gotoAndPlay("frameName");

Give that a try
Osteel is offline   Reply With Quote
Old 01-06-2006, 11:39 AM   #5
TommyRensh
Junior Member
 
Join Date: Dec 2005
Posts: 5
wahooo it work!

thanx mate, thats such a big help



cheers
TommyRensh is offline   Reply With Quote
Old 01-06-2006, 11:41 AM   #6
Osteel
An FKer
 
Join Date: Sep 2005
Location: Ontario
Posts: 1,032
Haha great,

Good luck on your game
Osteel is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:21 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.