开发者

Actionscript 3.0 Loading swf file into flash project

http://tinypic.com/r/9i8hi0/7

It's a video showing you my problem. I d开发者_如何学Goon't know why the swf file won't work in the flash I used loader to put the swf file into the stage but it doesn't do it. I plays fine when I just open the swf file in Flash Pro CS-4 but when I put it into a flash, it doesn't work.


First, go to Publish Settings [Ctrl+Alt+F12] -> Flash -> Enable Debugging. This will at least show you the line where the error occurs, but remember to disable it before deploying (it adds a few kilobytes).

The video doesn't show enough to be sure, so here are a few wild guesses:

0) The error is not related to the loaded swf (the Enable Debugging setting will help a lot with this one).

1) Somewhere in the code not shown you tried to access a property from the loaded swf that was not available.

2) The loaded swf contains code that depends on the stage or root property and is erroneously accessing the main stage/root, where the needed property couldn't be found (enable debugging in the loaded swf to check this one, it shows the line even for loaded code)


Have you tried using the complete HTTP path to your swf file such as:

decoder.load(new URLRequest("http://localhost/site/decoder.swf"));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