A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [AS2] Using multiple _root[]'s?

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    [AS2] Using multiple _root[]'s?

    Hi,

    Well, the best way to ask my question is with the use of examples. So I'll just jump into it.

    Lets say you have a bunch of similar movieclips and you want to move anyone of them dynamically. We would use:

    PHP Code:
    _root["box"+counter]._x 200
    Something like that. However, my issue is not selecting a movieclip dynamically, but selecting another movieclip dynamically within a dynamically selected movieclip.

    Mouthful. Here's what I mean, though this code doesn't work:


    PHP Code:
    _root["box"+counter]._root["obj"+height]._y 100

    Thoughts?

  2. #2
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Oh, I've found a work around!

    I simply just attached the same movieclip instance name every time, moved it and then renamed it to whatever I wanted. I was also using the wrong depth.

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