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

View Example
http://www.noponies.com/dev/as3_fsresize/

Source Files
Here is the relevant source file: FullScreen Resize Object Files (1705) - 348.14 KB
By downloading, you agree to the terms of use, outlined here: http://www.blog.noponies.com/terms-and-conditions

Dependencies
None

Updates
03 October, 2008: Updated main resize code, as there was a slight bug when resizing

Dependencies
None!

Beta Version

I’ve created a new version of this class, that includes mouse panning for objects along with a panning to a point method

You can get the beta from here. NpFsObjectResize Beta (51) - 482.74 KB
Please let me know of any errors, or issues with the code.

ActionScript 3 Full Browser Tiled Background

ActionScript 3 Tiled Background class.

Simple class for creating a tiled background for your projects. Takes 3 arguments,
the first is either a bitmapData object or URL to an image, a Boolean indicating if you want to multiply blend your image. Which is useful if you
want to overlay the tile over other display objects. And finally, a string representing the repeat mode of your tile. Class also supports repeat modes, in the same vein as what CSS allows for.

Class Features

  • External Images or internal bitmap for tile
  • Get/set tile blend mode (Multiply)
  • CSS background repeat modes, ‘repeat’, ‘repeaty’, repeatx’, ‘norepeat’
  • TileFast Mode – a performance tile setting

Class is an extension of this class; http://blog.efnx.com/?p=25

View Example
Here is an example; http://www.noponies.com/dev/as3_tiled_bg/

Source Files Here are the examples source files; Tiled Background Source Files (1533) - 121.47 KB
By downloading, you agree to the terms of use, outlined here: http://www.blog.noponies.com/terms-and-conditions

Dependencies None

Updates 05 July, 2008: Performance tuning.

Images courtesy http://www.lydiabradbury.com/

ActionScript 3 Full Browser Background Video

An Full Browser Background Video Demonstration

Supports either progressive or streaming video and audio (AAC) 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.

    External Video files.
    Either .flv, or .mp4 (h264), f4v, m4a (AAC), m4v, files.
    Get / Set video looping.
    Dispatches Progress events.
    Get / Set a load point at which point video plays.
    Get / Set video source files.
    Play, Stop, Pause Methods.
    Get / Set Seek Points.
    Get / Set Sound volume.
    Get / Set Sound Pan.
    Get / Set Video Smoothing.
    Get Video MetaData.
    Get Video CuePoints.
    Get Video XMP Data.
    Get Video Image Data.
    Get Video Text Data.
    Definable Min scale size at which point the videos are clipped.
    Supports FullScreen Events.

The demo contains two examples, one similar to what is online and one much more basic version. When I have time I’ll finish off a 3rd demo for using the NpVideoProvider Class as the base for a FLV player.

Updates11 Oct 2008: Renamed a property. Updated help files, updated demo files to more clearly show how to avoid stretching your video files.

08 December 2008: Added in support for f4v files, by adding in callback handlers for XMP, text and Image Data. The demos have been updated to demonstrate pulling in cover art from both a video and AAC audio source using the NpVideoProvider Class. The class is at Revision 1.1 now.

In this demo, I’m also using a tiled Background class, as a pattern overlay. This decreases performance notably. There is an option to turn this off in the demo.

View Example
Here is an example; http://www.noponies.com/dev/as3_fullscreen_bg_vid/

Source Files
Donate if you want these source files

Dependencies
None.

« Previous Page