Actionscript Snippets. Rotating a Sprite around any point - Everyday 3D. Click once to activate, then click anywhere to move the registration point.
Use SPACE to change the object or any other key to change the direction of the rotation. This time I want to share a simple solution to a relatively simple, but annoying problem. The problem: the Sprite.rotation property rotates the object always around the registration point of the Sprite. If you need to rotate it around some other point, it's not automatic. Flashtica // Free Open Source Actionscript and Flash code files and resources directory. AnimatedBitmap - hexagon. My favorites ▼ | Sign in Project Home Wiki Issues Source Show details Hide details.
Points around circumference. /** Distribute the points clockwise around the circle.
*/publicstatic const CLOCKWISE : String = "clockwise";/** Distribute the points counterclockwise around the circle. */publicstatic const COUNTERCLOCKWISE : String = "counterclockwise"; /** * This method accepts arguments based on the size and position of your circle * along with the amount of points to distribute around the circle, * what angle to start the first point, which direction to plot the points, * how much of the circumference to use for the distribution, and which direction * around the circle to plot the points. * @example example: * * @param centerx The center x position of the circle to place the points around. * @param centery The center y position of the circle to place the points around. * @param radi The radius of the circle to distribute the points around. * @param total The total amount of point to distribute around the circle. * @param startangle [Optional] The starting angle of the first point.
Explore. Preloader. The magic of creating a preloader in ActionScript 3 lies in the LoaderInfo class.
Every instantiated DisplayObject instance (all objects that appear on the stage, plus the stage itself) have a loaderInfo property that returns a LoaderInfo instance that contains information about the loading progress of that particular display object. Creating a preloader for the whole application is a matter of monitoring these LoaderInfo instances. Method 1: Monitor Stage LoaderInfo instance. Deep linking. SWFAddress is a small but powerful library that provides deep linking for Flash and Ajax.
It's a developer tool, allowing creation of unique virtual URLs that can point to a website section or an application state. SWFAddress enables a number of important capabilities which are missing in today's rich web technologies including: Bookmarking in a browser or social website Sending links via email or instant messenger Finding specific content with the major search engines Utilizing browser history and reload buttons. Snippets.