topical media & game development
sample-Gallery.ax
sample-Gallery.ax
(swf
)
[ flash
]
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
// All Rights Reserved.
// The following is Sample Code and is subject to all restrictions on such code
// as contained in the End User License Agreement accompanying this product.
// If you have received this file from a source other than Adobe,
// then your use, modification, or distribution of it requires
// the prior written permission of Adobe.
//
/////////////////////////////////////////////////////////////////////////
package
{
import
mx.collections.ICollectionView;
import
mx.collections.ArrayCollection;
import
mx.collections.IViewCursor;
[Bindable]
public class sample-Gallery
{
public var name:String;
public var description:String;
public var photos:ArrayCollection;
public var selected:int;
private var photo:
sample_Photo;
public function sample-Gallery(gallery:Object=null)
{
photos = new ArrayCollection();
if (gallery != null)
{
fill(gallery);
}
}
public function fill(gallery:Object):void
{
this.name = gallery.id;
this.description = gallery.description;
this.selected = 0;
for (var i:int=0; i < gallery.photo.length; i++)
{
photo = new
sample_Photo(gallery.photo[i]);
photos.addItem(photo);
}
}
}
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.