Graphics Reference
In-Depth Information
public class SimpleMenuSample extends Sprite {
private var _simpleMenu:SimpleMenu;
private var _menuArr:Array = new Array( " Menu Item
1 " , " Menu Item 2 " , " Menu Item 3 " );
public function SimpleMenuSample(){
_simpleMenu = new
SimpleMenu(_menuArr,10,SimpleMenu.VERTICAL);
_simpleMenu.assignAction(0, releaseFunction1);
_simpleMenu.assignAction(1, releaseFunction2);
_simpleMenu.assignAction(2, releaseFunction3);
_simpleMenu.setPosition(100, 0);
addChild(_simpleMenu);
}
public function
releaseFunction1(e:MouseEvent):void{
trace(
"
function 1
"
);
}
public function
releaseFunction2(e:MouseEvent):void{
trace( " function 2 " );
}
public function
releaseFunction3(e:MouseEvent):void{
trace( " function 3 " );
}
}
}
The SimpleGallery Class
There will most likely be occasions where your client wants to
show off a gallery of either several of their products or multiple
photographs of a specific product. The automobile manufacturer
example I
ve used in this topic would be a prime candidate for a
photo gallery. Since you may find yourself making these galleries
on project after project after project, it might be a good idea to
haveasimplebaseforoneatyourdisposal.TheSimpleGallery
class is meant as exactly that. With control over properties to do
things like move the entire gallery around and control how many
columns you want to break the gallery into, it gives you a simple
layout with a simple method to view each thumbnail in its larger
form. You only need to tell it the directory where the images live
and which ones to pull from that directory, and it will take care of
the rest for you. As we go through the code, note that there is no
transition from the thumbnail of an image to its full-size version.
'
Search WWH ::




Custom Search