What are the major performance hitters in AS3 aside from rendering vectors?

In ActionScript 3, using vector graphics is a guaranteed way to cause massive damage to the performance of your project. Using a single Bitmap for all graphics by using .copyPixels() through its BitmapData object in place of all vector graphics will yield a ridiculous performance boost and is essential for people like myself developing games … Read more

Calculate Bounding box coordinates from a rotated rectangle

I have the coordinates of the top left point of a rectangle as well as its width, height and rotation from 0 to 180 and -0 to -180. I am trying to get the bounding coordinates of the actual box around the rectangle. What is a simple way of calculating the coordinates of the bounding … Read more

What is the best way to stop people hacking the PHP-based highscore table of a Flash game

I’m talking about an action game with no upper score limit and no way to verify the score on the server by replaying moves etc. What I really need is the strongest encryption possible in Flash/PHP, and a way to prevent people calling the PHP page other than through my Flash file. I have tried … Read more

Difference between e.target and e.currentTarget

I don’t understand the difference, they both seem the same but I guess they are not. Any examples of when to use one or the other would be appreciated. Answer e.target is what triggers the event dispatcher to trigger and e.currentTarget is what you assigned your listener to. AttributionSource : Link , Question Author : … Read more

Add events dispatching for ActionScript framework Robotlegs

I have the following function in a Service class protected function writeToFile():void{ var destinationFile:File = File.applicationStorageDirectory.resolvePath(_newPath); var fs:FileStream = new FileStream(); fs.open(destinationFile, FileMode.WRITE); fs.writeBytes(_buffer, 0, _buffer.length); fs.close(); } this Service class should dispatch a SuccessfulCreateLocalFileEvent when writeToFile is successful and an UnsuccessfulCreateLocalFileEvent if writeToFile is unsuccessful. I know that FileStream functions open and writeBytes may … Read more