A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: referencing objects not on the same layer

  1. #1
    Junior Member
    Join Date
    Jul 2011

    referencing objects not on the same layer

    Is it possible to control an object/element on a instance? If so, how is it done through actionscript?

    There is an instance "instance140" off of the root, that has an element named img4 that i need to reference... does anyone know how I would go about that?

    using root.instance.object form returns undefined. Please help.

  2. #2
    Senior Member
    Join Date
    Jun 2003
    Kent, WA
    Are you seeing these instance names through the debugger? If an object is unnamed Flash will give it a generic name like "instance140". Ideally you should be explicitly naming these objects yourself. I would not rely on Flash creating the names for you.

    That said, you can reference what you mentioned like so...


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