Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Tuesday, June 3, 2008

AS3 Socket & Security

Tuesday, June 3, 2008   

I bumped into this pretty hard today. In my previous post about controlling the operating system's mouse cursor, I am using a Java socket server to do the lifting for Flash.

I send out a string to the method in the server, and it in turn converts said string to mouse x & y positions, and places the operating system mouse cursor there.

This works perfectly well when compiling from the IDE, because naturally it's a trusted SWF coming from an IDE compile. I was able to see my socket connection working, and I was able to set the x,y of the mouse well enough.

When run in standalone through the Flash Player on my desktop, the socket was being silently ignored.

What I had to do was to add the SWF to the list of trusted folders/files. After that, it seems to work really well. I spent a long time trying to wonder what was happening, but then forgot about the whole security aspect of the player. Silly me. 

It's something that's kind of easy to forget about in the heat of coding. Just a FYI reminder.
 
 Return to the main page
Comments:

There are currently 0 Comments:

 Leave a comment