5 Replies Latest reply on Aug 28, 2012 10:49 AM by sinious

    Is it possible to draw a mesh on top of a background image in flash ?

    rakeshkr590 Level 1

      Problem i am trying to draw my 3d mesh on top of any image or an object in flash but my model is drawing under the image all the time i don't know how to sort this problem since i am bit new to flash development .

      Please help me with this thank you.

        • 1. Re: Is it possible to draw a mesh on top of a background image in flash ?
          sinious Most Valuable Participant

          Are you adding the image as a child of a display object then using the graphics class to draw the mesh? The graphics class always draws at the bottom most level of the current display object.

           

          e.g.

           

          var container:Sprite = new Sprite();

           

          // add existing MyImage sprite from library (exported for AS)

          var myImage:Sprite = new MyImage();

           

          // add image to container

          container.addChild(myImage);

           

          // draw black square using graphics

          container.graphics.beginFill(0x0,1);

          container.graphics.drawRect(0,0,100,100);

          container.endFill();

           

          The black square drawn will be under the image, even though the code happened after the image was added. You'd need to make a new display object above your image to draw to and then add that over the image.

           

          e.g.

           

          // make a new sprite, draw the black box

          var mesh:Sprite = new Sprite();

          mesh.graphics.beginFill(0x0,1);

          mesh.graphics.drawRect(0,0,100,100);

          mesh.endFill();

           

          // add to container, which will now be over the image

          container.addChild(mesh);

           

          Just add your code to draw your mesh and make sure it's added over your image.

          1 person found this helpful
          • 2. Re: Is it possible to draw a mesh on top of a background image in flash ?
            rakeshkr590 Level 1

            Hi sinious thank you for replying me but my problem i am drawing a 3d mesh using away 3d but when i am trying to insert a background image to my 3d object its not happening instead it is displaying that image on top of my 3d object could any one of you guys please help me with this thank you.

            • 3. Re: Is it possible to draw a mesh on top of a background image in flash ?
              sinious Most Valuable Participant

              Please share some code with us as to how you're doing this. There's many ways and many frameworks. As much detail as possible is best.

              • 4. Re: Is it possible to draw a mesh on top of a background image in flash ?
                rakeshkr590 Level 1
                Sorry about this messy code its because of this copy pasting stuff but if you could press ctrl + f and type Init mesh and Init Functions thats where everything is happening and this 3d mesh will be loaded 
                using a preloader function in a separate file thats why i add a event with Added_to_stage to the listener Problem is once i Draw this mesh with their morph target on to the screen i couldn't able to draw anything
                in the background of this object everything comes on top of this 3d mesh .
                once again sorry for this mess anyway its still in the unit test phase  .
                
                package 
                {
                // All the import stuff hided by me ...
                
                
                          [Event(name="FLACEventEncodingComplete", type="FLACEvent")]
                          [Event(name="FLACEventDecodingComplete", type="FLACEvent")]
                          [Event(name = "progress", type = "flash.events.ProgressEvent")] 
                          public class ChatBotMain extends Sprite 
                          {
                                    //Embedded assets
                                 Variable which loads all the textures are hided ....
                                    //engine variables
                                    private var scene:Scene3D=new Scene3D();
                                    private var camera:Camera3D = new Camera3D();
                                    private var view:View3D = new View3D(); 
                                    private var cameraController:HoverController;
                                    private var dlight : DirectionalLight;
                                    //material objects
                                    Hided
                                    //scene objects
                                  Hided
                
                                    //navigation variables
                                 Hided
                
                                // morph targets 
                                    // hided ......
                                    //Chatbot code
                                 Hided
                                    //Flac encoding variables
                                 Hided
                                    //button bitmaps
                                  Hided
                                    public function ChatBotMain():void 
                                    {
                                              var stage1:Stage = Stageobject;
                                              //trace("stage",stage1.stage);
                                              this.addEventListener(Event.ADDED_TO_STAGE,init);              
                                    }
                                    /**
                                     * Global initialise function
                                     */
                                    private function init(e:Event= null):void
                                    {
                                              this.removeEventListener(Event.ADDED_TO_STAGE,init);
                                              microphone = Microphone.getMicrophone();
                                              microphoneBuffer.length = 0;
                                              microphone.rate = 16;
                                              flacCodec = (new cmodule.flac.CLibInit).init();
                                             initListeners();
                                             initEngine();
                                              initLights();
                                              initMaterials();
                                              initObjects();
                                              fileCount = 8;
                                              initChatBot();
                                              bootscreenBitmap.x = (width / 2) - (bootscreenBitmap.width / 2);
                                              bootscreenBitmap.y = (height / 2) - (bootscreenBitmap.height / 2);
                                             //addChild(bootscreenBitmap);
                                              headMeshGeometry = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/head3.mesh.xml",onloaded,true);                    
                                              headMeshGeometry_blink = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/head3_blink.mesh.xml", onloaded, true);
                                              headMeshGeometry_mouthopen = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/head3_mouthopen.mesh.xml", onloaded, true);
                                              headMeshGeometry_smile = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/head3_smile.mesh.xml",onloaded,true);
                                              eyelMeshGeometry = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/eyeball2_l.mesh.xml",onloaded,true);
                                              eyerMeshGeometry = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/eyeball2_r.mesh.xml",onloaded,true);
                                             hairMeshGeometry = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/hair3.mesh.xml", onloaded, true);
                                              shirtMeshGeometry = new CustomPrimative("C:/Users/Rakesh/Documents/flashport/Chatbot/embeds/shirt.mesh.xml",onloaded,true);
                                              //We can use the playerObject class to "analyse" the audio data as it is being played
                                              //Currently not needed due to just moving the mouth in random patterns as the speech plays
                                              playerObject.outputSnd = new Sound();
                                              playerObject.outputSnd.addEventListener(SampleDataEvent.SAMPLE_DATA, processSound);
                                    }
                                    private static const FLOAT_MAX_VALUE:Number = 1.0;
                                    private static const SHORT_MAX_VALUE:int = 0x7fff;
                                    /**
                                    * Converts an (raw) audio stream from 32-bit (signed, floating point) 
                                    * to 16-bit (signed integer).
                                   * 
                                    * @param source The audio stream to convert.
                                    */
                                     public function convert32to16(source:ByteArray):ByteArray
                                         {
                                           }
                                    /**                    
                                          * Called when encoding has finished.
                                     */
                                    private function encodingCompleteHandler(event:*):void {
                                    }
                                    function ioErrorHandler(e:Event):void {
                                              trace("error");
                                              thinking = false;
                                              microphoneButton.upState = upButton;
                                              microphoneButton.overState = downButton;
                                              microphoneButton.downState = downButton;
                                    }
                                    function loaderCompleteHandler(e:Event):void {
                                              var loader:URLLoader = URLLoader(e.target);
                                              var str:String = loader.data;
                                              trace(str);
                                             if (str.length > 0)
                                              {
                                                      _mytext.text = str;
                                                       sendText();
                                              }
                                              thinking = false;
                                              microphoneButton.upState = upButton;
                                              microphoneButton.overState = downButton;
                                              microphoneButton.downState = downButton;
                                              //var responseVars = URLVariables( e.target.data );
                                              //trace( "responseVars: " + responseVars );
                                    }
                                    /**
                                     * Called when the encoding task notifies progress.
                                     */
                                    private function encodingProgressHandler(progress:int):void {
                                              trace("FLACCodec.encodingProgressHandler(event):", progress);
                                              dispatchEvent( new ProgressEvent(ProgressEvent.PROGRESS, false, false, progress, 100));
                                    }
                                    private function getElapsedTime():int {
                                              var now:int = getTimer();
                                              return now - initTime;
                                    }
                                    private function start() : void {
                                              initTime = getTimer();
                                    }
                                    public function encode(data:ByteArray):void 
                                    {
                                    }
                                    private function onSampleData(event:SampleDataEvent):void
                                    {
                                    }
                                    private function onloaded(event:CustomPrimativeEvent):void
                                    {
                                              fileCount--;
                                              trace("loaded geometry " + event.asset.url);
                                    }
                          function processSound(event:SampleDataEvent):void
                          {
                          }
                           private function drawButton():void
                           {
                          }
                                    private function buttonPressed(e:Event):void {
                                              if (!thinking)
                                             {
                                                if (recording)
                                                {
                                                         StopRecording();                                                                                    
                                                }
                                                else
                                                {
                                                          //start recording
                                                          recording = true;
                                                          //
                                                             hided
                                                }
                                              }
                                    }
                                    private function StopRecording(): void 
                                    {
                                              //stop recording
                                              recording = false;
                                              microphone.removeEventListener(SampleDataEvent.SAMPLE_DATA, onSampleData);
                                              encode(microphoneBuffer);
                                    }
                                    private function initChatBot()
                                    {
                                    }
                                    function keyHandler(e:KeyboardEvent)
                                    {
                                              if(e.charCode == 13)
                                              { 
                                                        sendText()
                                              }
                                    }
                                private function onOpen(e:Event)
                                    {
                                         debugOutput2.text = "Connection opened";
                                      }
                
                         private  function onStatusChange(e:HTTPStatusEvent)
                          {
                                debugOutput2.text = "Status Changed to "+e.status;
                        }
                        private  function onMessageFailIO(e:Event)
                     {
                            debugOutput2.text = "IO ERROR: Could not send your request. Please try again later.";
                        }
                                     private  function onMessageFailSecurity(e:Event){
                            debugOutput2.text = "Security ERROR: Could not send your request. Please try again later.";
                        }
                         private     function sendText()
                                    {
                                              if(_mytext.text != "")
                                              {
                                                        chatHistoryText.text = chatHistory("You : " + _mytext.text);
                                                        var variables:URLVariables = new URLVariables();  
                                                        var request:URLRequest = new URLRequest(urlToSend);  
                                                        variables.sessionid = _sessionid
                                                        variables.chattext = _mytext.text;  
                                                        chatLoader.dataFormat = URLLoaderDataFormat.VARIABLES;  
                                                        request.data = variables;  
                                                        request.method = URLRequestMethod.POST;  
                                chatLoader.addEventListener(Event.COMPLETE, getAudio);  
                                chatLoader.addEventListener(Event.OPEN,onOpen);
                                chatLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS,onStatusChange);
                                chatLoader.addEventListener(IOErrorEvent.IO_ERROR,onMessageFailIO);
                                chatLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,onMessageFailSecurity);
                                                        chatLoader.load(request);
                                                        _mytext.text = "";
                                              }
                                    }
                                    function chatHistory(newText):String
                                    {
                                              chatTextArr[0] = chatTextArr[1];
                                              chatTextArr[1] = chatTextArr[2];
                                              chatTextArr[2] = chatTextArr[3];
                                              chatTextArr[3] = chatTextArr[4];
                                              chatTextArr[4] = chatTextArr[5];
                                              chatTextArr[5] = newText;
                                              var chatHistory = chatTextArr[0] != ""?chatTextArr[0]+"\n":"";
                                              chatHistory += chatTextArr[1] != ""?chatTextArr[1]+"\n":"";
                                              chatHistory += chatTextArr[2] != ""?chatTextArr[2]+"\n":"";
                                              chatHistory += chatTextArr[3] != ""?chatTextArr[3]+"\n":"";
                                              chatHistory += chatTextArr[4] != ""?chatTextArr[4]+"\n":"";
                                              chatHistory += chatTextArr[5] != ""?chatTextArr[5]+"\n":"";
                                              return chatHistory;
                                    }
                                    function randomNumber()
                                    {
                                              var rand = Math.random() * 1000000;
                                              return Math.round(rand);
                                    }
                                    function getAudio(e:Event)
                                    {
                                              var loader:URLLoader = URLLoader(e.target);
                                              //traceTxt.text = loader.data.soundFile;
                                              debugOutput.text = loader.data;
                                              var getStr:String = loader.data.soundFile;
                                              var arr:Array = getStr.split("^_^");
                                              loadAudio(arr[0], arr[1]);
                                    }
                                    function loadAudio(audioFile, textChat)
                                    {
                                    }
                                    function completeHandler(event:Event):void 
                                    { 
                                              trace("completeHandler")
                                    }
                                    /**
                                  * Initialise the engine
                                     */
                                    private function initEngine():void
                                    {
                                              trace("intEngine");
                                              //view.graphics.clear();
                                              view.antiAlias = 4;
                                              view.backgroundColor = backgroundColour;
                                              view.scene = scene;
                                              view.camera = camera;
                                              //setup controller to be used on the camera
                                              cameraController = new HoverController(camera, null, 25, 10, 70);
                                              cameraController.panAngle = 90;
                                              cameraController.tiltAngle = 2.5;
                                              lastPanAngle = cameraController.panAngle;
                                              lastTiltAngle = cameraController.tiltAngle;
                                             view.addSourceURL("srcview/index.html");
                                              addChild(view);
                                              //Uncomment this to show some stats
                                              var stats:AwayStats = new AwayStats(view);
                                              stats.y = 100;
                                              //addChild(stats);
                                    }
                                    /**
                                    * Initialise the lights in a scene
                                     */
                                    private function initLights():void
                                    {
                                              //Add a point light
                                              // hided 
                                             scene.addChild(light);
                                    }
                                    /**
                                     * Initialise the materials
                                     */
                                    private function initMaterials():void
                                   {
                                    }
                                    /**
                                     * Initialise the scene objects
                                     */
                                    private function initObjects():void
                                    {
                                             //default available parsers to all
                                              Parsers.enableAllBundled();
                                              AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
                                              var grid:WireframeGrid = new WireframeGrid(14, 140);
                                              //view.scene.addChild(grid);
                                    }
                                    private function InitMesh()
                                    {
                                              var headMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new headTexture().bitmapData));
                                              var eyeMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new eyeTexture().bitmapData));
                                              var shirtMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new shirtTexture().bitmapData));
                                              var hairalphaMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new hairalphaTexture().bitmapData))
                                              //Not using specular maps at this stage
                                              //headMaterial.specularMap = new BitmapTexture(new headSpecularTexture().bitmapData);
                                              headMaterial.repeat = true;
                                              headMaterial.bothSides = true;
                                             headMaterial.alphaThreshold = 0.5;
                                             headMaterial.gloss = 100;
                                             headMaterial.specular = 3;
                                              headMaterial.ambientColor = 0x808080; 
                                              headMaterial.ambient = 1;
                                            //create subscattering diffuse method
                                              subsurfaceMethod = new SubsurfaceScatteringDiffuseMethod(2048, 2);
                                              subsurfaceMethod.scatterColor = 0xff7733;
                                              subsurfaceMethod.scattering = .05;
                                              subsurfaceMethod.translucency = 4;
                                              eyeMaterial.repeat = true;
                                             eyeMaterial.bothSides = true;
                                              eyeMaterial.lightPicker = lightPicker;
                                              hairalphaMaterial.lightPicker = lightPicker;
                                              hairalphaMaterial.gloss = 100;
                                              hairalphaMaterial.specular = 3;
                                              hairalphaMaterial.ambientColor = 0x808080; 
                                              hairalphaMaterial.ambient = 1;
                                              newmesh = new Mesh(headMeshGeometry, headMaterial);
                                              hairmesh = new Mesh(hairMeshGeometry, headMaterial);
                                              eyelmesh = new Mesh(eyelMeshGeometry, eyeMaterial);
                                             eyermesh = new Mesh(eyerMeshGeometry, eyeMaterial);
                                              shirtmesh = new Mesh(shirtMeshGeometry, shirtMaterial);
                                              //newmesh.castsShadows = true;
                                             newmesh.subMeshes[0].material = headMaterial;
                                              hairmesh.subMeshes[0].material = hairalphaMaterial;
                                              eyelmesh.subMeshes[0].material = eyeMaterial;
                                              eyermesh.subMeshes[0].material = eyeMaterial;
                                              view.scene.addChild(newmesh);
                                              view.scene.addChild(hairmesh);
                                              view.scene.addChild(eyelmesh);
                                              view.scene.addChild(eyermesh);
                                              view.scene.addChild(shirtmesh);
                                              eyelmesh.rotationY = 90;
                                              eyermesh.rotationY = 90;
                                              newmesh.rotationY = 90;
                                              hairmesh.rotationY = 90;
                                              eyelmesh.rotationZ = 90;
                                              eyermesh.rotationZ = 90;
                                              newmesh.rotationZ = 90;
                                              hairmesh.rotationZ = 90;
                                              //hairmesh.y += 1.8;
                                              hairmesh.y = 7.9;
                                              hairmesh.x = -6.0;
                                              eyermesh.y += 8;
                                              eyermesh.z += 4.6;
                                              eyermesh.x += 10.1;
                                              eyelmesh.y += 8;
                                              eyelmesh.z -= 4.6;
                                              eyelmesh.x += 10.1;
                                              shirtmesh.rotationX = -90;
                                              shirtmesh.y = -12.0;
                                              shirtmesh.x = -3.0;
                                              var meshOffset:int = 4;
                                              newmesh.y += meshOffset;
                                              hairmesh.y += meshOffset;
                                              eyermesh.y += meshOffset;
                                              eyelmesh.y += meshOffset;
                                              morpher = new Morpher(newmesh);
                                              morphTarget_mouthopen = new MorphTarget(headMeshGeometry_mouthopen, headMeshGeometry);
                                              morphTarget_smile = new MorphTarget(headMeshGeometry_smile, headMeshGeometry);
                                              morphTarget_blink = new MorphTarget(headMeshGeometry_blink, headMeshGeometry);
                                             var backplane:PlaneGeometry = new PlaneGeometry(512, 256);
                                             var carehomeMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new carehomeClass().bitmapData));
                                             var backplaneMesh:Mesh = new Mesh(backplane, carehomeMaterial);
                                              backplaneMesh.rotationX = -90;
                                              backplaneMesh.rotationY = -90;
                                              /*view.scene.addChild(backplaneMesh);
                                              backplaneMesh.x = -90;*/
                                              var sphereGeometry:SphereGeometry = new SphereGeometry(4);
                                              var sphereMaterial:ColorMaterial = new ColorMaterial( 0xffffff );
                                              lightmesh = new Mesh(sphereGeometry, sphereMaterial);
                                              view.scene.addChild(lightmesh);
                                    }
                                    /**
                                     * Initialise the listeners
                                     */
                                    private function initListeners():void
                                    {
                                              addEventListener(Event.ENTER_FRAME, onEnterFrame);
                                              //stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
                                              //stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
                                              stage.addEventListener(Event.RESIZE, onResize);
                                              onResize();
                                    }
                                    /**
                                     * Navigation and render loop
                                     */
                                    private function onEnterFrame(event:Event):void
                                    {
                                              this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
                                              if (recording)
                                              {
                                                        if ((getTimer() - recordingTime) > 4 * 1000)
                                                                 StopRecording();
                                              }
                                              if (newmesh == null)
                                              {
                                                        if (headMeshGeometry != null && hairMeshGeometry != null && eyelMeshGeometry != null && eyelMeshGeometry != null )
                                                        {
                                                                  if (fileCount == 0)
                                                                  {
                                                                            InitMesh();
                                                                  }
                                                        }
                                              }
                                              cameraController.panAngle = 90;
                                              cameraController.tiltAngle = 2.5;
                                              if (newmesh != null)
                                              {
                                                        if (bootscreenBitmap.alpha > 0)
                                                        {
                                                                  bootscreenBitmap.alpha -= 0.015;
                                                        }
                                                        else
                                                        {
                                                                  bootscreenBitmap.alpha = 0;
                                                        }
                                                        logo.alpha = 1 - bootscreenBitmap.alpha;
                                                        sagalogo.alpha = 1 - bootscreenBitmap.alpha;
                                                        chatHistoryText.alpha = 1 - bootscreenBitmap.alpha;
                                                        _mytext.alpha = 1 - bootscreenBitmap.alpha;
                                                        microphoneButton.alpha = 1 - bootscreenBitmap.alpha;
                                                        if (lastblink == 0)
                                                        {
                                                                  if (blinkdirection)
                                                                 {
                                                                            blinkAmount += 0.25;
                                                                            if (blinkAmount > 1)
                                                                            {
                                                                                      blinkAmount = 1;
                                                                                      blinkdirection = !blinkdirection;
                                                                            }
                                                                  }
                                                                  else
                                                                  {
                                                                            blinkAmount -= 0.25;
                                                                            if (blinkAmount < 0)
                                                                            {
                                                                                      blinkAmount = 0;
                                                                                      blinkdirection = !blinkdirection;
                                                                                      lastblink = 100;
                                                                            }
                                                                  }
                                                        }
                                                        else
                                                                  lastblink--;
                                                        if (animdirection)
                                                        {
                                                                  animAmount += 0.20;
                                                                  if (animAmount > maxAnimAmount)
                                                                  {
                                                                            animAmount = maxAnimAmount;
                                                                            animdirection = !animdirection;
                                                                  }
                                                        }
                                                       else
                                                        {
                                                                  animAmount -= 0.20;
                                                                  if (animAmount < 0)
                                                                  {
                                                                            animAmount = 0;
                                                                            animdirection = !animdirection;
                                                                            var r:int = (Math.random() * 6);
                                                                            currentMorph = morphTarget_mouthopen;
                                                                  }
                                                        }
                                                        if (speechPlaying)
                                                                  currentScale = animAmount;
                                                        else
                                                                  currentScale = 0;
                                                        //Apply the morph targets, first apply the base, then apply the blink and the mouth shape
                                                        morpher.ApplyBaseToMesh(newmesh);
                                                        if (lastblink == 0)
                                                                  morpher.ApplyMorphTarget(newmesh, morphTarget_blink, blinkAmount);
                                                                  if (currentMorph != null)
                                                                            morpher.ApplyMorphTarget(newmesh, currentMorph,currentScale);
                                              }
                                              light.x = Math.sin(-180/*getTimer()/1000*/)*30;
                                              light.y = 15;
                                              light.z = Math.cos(-180/*getTimer()/1000*/)*30;
                                              if (lightmesh != null)
                                              {
                                                        lightmesh.position = light.position;
                                              }
                                              view.render();
                                    }
                                    /**
                                     * Listener function for asset complete event on loader
                                     */
                                    private function onAssetComplete(event:AssetEvent):void
                                    {
                                              if (event.asset.assetType == AssetType.MESH)
                                               {
                                              }
                                    }
                                    /**
                                     * Mouse down listener for navigation
                                     */
                                   private function onMouseDown(event:MouseEvent):void
                                    {
                                              lastPanAngle = cameraController.panAngle;
                                              lastTiltAngle = cameraController.tiltAngle;
                                              lastMouseX = stage.mouseX;
                                              lastMouseY = stage.mouseY;
                                              move = true;
                                              stage.addEventListener(Event.MOUSE_LEAVE, onStageMouseLeave);
                                    }
                                    /**
                                     * Mouse up listener for navigation
                                     */
                                    private function onMouseUp(event:MouseEvent):void
                                    {
                                              move = false;
                                              stage.removeEventListener(Event.MOUSE_LEAVE, onStageMouseLeave);
                                    }
                                    /**
                                     * Mouse stage leave listener for navigation
                                     */
                                    private function onStageMouseLeave(event:Event):void
                                    {
                                              move = false;
                                             stage.removeEventListener(Event.MOUSE_LEAVE, onStageMouseLeave);
                                    }
                                    /**
                                     * stage listener for resize events
                                     */
                                    private function onResize(event:Event = null):void
                                    {
                                             view.width = stage.stageWidth;
                                              view.height = stage.stageHeight;
                                    }
                          }
                }
                
                
                
                • 5. Re: Is it possible to draw a mesh on top of a background image in flash ?
                  sinious Most Valuable Participant

                  I assume the backplaneMesh you're applying the carehomeMaterial to is what you want to put behind the meshes. I also see you've tried things like setting its .x position to -90. What happens when you put that mesh far away from the camera, does it get smaller yet still stay over the meshes you imported? Have you tried an extreme position number like -900, -2000, -10000, etc?

                   

                  I find when I was initially getting used to importing objects (I don't use Away3D I use Flare3D) that I had no concept of the size of the models when they're imported. Adding some quick on-screen controls that can fire off some useful code would be helpful.

                   

                  Put some buttons and inputs that will let you play with the position and scale of the backplaneMesh. You may find your models are HUGE and while you push your background image back and it gets smaller yet doesn't appear to be behind the other meshes it's simply because the meshes are huge and the numbers you need to use are large. Just tie the inputs into the position and scale of the backplaneMesh and start testing some extreme numbers. I say add scale as an input because obviously the further away you push the backplaneMesh the smaller it gets so setting the size back up to normal would be needed.

                  1 person found this helpful