Flash Source | Mc shake Flash Source | Terrain Collisions
6

Flash Tutorials | AS3 Classes Roundup Part 1

Flash Classes, Tutorials

AS3 class is very important with Flash developer. It helps you repeat certain tasks in easily manner. This post collects a lot of article about AS3 Classes. I hope you  work  faster

1.Lightweight SHA1 encryption class for Actionscript 3

Don’t send unencrypted data from Flash to PHP. I’ve prepared a class that will take a string and convert it to HEX SHA1. It’s fully compatible to compare with PHP sha1(), puts less than 1Kb filesize penalty to your project and is able to iterate through at least 50 calculations a second…

Read more

2.Bitmap/Vector into firefly particles AS3.0

Inside you can find a quick experiment + source to a AS3 class that breaks up vectors/bitmaps into particles and then moves them around in a semi-random firefly pattern. It’s a little bit CPU intense so I added a fps meter (fpsbox, courtesy of Schell Scivally). On lesser computers I’m sure it can choke a little bit due to the 2000-ish bitmap particles swarming around with filters but all it all it should be fairly okay.

as3_ff

Read more

3.ActionScript 3 Full Browser Background Video

An Full Browser Background Video Demonstration

Supports either progressive or streaming video files (streaming tested using Red 5 and FMS). The demo consists of 3 classes, the main NpVideoProvider Class handles acquiring video, a NetConnect Class handles all netConnection duties, and an event class handles all the necessary events. Originally I wrote a class to handle testing BandWidth on streaming servers, but I didn’t think people would want that. If I’m wrong, I can add that functionality back in?

Class allows for loading in seperate files. So it would be pretty simple to turn this into a video slideshow. Class also, dispatches progress events along with events for each relevant netStatus event.

Class Features

  • Min Stage Width – point at which scaling will turn off
  • Min Stage Height – point at which scaling will turn off
  • Use Stage Min – Controls whether or not objects scale or clip at a the MIN stage points
  • Scale Modes – “full”, “height”, “width”
  • Align Objects within stage dimensions
  • Position Objects within stage dimensions

Read more | Demo

4.ActionScript 3 Accordion Content

ActionScript 3 Vertical & Horizontal Accordion Menu with support for columns of content.

This example extends and supersedes an earlier version of this file I wrote about a year ago. I always wanted to make a horizontal version and extend the class, making it more flexible and useful to people.

As was the previous menu, this menu is a Class based ActionScript 3 Accordion Menu, with either a rollOver/RollOff activation scheme for a onRelease activation scheme. I also added in a better extended event class which allows you to control, or respond to all menu activity via events.

Class Features

  • Vertical or Horizontal Menu Orientation
  • Visible or invisible Menu Bar
  • Supports parsing functions passed to each menu item
  • Custom Menu Bar Assets
  • Option for persistent Menu Panels
  • Menu Spacing
  • Menu text position
  • MenuBar colour / RollOver/Off colour
  • Menu text format
  • Menu tween speed
  • Menu easing type
  • MenuBar width, height, visibility
  • Menu Click behaviour
  • Disable / Enable Menu
  • Open Particular Panels
  • Menu attributes are applicable on a per menu item basis
  • etc, etc.

Read more | Demo

5.ActionScript 3 Full Browser Background Content

This is the second iteration of this class. I decided to put the NpFSObjectResize Class to use within this demo, using that class as the superclass for here. As a result, this new version of this file is much more capable, supporting stage alignment modes along with a simple method for loading in new background images or swfs. You could use that feature to create a simple full browser slideshow, but be warned that I have not used the same bitmapData memory management techniques as I have within the Full Browser Cross Fading demo. So, your memory useage could get higher using this class as a slideshow (as you will be waiting on the garbage collector to do its thing).

Class Features

  • Stage Alignment Modes
  • Load New Bg Method
  • Specify Cross Fading Time
  • Specify Min Stage Scale points

Read more | Demo

6.Scale9Grid Class for Masking in AS3

I ran into another quirk with Flash today. I couldn’t get Flash to apply Scale9Grid correctly on sprites/movieclips that were being used as Masks. After searching for help it seems as though the two features are not compatible (please correct me if I am wrong). Therefore, I threw a class together this afternoon that creates a Rectangle with rounded corners that automatically scales according to the scale9Grid rules. The class allows you to use the rounded rectangle as a mask without having the corners distort when it scales.

Read more

7.Greensock releases TransformManager, a spectacular AS3 class

Just got word from Jack / Greensock (Creator of TweenMax/TweenLite) that his most recent creation, TransformManager, is out on the market. Unlike the tween packages, it’s not open source, but has a small price tag on it. Personally, I would encourage everyone to either buy this, or support Jack via his Club Greensock. TweenMax/Lite is an amazing accomplishment from just one person and accomplishments should always be rewarded

Read more

8.Pixelator – Yet another transition effect for AS3

