syntax to reference items in the child movie

Posted on 2007-10-13
Last Modified: 2012-06-22
I have a scrollpane that I am using in swf A that loads swf B using the contentPath attribute. In swf B I have a function that runs when the swf is loaded that attaches movie clips representing advertisements (1 rectangle for each ad) while looping over the number of ads available. This works just fine when swf B is run by itself, but when loaded into swf A, the function does not run, leaving me with a blank scrollpane.

What is the syntax to reference items in the child movie? The items I am looking to manipulate are on the main timeline of swf B, so I'm thinking it should be:


but that comes back undefined

Any ideas?
Question by:patGRFXS
    LVL 16

    Expert Comment


    First of all, this should be a Flash question instead of Flex.

    I think your problem is that loading swfB inside swfA making the _root reference of swfB changed.
    I will suggest you adding the following code to swfB first frame first line.

    this._lockroot = true;

    Instead of thinking about controlling swfB in swfA

    LVL 19

    Expert Comment

    by:Gary Benade
    when you load something into a scrollpane you reference it using the content property, so try something like:
    LVL 19

    Accepted Solution

    My proposed solution ID:20167796 is correct, deleting or PAQ'ing will not be fair

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
    I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now