BTW, The problem is probably related to the fact that you have a static var referencing the top level function.
I found the problem by searching the JS files to “setTimeout”. SpriteFlexjs.js was the only file which had it listed in the dependency list. HTH, Harbs > On Sep 5, 2017, at 12:33 PM, Harbs <harbs.li...@gmail.com> wrote: > > 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 <s...@qq.com> 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/ >