A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Can you target an MC in the Scroll Pane component?

  1. #1
    Junior Member
    Join Date
    Feb 2002
    Posts
    13

    Can you target an MC in the Scroll Pane component?

    I want to be able to send commands to an MC that is inside a Scroll Pane component (2004 Pro) but have not been able to figure out how to target the MC. Can this be done?

    Thanks

  2. #2
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    Give the component an instance name (lets say 'component1') and the mc in the component an instance name (lets say 'mc1') and if the component is on the main timeline, use this code:

    Code:
    _root.component1.mc1.play();
    This code is obviously to make the mc play.

    XFM

  3. #3
    Junior Member
    Join Date
    Feb 2002
    Posts
    13
    My thoughts exactly. However, I can't figure out how to actually give the MC an instance name.

  4. #4
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    If your using MX, select the MC and then bring up the properties panel at the bottom of the MX design interface.

    The instance name text box is there.

    XFM

  5. #5
    Junior Member
    Join Date
    Feb 2002
    Posts
    13
    Yes. However, remember that the scroll pane component is on the stage and not the MC itself. The MC loads into the component at runtime (through library linkage set to export). You cannot actually see the MC in the pane while authoring. If you select the scroll pane, only the properties for the pane are visible.

  6. #6
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    Well, if the loadMovie command is being used, it will be given an instance name through the arguments.

    XFM

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