Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello, We noticed this morning that any SWFs published in 4.01 (bought it yesterday, we can't seem to get a hook for simpleAPI - can anyone else confirm this) coppercubeSprite = sceneLoader.content as DisplayObject; simpleAPI = coppercubeSprite['simpleAPI']; //simpleAPI is always Null in 4.01 |
||||
|
I think this changed a bit in CC4, the docs seem not to be up to date. You need to check simpleAPI = coppercubeSprite['simpleAPI']; later, until it is fully loaded. Like in a onGraphicsFrame callback. Then it works. |
||||
|
Yes, that's true. Do a addEventListener(Event.ENTER_FRAME, onGraphicsFrame); And then do something like this:
This is because of the new integrated preloader. The sprite is already there and active and doing something (displaying an animating the loading bar), but the simpleAPI isn't yet there because the file hasn't still loaded completely. So you need to check continuously. The docs really need to be updated for this. |
||||
|
Thanks for the words gentlemen, will do. mrdeli |
||||
|
Is the above code by Niko usuable for a loading screen - percentage loaded amount ?...anyone ? |
|