Flash player stuck at Frame 1 after calling a function

后端 未结 1 440
既然无缘
既然无缘 2021-01-25 02:59

I\'m working in a flash CS6 and I\'m having a trouble: After calling a function, player freezes at frame 1. This not happend during Ctrl+ENTER preview, but when I play the .swf

1条回答
  •  抹茶落季
    2021-01-25 03:33

    Most likely (because you're loading in resources from the internet, and it works when you test), this has to do with the security settings of your application.

    Go to your publish settings file -> publish settings.

    You'll see a drop down labelled Local playback security. Ensure this is set to access network only and not the default acess local only.

    This hangs up a lot of people when they first start using flash.


    It's always good practice too, to listen not just for the COMPLETE event on your loaders, but also for error events such as:

    loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandlerFunction);
    loader.addEventListener(IOErrorEvent.NETWORK_ERROR, ioErrorHandlerFunction);
    loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandlerFunction);
    

    In your case, it's probably throwing a security error.

    0 讨论(0)
提交回复
热议问题