?
Solved

syntax to reference items in the child movie

Posted on 2007-10-13
4
Medium Priority
?
208 Views
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:

myScrollPane.swfB_text.txt

but that comes back undefined

Any ideas?
0
Comment
Question by:patGRFXS
  • 2
3 Comments
 
LVL 16

Expert Comment

by:vickerleung
ID: 20073054
patGRFXS,

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

Cheers
Vicker
0
 
LVL 19

Expert Comment

by:Gary Benade
ID: 20167796
when you load something into a scrollpane you reference it using the content property, so try something like:
myScrollPane.content.swfB_text.txt
0
 
LVL 19

Accepted Solution

by:
Gary Benade earned 2000 total points
ID: 20540208
My proposed solution ID:20167796 is correct, deleting or PAQ'ing will not be fair
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses
Course of the Month17 days, 7 hours left to enroll

864 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