Frage

I recently had this vague error happen to me with the use of LocalConnection.
It happened every time I tried to connect and send data to another swf. Doing an internet search came up with little results pertaining to LocalConnection and this error and the response some people had were just ridiculous. Apparently this error pertains to image loading and fileReference also, just not in this case. My sending code works fine, even the event.level returned as status which means the other swf got the message, however a trace in the other swf callback function did not show, telling me the callback never triggered.

Image loading error
I got nailed on this one again with loading images.
The answer has been updated to include the fix for this also.

War es hilfreich?

Lösung

As it turns out the fix is simple.
The connection name was too long.
I cut the name down to 30 characters and it started working immediately.
I also want to add that if there is an error in the callback function you will get this error.

IMAGE LOADING ERROR
Well this error popped up on me again, but this time when I was loading images.

// bad code
imageObj.source = partialURL1 + partialURL2 + partialURL3;

//good code
var someURL:String = partialURL1 + partialURL2 + partialURL3
imageObj.source = someURL;

It seems you can not append the URL on the same line you assign it. Looks like a debugger bug. Even with the bad code HTTPFox was showing the images where loading, but the program would crap out somewhere after the source assignment, probably on the onloaded callback. I stopped looking into the matter when I found the source assignment fixed it.

Andere Tipps

I've had this error too, and for me the errorous code was

someobject.misspelledVariable.toString();

Where someobject was sent through a earlier localConnection and misspelledVariable is of course undefined. Changing misspelledVariable to a correct one solved my problem. Strange error though...

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top