Jump to content


Can someone explain this navigation glitch?


  • You cannot reply to this topic
6 replies to this topic

#1 UnderAttak

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Gender:Male
  • Location:San Diego

Posted 04 February 2007 - 02:16 AM

Weirdest thing happened when working on a comic-strip animation in flash. I have 3 seperate scenes (yeah yeah I don't wanna hear it :angrylooking: ). First scene isn't important. Second scene does a quick animation and then the last keyframe has the code:

"gotoAndStop("sceneC", 1);"

Now once it gets to the 3rd scene, the rest of the navigation is set by coding the buttons individually. Each button has the following:

"on (release) blah blah blah
gotoAndStop(10);"

Here's the weird thing. When you click on that button, it actually goes to frame 11, not 10. I noticed it went a frame over, so I went back to the previous scene, removed the "gotoAndStop("sceneC", 1);" and retested the file. Same thing.

Now I changed the button to go to frame 9 (remember, I want it to go to frame 10 here), and when you click the button, it goes to scene 10. Weird.

So I put the gotoAndStop back in the keyframe, BUT i left out the ,1 part (which says to stop at frame 1 of that scene). Now when clicking on the button that is coded to go to frame 9, I expect it to go to frame 10 because of that glitch. But guess what happens, it actually goes to frame 9 now like it's coded to. So I put in frame 10 instead of 9, and WA-LA, it goes to frame 10 like I want it to. Can anyone explain?

Cliffs: If previous scene has gotoAndStop("scene" ,1);, buttons in next scene go over by 1 frame. If gotoAndStop code is removed, buttons in next scene go to proper frame.

#2 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 04 February 2007 - 03:37 AM

Hm.. I've encountered something like this before, years ago. I don't think I figured out why it was doing it. But instead of using gotoAndStop(), use nextScene();. It might work.

(This is part of the reason why I never use scenes)

Edited by Ben, 04 February 2007 - 03:38 AM.


#3 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 04 February 2007 - 09:44 AM

Yah...I've never used scenes before either, I've just heard they are a wee bit buggy at times.

Anyways, try using frame labels instead. click on frame 10 and down where you would give a movieclip an instance name, you can type into that box, put whatever you like (best if it doesnt start with numbers...ive seen that screw it up before, and no // otherwise its a comment). After you give it a label name, use gotoAndStop("labelName");

That should hopefully make things work a bit better.

#4 UnderAttak

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Gender:Male
  • Location:San Diego

Posted 04 February 2007 - 12:59 PM

Thanks for the tip. I actually already figured it out, just thought it was so weird.

I would've done the frame label coding, but the way the client has the FLA file setup is almost 40+ layers and a keyframe one after another, each one having it's own thing and MC. I guess I should've busted out the pen and paper and starting labelling and writing the frame down for reference.

#5 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 05 February 2007 - 09:23 AM

Ugh, I **hate** working on other people's flash designs or code. Its typically a huge, disorganized mess. The very worse flash related project I have ever worked on was re-building fla's that I client lost. Had to decompile swfs and rebuild the fla's from that stuff. If youve ever use a swf decompiler, they dont often give great results. Fla reconstruction is somthing I wont be doing ever again...

#6 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 05 February 2007 - 03:45 PM

View PostPax, on Feb 6 2007, 01:23 AM, said:

Ugh, I **hate** working on other people's flash designs or code. Its typically a huge, disorganized mess. The very worse flash related project I have ever worked on was re-building fla's that I client lost. Had to decompile swfs and rebuild the fla's from that stuff. If youve ever use a swf decompiler, they dont often give great results. Fla reconstruction is somthing I wont be doing ever again...
Does swf decompiler even give the right code? I always end up with a bunch of randomness.. a totally confusing pile of code.

#7 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 06 February 2007 - 09:55 AM

View PostBen, on Feb 5 2007, 03:45 PM, said:

View PostPax, on Feb 6 2007, 01:23 AM, said:

Ugh, I **hate** working on other people's flash designs or code. Its typically a huge, disorganized mess. The very worse flash related project I have ever worked on was re-building fla's that I client lost. Had to decompile swfs and rebuild the fla's from that stuff. If youve ever use a swf decompiler, they dont often give great results. Fla reconstruction is somthing I wont be doing ever again...
Does swf decompiler even give the right code? I always end up with a bunch of randomness.. a totally confusing pile of code.


If you're lucky you get some sort of legible code. The project I worked on had all the variable names replaced with l1, l2, l3, l4 and kept incrementing for each variable. Made the code a wee bit hard to understand. At least it was structured in a sensible way.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users