ActionScript3.0 Rectangle class is part of the flash.geom package besides Point, Matrix, Transform and ColorTransform. Any visual representation of rectangles has to be implemented by programmer. One way of doing it is to create new class and here I wanted to include rectangle color as initial parameter, so this new class vRectangle (from visual rectangle, off course) looks something like this:vRectangle.aspackage{ import flash.geom.Rectangle; import flash.display.Shape; import flash.display.Sprite; public class vRectangle { public var rect:Rectangle; public var shape:Shape; public function vRectangle(a:Number, b:Number, c:Number, d:Number, e:uint):void { this.rect = new Rectangle(a, b, c, d); this.shape = new Shape(); this.shape.graphics.beginFill(e); this.shape.graphics.lineStyle(2, 0×000000); this.shape.graphics.drawRect(rect.x,
1469 readersWith Flash you can create some awesome code generated graphics. Often you’d like to save these graphics as an image, so you can edit them afterwards with image editing software or just showcase them. We’ll use the HYPE framework from Joshua Davis and Branden Hall to save our code-generated graphics as a PNG. View Screencast Don’t like
834 readersIn some Flash games author often has a need to display energy bar for hero character or enemy character or both. In this tutorial you will learn how to create reusable energy bar which you can ..., well reuse, in all your future projects. Code is pure ActionScript 3.0. I'm trying to develop this habit
584 readersFew posts ago I introduced Dynamic Bitmap Split Function. This function allows you to split any Bitmap into any (reasonable) number of column and rows and use those parts separately.Here is one quick example of using this function together with Tweener class. Click on image to see live example.and here is code:import flash.display.Bitmap;import flash.display.BitmapData;import flash.utils.ByteArray;import
1276 readers
256 readersIn this 3rd part we’ll manage stage edges and balls collisions. You’re invited to read steps 1 and 2 if you didn’t already. The main function does not change. 1 2 3 4 5 6 7 8 9 10 11 package { import flash.display.Sprite; public class onon extends Sprite { // field_mc has a parameter
899 readers
1125 readers
1745 readers
2031 readersIn this tutorial I’ll show you how to create a menu like Apple’s Dock using AS3 classes. We will create a single .as file that will perform all the magic, extending it to add new features. Final Result Preview First, let’s take a look at what we’ll be creating. Roll your mouse over the icons to see
933 readersLet's continue from where we finished last post. We have Triangle AS3.0 class up and running and we want to use it and draw some pyramids.If you look carefully you will notice that every pyramid consist of two triangles. This is actually simplified version where only two sides are visible and front side triangle has
8,013
Subscribe to RSS headline updates from:
GurusUnleashed
Powered by FeedBurner
Curious what others are searching for? Below are the most popular search terms over the last 30 days.

