-
-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: Handle the case where frame rate is set to 0 or NaN
- Loading branch information
1 parent
e795e68
commit cf88ee6
Showing
14 changed files
with
130 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// stage.frameRate (SWF header = 30) | ||
30 | ||
// stage.frameRate = NaN; | ||
NaN | ||
// Event.ENTER_FRAME | ||
// Event.ENTER_FRAME | ||
// Event.ENTER_FRAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Test made using JPEXS Free Flash Decompiler. | ||
// The frame rate in the SWF header is set to 30. | ||
|
||
package | ||
{ | ||
import flash.display.Sprite; | ||
import flash.events.Event; | ||
|
||
public class Test extends Sprite | ||
{ | ||
public function Test() | ||
{ | ||
super(); | ||
this.init(); | ||
} | ||
|
||
private function init() : void | ||
{ | ||
var enterFrame = function() | ||
{ | ||
trace("// Event.ENTER_FRAME"); | ||
}; | ||
addEventListener(Event.ENTER_FRAME, enterFrame); | ||
trace("// stage.frameRate (SWF header = 30)"); | ||
trace(stage.frameRate); | ||
trace("// stage.frameRate = NaN;"); | ||
stage.frameRate = NaN; | ||
trace(stage.frameRate); | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_frames = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// stage.frameRate (SWF header = -43.75) | ||
212.25 | ||
// stage.frameRate = -43.75; | ||
0.01 | ||
// stage.frameRate = 212.25; | ||
212.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Test made using JPEXS Free Flash Decompiler. | ||
// The frame rate in the SWF header is set to -43.75. | ||
|
||
package | ||
{ | ||
import flash.display.Sprite; | ||
|
||
public class Test extends Sprite | ||
{ | ||
public function Test() | ||
{ | ||
super(); | ||
this.init(); | ||
} | ||
|
||
private function init() : void | ||
{ | ||
trace("// stage.frameRate (SWF header = -43.75)"); | ||
trace(stage.frameRate); | ||
trace("// stage.frameRate = -43.75;"); | ||
stage.frameRate = -43.75; | ||
trace(stage.frameRate); | ||
trace("// stage.frameRate = 212.25;"); | ||
stage.frameRate = 212.25; | ||
trace(stage.frameRate); | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_frames = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// stage.frameRate (SWF header = 0.0) | ||
0 | ||
// stage.frameRate = 0; | ||
0.01 | ||
// stage.frameRate = 2000; | ||
1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Test made using JPEXS Free Flash Decompiler. | ||
// The frame rate in the SWF header is set to 0.0. | ||
|
||
package | ||
{ | ||
import flash.display.Sprite; | ||
|
||
public class Test extends Sprite | ||
{ | ||
public function Test() | ||
{ | ||
super(); | ||
this.init(); | ||
} | ||
|
||
private function init() : void | ||
{ | ||
trace("// stage.frameRate (SWF header = 0.0)"); | ||
trace(stage.frameRate); | ||
trace("// stage.frameRate = 0;"); | ||
stage.frameRate = 0; | ||
trace(stage.frameRate); | ||
trace("// stage.frameRate = 2000;"); | ||
stage.frameRate = 2000; | ||
trace(stage.frameRate); | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_frames = 1 |