swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] gotoAndPlay has different behaviers on SWF created by


From: Atry
Subject: [Swftools-common] gotoAndPlay has different behaviers on SWF created by swfc and Adobe Flash authoring tool
Date: Mon, 31 Aug 2009 17:10:19 +0800

Here is some test code:

gotoTest.sc:

.flash bbox=200x200 version=9 fps=2 name="gotoTest.swf"
  .action:
    package {
      import flash.display.*
      import flash.utils.*
      import flash.text.*
      import flash.events.*
      public class A123 extends MovieClip {
        public function A123() {
          const t:TextField = new TextField
          const f:TextFormat = t.defaultTextFormat
          f.color = 0xffd000
          t.defaultTextFormat = f
          addChild(t)
          addEventListener(Event.ENTER_FRAME, function (event:Event):void {
            if (currentFrame > 8) {
              gotoAndPlay(5)
            }
            t.text = String(currentFrame)
          })
        }
      }
    }
  .end
  .frame 10
.end

After gotoAndPlay invoked, the movie stayed at frame #5 lasted double
frame-time, then go ahead normally on frame #6 #7 #8. But for SWF
created by Adobe Flash authoring tool, the movie played normally, only
lasted 1 frame-time on frame #5.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]