ActionScript 2 Accordion Menu

This is an ActionScript 2 version of the ActionScript 3 Accordion Menu.

This version is far far less feature complete than the ActionScript 3 version. This version was a “proof” of concept if you like of how I would approach making an Accordion Menu, which I then used as conceptual direction when making the ActionScript 3 version.

Nevertheless, it is an XML Accordion, but does not support function calls from the XML file. It is also not class based, and instead relies on two fairly simple sections of timeline actionScript to generate its functionality. The two .fla files have good comments and directions on what to edit to make changes to the ActionScript.

If there is demand, I can finish this menu to the level of the ActionScript 3 version.

View Example
Here is an example of the menu; http://www.noponies.com/dev/as2_accordion/

Source Files
Here are the source files; ActionScript 2 Accordion Menu Source

Dependencies
The menu uses Tweener. Its an old file, that I have not update to tweenLite.

ActionScript 3 Liquid Layout Manager

Simple class that repositions objects passed to it when a stage resize event occurs.

Class is designed to simplify creating flexible or liquid layouts in Flash CS3. For a project I had I needed to create a flexible layout, so rather than creating a set of functions etc that resized the various objects I wrote this class.

It is simple and probably not as optimised as it could be, but does support the features I needed it to well.

Class positions elements using proportions of the stage, rather than specific values. I felt it was simpler to specify a value of 100 for absolute bottom or right, or 50 for middle etc.

Read Class documentation for usage directions.

Class Features

  • Ability to set a min Stage size at which point the layout manager will not reposition objects
  • Layouts are proportionally based
  • Use either clip reg point or clip natural center for positioning
  • Public method for accommodating changes in content dimensions

View Example
Here is an example; http://www.noponies.com/dev/as3_stage_manager (Resize the browser window to see it work, click pink square!)

Source Files
Here are the source files; AS3 Stage Manager Source Files, v1.2

Dependencies
Flash CS3

ActionScript 3 Sliding Images XML Gallery

This file is a ActionScript 3 demo of a sliding images gallery, as used on my work site, http://www.thereformation.co.nz.

Basically images are loaded sequentially from an XML file into a Sprite, which is dynamically masked and then tweened. The gallery has support for text descriptions (via a support class) and also creates a dynamic image number navigation system which updates itself based off how many images you happen to load in.

This is a class based file, which relies on two helper support classes. One of which simply provides an array of images from an XML file. The other, the “TextNavigation” class provides a mechanism for dispatching events to the text navigation section of the gallery. Updating its status, so that it matches the currently displayed image. There is also an optional text descriptions class which will pull in descriptions from an XML file and display these along with the images.

Gallery Features

  • Vertical or Horizontal Sliding
  • External XML Images
  • next, previous, play, pause public methods
  • Supports multiple galleries
  • Event Based Architecture
  • Dynamic tweened mask, so that it supports different image sizes
  • Either Manual or Automatic Image Progression
  • Optional Text Navigation – supports embedded fonts
  • Optional Text Comments – supports embedded fonts

Updates
July 08, 2008: A new rewrite of the class moving it to a more modular structure. I’ve decided to make this a donator file, after spending a solid day rewriting it. Download includes, source, example and documentation.
Jan, 12, 2009: API changes, new events, class now supports loading in new galleries, various bug fixes and documentation improvements. Class is now at Version 1.5

Updated 15 July, with a new method for autotweening text comments

View Example
Here is an example of the file; http://www.noponies.com/dev/as3_slideimages/

Source Files
Donator Only File

Dependencies
Files use TweenLite, available from here; http://www.tweenlite.com

Holiday Reading

A bit of light holiday reading for me while up at Rarawa Beach on the North Islands East Coast. Can’t beat a dose of Essential ActionScript 3!

Holiday Reading

Simple ActionScript 2 XML Gallery