I am not naive enough to believe I originally created this effect. As with anything, there always seems to be someone somewhere that did it sometime before :) . Either way, I made a version of it for my previous site in AS2 and it came with me when I updated the site.

pixelpreview

Read more

9.ActionScript 3 Flexible Layout Class

The NpFlexLayout Class is designed to simplify aligning DisplayObjects to stage dimensions and responding to changes in stage dimensions at run time by a user or between different users.

This supersedes a simpler implementation of this approach, called “ActionScript 3 Liquid Layout Manager”, which I’ll leave on the site.

As opposed to the LayoutManager class, the NpFlexLayout class is an actual layout manager, taking care of instantiating, destroying and passing on requests to instances of an internal class called NpFLexLayoutItem which wraps each displayObject passed to the NpFlexLayout Class.

Class Features

  • Position objects (x,y) on the stage as a proportion of the stages dimensions
  • offSet each displayObject (x,y) from where it would be by an absolute pixel value
  • set objects to stretch to fit either stage width / height or a proportion of stage dimensions
  • per object minX & minY settings where reflowing, resizing will cease
  • use either the clips registration point, or its visual center (width/height)
  • pause, resume displayObjects responding to resize events
  • update individual class properties at runtime
  • tween objects properties at runtime (uses internal simple tween method)
  • set tween easing
  • add, remove displayObjects from class

Read more | Demo

10.A Custom HorizontalSlider AS3 Class in Action: Applying Color Tints to a Photo

The purpose of this tutorial is to present our custom HorizontalSlider (and VerticalSlider) classes that provide a light-weight, easily customizable alternative to the built-in slider component in Flash CS3. The component has the unfortunate side effect of adding a lot to the swf file size, especially if you need multiple sliders in one application. To show our sliders in action, we built a simple applet displayed below in which color tints are applied to a photograph.

8-24-2008 10-36-37 AM

Read more

11.ActionScript 3 FullScreen Object Resize Class

The NpFSObjectResize Class is a fairly simple ActionScript 3 class for displaying any DisplayObject at fullScreen (fullBrowser) screen dimensions. The class gives you the options of resizing to full the entire screen, or to resize to either width or height. You are also able to align your objects anywhere within the stages dimensions. This allows for you control where your objects scale from (via positioning) them. So, you can center your objects, or align them bottom right and so on.

Updates 1 August 2008: Updated with new stage alignment properties, adjustments to constructor.

Class Features

  • Min Stage Width – point at which scaling will turn off
  • Min Stage Height – point at which scaling will turn off
  • Use Stage Min – Controls whether or not objects scale or clip at a the MIN stage points
  • Scale Modes – “full”, “height”, “width”
  • Align Objects within stage dimensions
  • Position Objects within stage dimensions

Read more | Demo

12.Active Window(S) Blur

After taking another look at this post, I came up with a way of making multiple windows that will all blur the same image. I have to admit, though, I’m not particularly fond nor proud of the way I did it. The trouble is this: a masked display object can only have a single mask – so all items which will be used as a mask must be added to a single encompassing parent. But you would also like each mask item to be draggable along with the window it “rides behind”. Therefore, ideally, you’d like each mask item to be a child of the window instance (as I did it in the previous post). But there lies the rub. A display object can have only a single parent, hence you can’t add the child to both the mask and the window.

The solution I came up with was this: add the masking item to the mask instance and move the masking item with the window using an ENTER_FRAME event (rather than a parent-child relationship). If anyone has a more elegant solution, please post a comment. I’m probably overlooking something simple, but brilliant…

Read more

13.AS3 |19 Custom AS3 Classes Roundup

cool article about AS3 Classes

Read more

  • Share/Bookmark
 

Story by admin

Tags: , , , , , , , ,

6 Comments

  1. Erik Hallander (Reply) on Sunday 24, 2008

    Hey dude, I’d appreciate if you’d remove the direct link downloads to my stuff ; ) Don’t mind if the articles remain but direct links are the epitome of evul! ;)

    /Erik

     
  2. admin (Reply) on Sunday 24, 2008

    @Erik : Okay! If you don’t like,I’ll remove it.

     
  3. Noponies (Reply) on Sunday 24, 2008

    Hey,

    I’m with Erik with this one, please remove the direct links to the source files. There is no guarantee that the source files ever remain in the same place, name etc. Just link to the blog articles, which is all fine. :)

     
  4. automotive floor jack (Reply) on Sunday 24, 2008

    It’s the first time I commented here and I must say that you provide us genuine, and quality information for other bloggers! Good job.
    p.s. You have an awesome template for your blog. Where have you got it from?

     
  5. siva (Reply) on Sunday 24, 2008

    hai this siva pls tell me how to see ur tutorial this not proper how to i study this tutorial pls send u r reply as early as

     
  6. zeroone (Reply) on Sunday 24, 2008

    click READ MORE link

     

Leave a Comment

Banner
Banner Banner