Announcement

Collapse
No announcement yet.

GoToAndStop shows multiple frames at once

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GoToAndStop shows multiple frames at once

    I've got a simple mouse cursor movieclip with a number of frames corresponding to directions the cursor can point in (up, down, left right, default).

    I have a simple check in my Hud classes' PostRender() like so:

    Code:
    if ( CursorDirection == CURSOR_Right )
    	Cursor.GotoAndStop("PointRight");
    
    else
    	Cursor.GotoAndStop("Default");
    This has worked fine before but now whenever I try to Goto any frame other than 1 ("Default") it draws both the new frame AND the default frame at the same time.

    I've poured hours of debugging into trying to find a fix for this and I keep coming up blank. If anyone could shed any light it would be much appreciated!

    #2
    That shouldn't be possible. As long as the two frames are on different frame numbers, Flash can't draw both frames at the same time. It is on either one or the other at any given time.

    How is your Flash set up?

    Comment


      #3
      That's what I thought...

      I had wondered if I was accidently swapping between the two frames so quickly that it just looks like they're playing at the same time, but I think I've ruled that out.

      I simply have a Cursor movie clip with two frames (1 and 2 both labelled as well). I have tested with and without stop(); and pause(); on both frames/on a separate actions layer.

      Everything is fine when I test the Flash file with the Scaleform launcher, changing frames on some event or other. ActionScript 2.0, Flash Player 8, etc.

      I have changed UnrealScript to try: jumping straight to the second frame once only, jumping on input, referencing the frame labels and the numbers separately. Always the same result.

      Comment


        #4
        Is it possible your code is somehow creating more than one instance of the cursor movie? And therefor it seems to show both frames at once?

        That being said, try putting your second keyframe on frame 10, instead of frame 2. See if separating the frames some helps.

        Comment


          #5
          I have so little Scaleform code I was sure I couldn't be duplicating, but to check I chucked a `log into my GFXMoviePlayer's Start() method and what do you know? It was being called twice.

          The problem is I wasn't creating the second copy in code... I was doing it in Kismet. I had a left over 'OpenGFXMovie' node from a previous test. It wasn't responding to frame changes, hence the odd "double cursor".

          My feeling stupid for missing that is at least somewhat dulled by the relief of having found a solution... Thanks very much for your help.

          Comment


            #6
            No reason to fill stupid. We all miss things and make mistakes. I tell my son making mistakes is how we learn best.

            Comment

            Working...
            X