Solved

Accessing a child movie in Flash

Posted on 2002-06-18
5
239 Views
Last Modified: 2010-04-03
Hi,

I have a Flash movie built using Flash MX (Windows version) that contains a blank movie clip called movStage.
When the parent movie is run it loads an SWF into this blank movie using the line:

loadMovie("myStage.swf", "movStage");

Inside the SWF I have a dynamic textfield called lblText. I want to be able to set the text on this textfield from the parent movie but I haven't been able to work out how this is done.
I tried using the following code:

movStage.lblText.text = "My text";

When I run a trace(movStage.lblText); I get 'undefined' as a result.

To further complicate the issue the child movie (movStage) has full access to the parent.
Knowing this I leave the child running in a loop constantly checking a variable in the parent movie and updating accordingly, but this option uses more processor time than is necessary.

If anyone has any ideas I'll be most grateful.

PyroMyst
0
Comment
Question by:pyromyst
  • 3
5 Comments
 
LVL 6

Expert Comment

by:rootdir
ID: 7090024
use following code

_parent.movStage.lblText.text = "My text";

or

_root.movStage.lblText.text = "My text";

or

_level0.movStage.lblText.text = "My text";

Give complete path from main movie. You will get what you are looking for. Still if you find diffculty send me your fla files and txt file, I will fix it for you. My email is rotdir@hotmail.com

Cheers
RootDir
0
 
LVL 1

Author Comment

by:pyromyst
ID: 7685949
I have requested that this question been deleted.

RootDir gave me a number of suggestions both here and via email.
However none of the suggestions helped me around my particular problem. I have yet to find the solution.

PyroMyst
0
 
LVL 6

Expert Comment

by:rootdir
ID: 7686449
Send me your fla files in zip format I will solve.

rotdir@hotmail.com

RootDir
0
 
LVL 6

Expert Comment

by:rootdir
ID: 7686455
Or post your email I will send example created for you.

RootDir
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7737593
PAQ'd and 100 points refunded

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

863 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

23 Experts available now in Live!

Get 1:1 Help Now