Lizhi,
Your problem is in SpriteFlexjs where you have the following output:
/* FlexJS Static Dependency List: flash.__native.BaseRenderer,setTimeout*/
The compiler thinks there’s a dependency on a setTimeout class.
That’s caused by this code:
public static var requestAnimationFrame:Function =
window["requestAnimationFrame"] ||
window["webkitRequestAnimationFrame"] ||
window["mozRequestAnimationFrame"] ||
window["oRequestAnimationFrame"] ||
window["msRequestAnimationFrame"] ||
function(callback):void {
setTimeout(callback, 1000 / 60);
};
Changing it to the following fixes your error:
public static var requestAnimationFrame:Function =
window["requestAnimationFrame"] ||
window["webkitRequestAnimationFrame"] ||
window["mozRequestAnimationFrame"] ||
window["oRequestAnimationFrame"] ||
window["msRequestAnimationFrame"] ||
function(callback):void {
window["setTimeout"](callback, 1000 / 60);
};
Harbs
> On Sep 5, 2017, at 11:27 AM, lizhi <[email protected]> wrote:
>
> no error too.
>
> package
> {
> import flash.utils.setTimeout;
> public class TestBug
> {
>
> public function TestBug()
> {
> new TestBug2();
> setTimeout(function():void{trace("se")}, 100);
> trace(1);
> }
>
> }
>
> }
>
>
> package
> {
> public class TestBug2
> {
>
> public function TestBug2()
> {
>
> setTimeout(function():void{trace("se")}, 100);
> }
>
> }
>
> }
>
>
>
>
> -----
> spriteflexjs.com
> --
> Sent from: http://apache-flex-development.2333347.n4.nabble.com/