Sample Flash file for a very basic bare bones XML gallery with a scrolling thumbnails track, and simple load progress handling. This example is really meant as a basis to build something more elegant and interesting on. In that sense, it provides a skeleton for a site, and it is up to you, as a user of the file to skin it.

This file started life as a comparison to an ActionScript 3 implementation of the same idea. The ActionScript 3 version is more elegant and is slightly more flexible.

Gallery Features;

  • Horizontal or Vertical Scrolling Thumbs track
  • External XML Images
  • Load Progress Handling
  • Ability to load in different XML files

The source file contains two files, one file has a horizontal image scrolling track, while the other has a vertical images scrolling track.

View Example
Example can be viewed here;?Ǭ† http://www.noponies.com/dev/as2_simple_gallery/ (Note, no progress loading implemented)

Source Files
Here are the source files; ActionScript 2 Simple Gallery Files

Dependencies
File uses TweenLite, for image fading in and out.
Flash 8 or Flash CS3

ActionScript 2 Sliding Images Gallery

This file is a demo of a sliding images gallery, as used on my work site, http://www.thereformation.co.nz.

Basically images are loaded sequentially from an XML file into a movieClip, which is dynamically masked and then tweened. The gallery has support for text descriptions and also creates a dynamic image numbers navigation system which updates itself based off how many images you happen to load in. All text is CSS styled.

Contained in the .zip file are a Flash CS3 and Flash 8 source file, XML files, sample images, the tweenFilterLite class and the font used in the project.

Updates
09 June, 2008. File now supports multiple XML files

View Example
View an example of the project here; http://noponies.com/dev/slideimages/ (no preloader, 36k file size)

Source Files
Grab source files here; Sliding Images Gallery Source

Dependencies
TweenFilterLite http://www.tweenlite.com
Flash CS3 or Flash 8

ActionScript 3 XML Accordion Menu

This menu system was written as a means to display images or other content in a condensed manner.

Class based ActionScript 3 Accordion Menu, with either a rollOver/RollOff activation scheme for a onRelease activation scheme. Menu is built using a custom event dispatch scheme to keep each menu item synchronised with the changing states of the menu. The menu grabs a reference to the Stage via the ADDED_TO_STAGE event, which is uses as its base for setting up the communication between menu elements.

Menu Functionality

    Support for Images and Swfs as content.Swfs can contain their own interactivity.Either Click or MouseOver menu to activate it.XML Driven.XML can contain function calls with parameters, or URLs or nothing.Menu Highlighting is an option.Either the whole menu item, or just the menu bar can be used to trigger menu movement.Menu supports content of differing sizes. Menu will auto size the menu bar width, but is content height agnostic.Support for placement.Support for spacing between menu items and menu bar item height.Menu Bar has a test element, pulled in from the XML file.Column support. But you will have to add that change yourself.Menu uses either tweenLite or tweener for menu movement.Custom Event Dispatch class for sending events to particular menu instances. Eg, for telling one menu to slide open after all have loaded.Class has a reset method, should you need to reset the menu

If you are going to get the menu to trigger events it is generally it is better to only use the bar, so as to not interfere with your other nested actions.

Menu is a class file, which relies on be passed three values in its constructor,?Ǭ† (loader content, title text, menu action), all of which are values that are pulled in from the XML file.

Included in the download are two folders, one?Ǭ† accordianAS3_rel contains the onRelease version of the class. The other, accordianAS3_roll contains the RollOver version of the class. In each folder are each classes respective Flash CS3 document, its associated Document Class file, an XML file, an XML parsing class, the tweenLite Class and images and swfs.

Updates10th Feb, 2008: Added custom event dispatch class to both examples.

View ExamplesActionScript 3 XML Accordion Menu: On Release VersionActionScript 3 XML Accordion Menu: On RollOver Version

Source FilesHere are the source files; ActionScript 3 XML Accordion Menu V2

DependenciesClass uses the tweenLite tweening class for menu movement, highlighting etc; http://www.tweenlite.com

Next Page »