So I have 2 problems. One is with an XMLSocket connections.
When I have it running in flash it obviously works, but when it's
running throught the swf or on a website I get a security error. Is
there a way I can make it work either way? Here are the two errors.
When running the swf
SecurityError: Error #2010: Local-with-filesystem SWF files
are not permitted to use sockets.
Now for this other problem. Here's the error
ArgumentError: Error #2025: The supplied DisplayObject must
be a child of the caller.
Just to make it more obvious this is for a breakout game. I
get that error when the ball gets close to or hits some of the
blocks (not all). It seems to come up when it's possibly hitting
multiple blocks. What's kinda weird is that the game still works
perfectly fine. It's just annoying to see this error. What I'm
mostly doing in that function is checking for the collision
detection with some if statements. Here's the code that actually
does the work when the statements are true:
So the problem is obviously the removeChild. The block is
just the variable that's stored in an array called blocks and I'm
using a for each to go through each of the blocks. How can I get
rid of this error?