topical media & game development
#graphic-player-10-cube-be-nascom-flash10-tests-widgets-SimpleCubeSide.ax
#graphic-player-10-cube-be-nascom-flash10-tests-widgets-SimpleCubeSide.ax
[swf]
[flash]
flex
package be.nascom.flash10_tests.widgets{
import flash.display.DisplayObject;
import flash.display.Sprite;
Simple wrapper to make creation of materials easier
Essentially just a list of any display list objects to the SimpleCube
will result in a working cube menu...
public class @ax-graphic-player-10-cube-be-nascom-flash10-tests-widgets-SimpleCubeSide extends Sprite{
public var material:DisplayObject;
public function @ax-graphic-player-10-cube-be-nascom-flash10-tests-widgets-SimpleCubeSide( cube_size:uint,
material:DisplayObject,
offset:Offset3d
){
super();
addChild(material);
this.material=material;
applyOffset(offset);
}
public function applyOffset(offset:Offset3d):void{
material.x=offset.x;
material.y=offset.y;
material.z=offset.z;
material.rotationX=offset.xrotation;
material.rotationY=offset.yrotation;
material.rotationZ=offset.zrotation;
}
}
}
(C) Æliens
04/09/2009
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.