|
|
|
#1 |
|
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 |
|
|
|
|
|
#2 |
|
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. |
|
|
|
|
|
#3 |
|
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.
|
|
|
|
|
|
#4 |
|
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
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2005
Posts: 5
|
wahooo it work!
thanx mate, thats such a big help ![]() cheers |
|
|
|
|
|
#6 |
|
An FKer
Join Date: Sep 2005
Location: Ontario
Posts: 1,032
|
Haha great,
Good luck on your game
|
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|