A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: _lockroot issues

  1. #1
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386

    _lockroot issues

    Hi All,

    I have an old swf, perhaps created prior to player 7.

    When I load this swf into a newly created swf it no longer works as expected. I suspect that it is because it was created with _root used to scope variables.

    I applied _lockroot to the container MC that loads the old swf but this does no good. I suspect this is because the old swf was created prior to player 7 and _lockroot does not work with these.

    Now to the question. Is there anything I can do to get a swf created prior to player 7 to work with _lockroot?

    I have no access to the FLA.

    Thanks.

    _t
    I don't feel tardy.

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    put

    Code:
    this._lockroot = true;
    not in the container swf but the old swf ...

    edit: just saw you dont have access to the old.swf fla... how are you loading old.swf into container.swf.. are you loading it into a movieclip (other than _root)
    Last edited by silentweed; 04-07-2009 at 09:17 AM.
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  3. #3
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386
    I was loading it in to a container clip. After the load completed I was attempting to apply _lockroot to the container clip. It did not resolve the issue. I assume the "old swf" was created prior to Flash Player 7 and therefore _lockroot would not work.

    I managed to find a different version of the FLA and was able to extract the portions I needed. I went in and changed all references to _level0 to something more specific.

    Seeing that _level0 was used instead of _root makes me wonder if _lockroot affects _level0 or only _lockroot. Does anyone know the answer to this?

    Otherwise everything worked out. Thanks for the reply.

    _t
    I don't feel tardy.

  4. #4
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    Quote Originally Posted by Shotsy247 View Post
    After the load completed I was attempting to apply _lockroot to the container clip.
    apply _lockroot BEFORE the load starts and it should work.

    e.g

    Code:
    mcContainer._lockroot = true;
    mcContainer.loadMovie("old.swf");
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

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