avm2: Make Sprite.startDrag/stopDrag available to SWF 9

The versioning in playerglobal is incorrect - Flash Player
actually exposes this to SWF 9
This commit is contained in:
Aaron Hill 2024-09-01 16:26:03 -04:00
parent 898db260a3
commit a889bd85e5
6 changed files with 20 additions and 2 deletions

View File

@ -18,9 +18,7 @@ package flash.display {
public native function get useHandCursor():Boolean;
public native function set useHandCursor(useHandCursor:Boolean):void;
[API("667")]
public native function startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void;
[API("667")]
public native function stopDrag():void;
public native function get hitArea():Sprite;

View File

@ -0,0 +1,16 @@
package {
import flash.display.MovieClip;
import flash.display.Sprite;
public class Test extends MovieClip {
public function Test() {
trace("Sprite.startDrag: " + new Sprite().startDrag);
trace("Sprite.stopDrag : " + new Sprite().stopDrag);
}
}
}

View File

@ -0,0 +1,2 @@
Sprite.startDrag: function Function() {}
Sprite.stopDrag : function Function() {}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
# Note - 'test.swf' was manually edited in JPEXS to use SWF version 9
num_ticks = 1