Cloning Objects

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • SGW
    Indigo Rose Customer
    • Sep 2005
    • 91

    Cloning Objects

    Hi

    I am a beginner planning a project using AMS 6 and wonder if it is possible to script a graphic object so that when the user clicks on the object, it clones itself in runtime (clones each time clicked on).

    I'm not sure if this is possible and would appreciate any suggestions or a sample.


    Kind Regards,

    Stephen
  • yosik
    Indigo Rose Customer
    • Jun 2002
    • 1856

    #2
    I am far from my office this week, but as far as I remember, you can use the Page.CreateObject action to create an object at runtime, so you could get the current object properties and based on them , create a clone of that object.
    Hope that helps.

    Yossi

    Comment

    • SGW
      Indigo Rose Customer
      • Sep 2005
      • 91

      #3
      Hi Yosik

      Thank you for your reply. I can check to see if this does what is needed.

      What I am trying to do is provide the end-user with the ability to click on any object (graphic, image, etc.) and thereby create a clone (or multiple clones) of that object in runtime. The clones would be dragged and dropped to wherever needed on a diagram (drop zone). Next I would have to figure out how to identify/name clones, get their dropped positions, save these and then set up a way for the end-user to reset the clones on the diagram whenever they return to work on it.

      For a newbie at AMS 6, this is a huge challenge. But, I can try to learn how to do this.

      Again, thank you for your suggestion.

      Kind Regards,

      SGW

      Comment

      • yosik
        Indigo Rose Customer
        • Jun 2002
        • 1856

        #4
        From your explaination, it looks to me you would be better off using Flash. A lot of what you want is relatively simple in Flash. The best would be to use a Flash object in a AMS project and benefit from the best of the two.

        Yossi

        Comment

        • SGW
          Indigo Rose Customer
          • Sep 2005
          • 91

          #5
          Hi Yosik

          While new at using AMS 6, I have some experience creating eLearning content using other tools, one with Flash output. The scripting in such tools, based on ECMA-262, is capable, but strains when attempting some of the fancier maneuvers (getting, saving, resetting graphic object clone fill colors/transparency, rotating cloned connecting lines, saving and resetting their angles, as well as positions). Plus my scripting skills, in any event, are not always up to the task.

          I was looking for a more robust language (short of VB, Basic, other languages involving coding) and wanted to see if LUA would allow for more scripting complexity. I'm not sure and may need to try to learn a code based, object oriented language like Basic (not easy for me to start up with, from scratch).

          All suggestions are welcome.

          Kind Regards,

          SGW

          Comment

          • yosik
            Indigo Rose Customer
            • Jun 2002
            • 1856

            #6
            Hi,
            It is not that LUA cannot cope with what you want. The implementation of LUA in AMS is somewhat limited (at least with the code that is officially supported). But I would say that (almost) anything you can do with Basic you can do with LUA.

            Good luck anyway on your project.
            Yossi

            Comment

            • SGW
              Indigo Rose Customer
              • Sep 2005
              • 91

              #7
              Hi Yossi

              Thank you for your reply and encouragement.

              Kind Regards,

              SGW

              Comment

              Working...
              X