what im i doing wrong here trying to put a movie clip as a texture for
an existing object name Object5_.
(that mesh is in the .awd file)
i have a movie clip named mc_video with the proprety name mc_video...
(i guess it does not work when setting the movie clip property to
export for ActionScript)

i get an error of undefined property Object5_


package
        {
        // Class generated by Prefab3D. David Lenaerts & Fabrice Closier,
2011.
        import away3d.arcane;
        import away3d.cameras.lenses.PerspectiveLens;
        import away3d.containers.View3D;
        import away3d.core.base.Object3D;
        import away3d.core.clip.NearfieldClipping;
        import away3d.graphs.ITreeNode;
        import away3d.graphs.TreeIterator;
        import away3d.graphs.bsp.BSPNode;
        import away3d.graphs.bsp.BSPTree;
        import away3d.loaders.AWData;
        import away3d.physics.BSPCollider;


                 //// ive added this line here

                 import away3d.materials.MovieMaterial;



        import flash.display.*;
        import flash.events.Event;
        import flash.events.KeyboardEvent;
        import flash.events.MouseEvent;
        import flash.geom.Vector3D;
        import flash.ui.Keyboard;

        use namespace arcane;

        //[SWF(frameRate="60", backgroundColor="0x000000", width="800",
height="600")]
        public class Expo extends Sprite
        {
                [Embed(source="expo.awd", mimeType="application/octet-stream")]
                private var BSPFile:Class;

                private static const MOVE_SPEED:Number = 180;
                private static const JUMP_STRENGTH:Number = 100;
                private static const ACCELERATION:Number = 40;
                private static const RUN_MULTIPLIER:Number = 2;
                private static const GRAVITY:Number = 10;
                private static const FRICTION:Number = .3;
                private var _lastMouseX:Number;
                private var _lastMouseY:Number;
                private var _lastRotX:Number;
                private var _lastRotY:Number;
                private var _rotX:Number;
                private var _rotY:Number;
                private var _right:Boolean;
                private var _left:Boolean;
                private var _rotaccel:Number = 0.0;
                private var _tree:BSPTree;
                private var _view:View3D;
                private var _xDir:Number = 0.0;
                private var _zDir:Number = 0.0;
                private var _mouseDown:Boolean;
                private var _dragX:Number = 0;
                private var _dragY:Number = 0;
                private var _bspCollider:BSPCollider;
                private var _force:Vector3D = new Vector3D();
                private var _flightMode:Boolean = false;
                private var _speedMultiplier:Number = 1.0;
                private var _noClip:Boolean = false;

                public function Expo()
                {
                        addEventListener(Event.ADDED_TO_STAGE, init);
                }



                                 /// and these functions here ive
added too


                private function init(e:Event):void
                {
                        initStage();
                        initAway3D();
                        initMaterials();

                }


                private function initMaterials():void{
                                               Object5_.material = new
MovieMaterial(mc_video, { interactive:true });
                                }




and the code goes on for a regular project exported under prefab v1.5
(witch is awesome)
ive found several tutorial on putting a movie clip on a mesh, but
nothing for a project created with prefab...
and i guess that would be something really interesting to have in the
prefab tool a plugin where we could assing
the movie clip we want to put on a mesh in the project...

please help !

:)

Reply via email to