[Papervision3D] Child objects mouse events?
Carlos Arroyo
dimago at gmail.com
Thu May 31 09:25:55 EDT 2007
Hi, Peter
I find an bug the Group.as that I posted couples days ago. This
is the new class
Group.as
package lib
{
import flash.display.Sprite;
import org.papervision3d.core.proto.SceneObject3D;
import org.papervision3d.objects.DisplayObject3D;
public class Group extends DisplayObject3D
{
public function Group( name:String=null, initObject:Object=null ){
super(name, null, initObject);
this.container = new Sprite();
}
//Override Methods
public override function addChild( child :DisplayObject3D, name
:String=null ):DisplayObject3D{
child = super.addChild(child, name);
child.container = new Sprite();
for each( var cChild:DisplayObject3D in child.children ){
cChild.container = new Sprite();
}
this.container.addChild(child.container);
return child;
}
public override function render(scene:SceneObject3D):void{
for( var j:int = 0; j<this.container.numChildren; j++ )
Sprite(this.container.getChildAt(j)).graphics.clear();
var iFaces :Array = super._sorted;
iFaces.sortOn( 'screenZ', Array.DESCENDING | Array.NUMERIC );
// Render
var container :Sprite = this.container || scene.container;
var rendered :Number = 0;
var iFace :Object;
for( var i:int = 0; iFace = iFaces[i]; i++ )
{
if( iFace.visible ){
container.addChild( iFace.instance.container );
rendered += iFace.face.render( iFace.instance,
iFace.instance.container );
}
}
// Update stats
scene.stats.rendered += rendered;
}
}
}
On 5/27/07, Peter Kapelyan <flashnine at gmail.com> wrote:
>
> Can we have this somehow available, in next revision - #1 first request I
> will make.
> Unless you want like 100 requests :)
> Yes if this works- this affirms my notion everything is Gestapo style and
> have to approach it as such...
> Congrats Carlos....deading a question or idea- doesn't it feel good?
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
"If you can't deal with screen language, you aren't literate"
John Seely Brown
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070531/ba67a3c7/attachment-0001.htm
More information about the Papervision3D
mailing list