using more then 126 chars for naming models...

Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default using more then 126 chars for naming models...

    Today i noticed that models in Shockwave3D can have a maximum number of 126
    characters. I needed to know that because i have to store some Informations in
    the names of the models when i export them (i have not option to use the
    "userdate" when exporting the models).

    But now something interesting happend when i tried to create long names in
    director via lingo. If the names are longer then 126 charakters they are
    limited to the first 126.

    if you use for example this code to generate a new group:

    member("world").newgroup("Lorem ipsum dolor sit amet, consectetuer adipiscing
    elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq")

    this are 126 chars, you get a group with exact this name.

    if you now add more charakters at the end it will produce another group with
    the same name as the group above. You can check this in the Objectinspector.

    use now this code:
    member("world").newgroup("Lorem ipsum dolor sit amet, consectetuer adipiscing
    elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliqLorem
    ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
    euismod tincidunt ut laoreet dolore magna aliq")

    It will produce a second Group with exact the same name. The good thing is,
    that you can still reference to the model with that long name, the bad thing
    is, you can't read the full name of the model anymore.

    What does this mean in the end?
    There is a visible name of the model that can be read by lingo, but there is
    the "real" name of the model that can be used to reference to models. If the
    names have more then 126 chars you can only see the shortend name but its still
    nessesary to reference to the longer name.

    if you try this in the message window (this are 127 chars, i added a "2" as
    last character):
    member("world").newgroup("Lorem ipsum dolor sit amet, consectetuer adipiscing
    elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq2")

    put member("world").group("Lorem ipsum dolor sit amet, consectetuer adipiscing
    elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
    aliq2").name

    -- "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
    nibh euismod tincidunt ut laoreet dolore magna aliq"

    but
    put member("world").group("Lorem ipsum dolor sit amet, consectetuer adipiscing
    elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
    aliq").name

    will give you an error!

    Conclusion:
    It's better not to use more then 126 characters for naming models.

    But if you want to prevent your 3D models from being used by other people,
    then you can use longer names and add for example a serialnumber to the models,
    behind char 126. So you can generate shockwave apps that need to know the
    correct name of the model.

    if you give your models in your 3D app names like this:
    "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
    nibh euismod tincidunt ut laoreet dolore magna aliq_12345"
    (132 chars)
    the last part is in this example the serialnumber "_12345"

    you can only reference to the models with

    serialnum="_12345"
    rightname=member("world").model[1].name & serialnum
    put rightname.position

    Maybe interesting to some people that want to make external w3D files
    unconfortable to handle for other people, you still can reference to the models
    by their numbers. I think it will only prevent models form the
    "CloneModelFromCastmember" command, not much... in the end there is no real
    protection when external *.w3d files are used...

    regards!



    hondo3000 Guest

  2. Similar Questions and Discussions

    1. receiving ??? chars instead of "special" chars
      Hello i have a strange problem i made a online catalogue and must submit orders to a remote server I need to connect to a remote webservice on ...
    2. Naming container
      I'm having a problem with a linkbutton which is not assigned a UniqueID with all the prefixes for some reason. The linkbutton resides in a...
    3. Var naming S.O.S
      Hi, I am desperatly trying ton use concatenation in variables naming. Say i have : var nb = 5; I would like to use the value of nb in a...
    4. Naming Pages
      All of my pages are named page 0001, 0002, 0003, etc. They aren't named, for example, my subscription form page is not: ...
    5. naming models / rotation / tweening
      Hi, The 'Clone Model' behavior in the Chrome Lib gives each new model instance a unique name: the name of the source model plus an instance...
  3. #2

    Default Re: using more then 126 chars for naming models...

    <blockquote>quote:<br><hr><i>Originally posted by:
    <b><b>hondo3000</b></b></i>you can only reference to the models with
    serialnum="_12345"
    rightname=member("world").model[1].name & serialnum<hr></blockquote>

    you can still reference the nodes by index.
    clone the nodes in a repeat loop and you're done.



    a?ex Guest

  4. #3

    Default Re: using more then 126 chars for naming models...

    I know that this is not more then a gesture. but if people try to use "3DPI"
    for example and push the "CloneModelsFromCastmember" button it will not work.
    CloneModelFromCastmember needs to know the model by name.

    Using the "clone" comand like this:
    member("world").model[1].clone("clone001")

    will produce a errormessage and a model that is named like the original one.

    But you are right, this is absolute useless at all. if you know a little lingo
    its possible to copy models in different ways.... So sorry for posting this
    here, it was just little bit late and i was not thinking long enough about
    it...

    cheers!


    hondo3000 Guest

  5. #4

    Default Re: using more then 126 chars for naming models...

    hondo3000 wrote:
    > I know that this is not more then a gesture. but if people try to use "3DPI"
    > for example and push the "CloneModelsFromCastmember" button it will not work.
    > CloneModelFromCastmember needs to know the model by name.
    >
    > Using the "clone" comand like this:
    > member("world").model[1].clone("clone001")
    >
    > will produce a errormessage and a model that is named like the original one.
    >
    > But you are right, this is absolute useless at all. if you know a little lingo
    > its possible to copy models in different ways.... So sorry for posting this
    > here, it was just little bit late and i was not thinking long enough about
    > it...
    hehe Don´t worry! It´s good to post here things like these. I already
    faced the character limitation and couldn´t use userData either because
    the modeler needed to use Maya. Can´t recall how did I solve it... I
    think that using a database. Anyway, now we know that we won´t be able
    of stealing your models with 3DPI ;)

    Regards,
    --
    Agustín María Rodríguez

    [url]www.onwine.com.ar[/url] > Macromedia Director demos & code
    Agustín María Rodríguez Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139