July 31st 2008 - Entry Posted to:
ActionScript 3,class
ActionScript 3 Full Browser Background Content.
This is the second third 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).
This class has been completely rewritten, as of version 2. The api has changed, and many new methods and properties are present. The classes event model has been shifted into its own class, and a new class now wraps each display object, which is the foundation for more work on transitions other than a straight alpha fade. This version is not compatible with any older versions!
The demo file contains an example of using this class with an XML iterator, with various methods for creating slideshows etc. Along with this example, is a very simple implementation, commented out in the actionscript layer of the .fla.
Class Features
- Stage Alignment Modes
- Load New Bg Method
- Specify Cross Fading Time
- Specify Min Stage Scale points
- Pass Through Mode, where scaling is disabled
- Specify Max scale of content
- Specify content only scales upwards
View Example
Here is an example. In this example, the first file (swf) is set to scale to only 70% of the stages size, and stay centered, the second file (bitmap) is set to scale to full browser dimensions. View example here: http://www.noponies.com/dev/as3_fullbrowser_bg/
Updates
04 August, 2008: Added in ability to load in swfs as content.
17 Oct, 2008: Method change, shift from using timer to crossfade to internal Adobe tween class.
06 Jan, 2009: Completely rewritten, new API, new classes, new event model.
08 July, 2009: Fixed the bug with short tween in times, and a small issue with garbage collection
13 July, 2009: Fixed a slight bug with the example files related to iterating in reverse over a collection
Source Files
Here is the relevant source file; Full Browser Content Files (3229)
I’ve been playing around with javascript libraries more and more recently, I converted this file into a lightweight jQuery plugin, which can be viewed here; http://www.noponies.com/dev/as3_fullbrowser_bg/resize.html. If there are no problems, I’ll release it. In many ways, the writing is kinda on the wall for Flash, javascript can do a lot of the presentation things I would normally do in Flash.
By downloading, you agree to the terms of use, outlined here: http://www.blog.noponies.com/terms-and-conditions
Dependencies
None.