A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: level0?

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    343

    level0?

    I am having problems with using relative terms and shared objects. For example:

    whatever = _parent._parent.partOfMC;
    cube_so.data.morph.whatever = whatever;

    This doesn't seem to work because (I think) flash reads the relative path as level0. How can I use a relative path and make the shared object work? This was hard to explain, so if you don't understand, I will try explain better. Thanks,

    gamist

  2. #2
    Junior Member
    Join Date
    Sep 2000
    Posts
    5
    judging by the code example you provided:

    whatever = _parent._parent.partOfMC;
    cube_so.data.morph.whatever = whatever;

    i am assuming that 'partOfMC' is some value that you are assingning to the var 'whatever'.


    then:'cube_so.data.morph.whatever = whatever'

    is 'morph' expicitly defined as an object?

    such as
    cube_so.data.morph = new Object();
    (or however you are getting the data in there...)
    ??

    the object has to be created before you can assign a property to it.

    hope this helps

    damo
    http://www.makemagic.com

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Posts
    343

    figured it out

    Thanks for your reply.

    It was the level0 that was causing the problem. I just changed it to:

    whatever = _parent._parent._name+".partOfMC";
    cube_so.data.morph.whatever = whatever;

    This gets rid of the level0 and the shared object is created. I don't know why the level0 thing makes it mess up, but I guess this is an easy way around it.

    gamist

  4. #4
    Junior Member
    Join Date
    Sep 2000
    Posts
    5
    i would need to see your code to help provide more context for the reasons behind this behaviour.

    damo
    http://www.makemagic.com

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center