Be a Supporter!

As2 Help Needed Urgently!!!

  • 197 Views
  • 10 Replies
New Topic Respond to this Topic
AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
As2 Help Needed Urgently!!! 2011-06-22 13:20:16 Reply

Hello!
I urgently need help from the awesome community of Newgrounds!
I have a flash project with 2 scenes, going from scene 1 to 2, the animations in scene 2 are fine.
But going from scene 2 back to scene 1 then returning to scene 2, the animations in scene 2, screw up!

So I was wondering if there was a script to reset the script when jumping between scenes so that it's basically the first time opening it up.

Confused?

Here's a chart:

Scene 1 = S1
Scene 2 = S2

S1 - S2 = Ok
S2 - S1 - S2 = Aggggh!!! Wtf?!?!!

So yeah...

Please help!!!
Adsy


"Books...
They're quite wordy aren't they?
..."

AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 13:28:59 Reply

Oh yeah, plus it's getting marked for my end of year project tomorrow...

So, you know, no biggie, or, whatever, people, say?

Please help.
Adsy


"Books...
They're quite wordy aren't they?
..."

PoppyClock
PoppyClock
  • Member since: Aug. 19, 2006
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 13:44:49 Reply

Don't use scenes.
Define 'screw up'.


Balderdash and PoppyClock

BBS Signature
AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 13:53:05 Reply

At 6/22/11 01:44 PM, PoppyClock wrote: Don't use scenes.
Define 'screw up'.

By "screw up" I mean, that I have a script that when the mouse rolls over it, it'll play an animation within it.
First time you open it up, it works fine, but a quick switch of scenes later, it skips a part of the animation within the movieclip.

I'll try that now.


"Books...
They're quite wordy aren't they?
..."

PoppyClock
PoppyClock
  • Member since: Aug. 19, 2006
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 13:56:35 Reply

At 6/22/11 01:53 PM, AdsyCurtis wrote: I have a script that when the mouse rolls over it, it'll play an animation within it.
First time you open it up, it works fine, but a quick switch of scenes later, it skips a part of the animation within the movieclip.

In that case, I would suspect the error lies within the roll over script, or possibly the movieclip with the animation.


Balderdash and PoppyClock

BBS Signature
AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 14:05:49 Reply

At 6/22/11 01:56 PM, PoppyClock wrote:
At 6/22/11 01:53 PM, AdsyCurtis wrote: I have a script that when the mouse rolls over it, it'll play an animation within it.
First time you open it up, it works fine, but a quick switch of scenes later, it skips a part of the animation within the movieclip.
In that case, I would suspect the error lies within the roll over script, or possibly the movieclip with the animation.

Yeah, I just tried placing them all into one scene, the problem is still there.
Here is the script within the MovieClip (ignore "Click", and NEW# are the four things that you can roll over to make the animation play):

on(rollOver){
_root.NEW1.swapDepths(1000)
_root.NEW2.swapDepths(0)
_root.NEW3.swapDepths(1)
_root.NEW4.swapDepths(2)
if(_global.Click == false){
_root.NEW1.gotoAndPlay("Play1")
_root.BoxFade.gotoAndPlay("BoxPlay")
_global.rollon == true
}
}

on(rollOut){
if(_global.Click == false){
_root.NEW1.gotoAndPlay("Close1")
_root.BoxFade.gotoAndPlay("BoxClose")
_global.rollon == false
}

}

I doubt that this'll help, but you never know...


"Books...
They're quite wordy aren't they?
..."

AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 14:07:42 Reply

Wait, sorry, this was at the top of all of that ^

onClipEvent(enterFrame){
rollon = false
}


"Books...
They're quite wordy aren't they?
..."

AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 14:27:16 Reply

Ok, that was probably of no use to you, do you know a line of script to just "reset" all scripts to their original form?
Something like that should work.


"Books...
They're quite wordy aren't they?
..."

PoppyClock
PoppyClock
  • Member since: Aug. 19, 2006
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 14:30:19 Reply

Yes, it is difficult without seeing the entire file. Which animation is it skipping? That would be the one you would need to 'reset'.


Balderdash and PoppyClock

BBS Signature
AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 15:02:42 Reply

At 6/22/11 02:30 PM, PoppyClock wrote: Yes, it is difficult without seeing the entire file. Which animation is it skipping? That would be the one you would need to 'reset'.

Each of the movieclips (NEW#) has about 80 frames in them, when you roll over a separate movieclip, they all play frames 1 - 10. When you roll over one of them, it plays frame 11 - 40, roll off, 41 - 70, click off separate movieclip, 71 - 80.

When you go from S1 to S2, back to S1 then S2 again, when you roll over the separate movie clip, it plays 1 - 10 fine, yet when you rollover one of them, it jumps to frame 40, and when you roll off, it plays 41 onwards, and also when you click off of this separate movieclip, the images stay there.

If you want I can send you a copy of the file


"Books...
They're quite wordy aren't they?
..."

AdsyCurtis
AdsyCurtis
  • Member since: Mar. 6, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As2 Help Needed Urgently!!! 2011-06-22 15:19:15 Reply

At 6/22/11 03:02 PM, AdsyCurtis wrote:
At 6/22/11 02:30 PM, PoppyClock wrote: Yes, it is difficult without seeing the entire file. Which animation is it skipping? That would be the one you would need to 'reset'.
Each of the movieclips (NEW#) has about 80 frames in them, when you roll over a separate movieclip, they all play frames 1 - 10. When you roll over one of them, it plays frame 11 - 40, roll off, 41 - 70, click off separate movieclip, 71 - 80.

When you go from S1 to S2, back to S1 then S2 again, when you roll over the separate movie clip, it plays 1 - 10 fine, yet when you rollover one of them, it jumps to frame 40, and when you roll off, it plays 41 onwards, and also when you click off of this separate movieclip, the images stay there.

If you want I can send you a copy of the file

So, it obviously has something to do with the RollOn part of the script, but why the images remain in place after clicking off the separate movieclip I have no idea...


"Books...
They're quite wordy aren't they?
..."