0 Replies Latest reply on Sep 21, 2016 8:15 PM by SamCP

    [Help] Copy Object & Fill to Bounds

    SamCP

      I'm working on an interactive project. I need to find a way to have whatever object the user clicks on, appear to the right at a larger scale, but not too large. My first thought was "I'll just copy the object!" Which I didn't think would work, but I tried. So I had something like:

       

      Var newObject = clickedObject;

      newObject.x += 10;

       

      I figured I'd offset the 'new' one to prove or disprove that it had worked. So far, it doesn't work. I'm not quite sure what I'm doing wrong. I'm working on an HTML5 project. I know I need to do more than this, but I can't quite find what I'm looking for.

       

      Ultimately, I'd like to pre-position an object, then on-click do:

       

      bigObject = clickedObject;bigObject.ScaletoBounds(boundingBoxObject);

       

       

      Any idea where I even begin to do this or how I could get it to work?