background preloader

Deep linking

Deep linking

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 Under this method the loading progress is monitored via the LoaderInfo instance associated with the stage. Graphics Go to File → New… and select Flash File (ActionScript 3.0).Using the Rectangle tool create a rectangle (include a stroke) on the stage that is 100 pixels wide by 10 pixels high.Click on the fill of the newly created rectangle and select Modify → Convert to Symbol… Name the new instance ProgBar and set the registration point to left-middle. Save the file. Code

flashtica // Free Open Source Actionscript and Flash code files and resources directory 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. One way to achieve this is to move the content inside the Sprite in order to change its position in relation to the registration point. Another way is to wrap your Sprite into another Sprite and rotate the parent. Solution: the Rotator class can be used as a replacement for the default Sprite.rotation property. Source. Example. Use it like this: Actionscript:

Supported Browsers * Internet Explorer 6+ * Mozilla Firefox 1+ * Safari 1.3+ * Opera 9.5+ * Chrome 0.2+ * Camino 1+ by nicolas Apr 1

Related: